:root {
  --bg-0: #78acff;
  --bg-1: #4d7ee1;
  --bg-2: #24469c;
  --bg-3: #0d1731;
  --ink: #eff5ff;
  --muted: #aec0e3;
  --muted-strong: #d8e5ff;
  --accent: #8ab4ff;
  --accent-2: #9ec5ff;
  --border: rgba(160, 190, 245, 0.2);
  --border-strong: rgba(182, 208, 255, 0.5);
  --shadow-soft: 0 24px 60px rgba(7, 17, 40, 0.2);
  --shadow-card: 0 14px 28px rgba(8, 18, 42, 0.2), 0 34px 70px rgba(6, 14, 34, 0.34), 0 80px 140px rgba(0, 0, 0, 0.22);
  --radius-xl: 28px;
  --text-shadow-strong: 0 2px 14px rgba(3, 10, 28, 0.28);
  --text-shadow-soft: 0 1px 10px rgba(5, 10, 24, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(208, 228, 255, 0.96), rgba(140, 183, 255, 0.92) 18%, rgba(89, 135, 231, 0.88) 42%, rgba(27, 54, 122, 0.96) 72%, #091226 100%);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(198, 223, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 28%, rgba(255, 255, 255, 0) 62%);
  background-size: 120% 120%;
  animation: drift-bg 26s ease-in-out infinite alternate;
  z-index: -1;
  opacity: 0.4;
}

body::after {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.26), transparent 18%),
    radial-gradient(circle at 82% 16%, rgba(171, 214, 255, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(7, 15, 34, 0) 0%, rgba(6, 11, 24, 0.12) 48%, rgba(5, 9, 20, 0.46) 100%);
  z-index: -2;
}

.glow-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 238, 255, 0.22), transparent 24%),
    radial-gradient(circle at 16% 22%, rgba(120, 182, 255, 0.12), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(106, 170, 255, 0.1), transparent 20%);
  background-size: 115% 115%;
  animation: drift-glow 34s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; }

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 6vw 0;
}

.nav-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid rgba(175, 210, 255, 0.2);
  background: linear-gradient(180deg, rgba(34, 52, 92, 0.9), rgba(19, 31, 60, 0.78));
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 36px rgba(10, 24, 58, 0.24), 0 46px 92px rgba(6, 14, 32, 0.28);
}

.brand,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.brand {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(154, 191, 255, 0.18), rgba(69, 95, 156, 0.12));
  border-color: rgba(190, 220, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 30px rgba(10, 22, 50, 0.24);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-links a {
  color: rgba(239, 245, 255, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(96, 124, 188, 0.04));
  border-color: rgba(184, 214, 255, 0.14);
}

.brand:hover,
.nav-links a:hover {
  transform: translateY(-2px);
  color: #fff;
  background: linear-gradient(180deg, rgba(138, 183, 255, 0.28), rgba(59, 83, 142, 0.18));
  border-color: rgba(198, 224, 255, 0.34);
  box-shadow: 0 18px 34px rgba(8, 18, 42, 0.26), 0 0 0 1px rgba(176, 212, 255, 0.1);
}

main {
  position: relative;
}

.hero,
.page-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 88px 6vw 56px;
}

.page-hero {
  min-height: auto;
  padding: 20px 6vw 8px;
}

.hero-inner,
.page-hero-inner {
  display: grid;
  gap: 28px;
  max-width: 980px;
  padding: 38px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(9, 16, 29, 0.74), rgba(7, 12, 22, 0.58));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(9, 18, 42, 0.18), 0 48px 100px rgba(5, 11, 28, 0.22);
}

.hero-inner {
  text-align: center;
  justify-items: center;
}

.page-hero-inner {
  width: min(1320px, 100%);
  max-width: 1320px;
  gap: 16px;
  padding: 22px 28px;
}

.profile-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.profile-wrap::before {
  content: "";
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(99, 190, 255, 0.34) 0%, rgba(99, 190, 255, 0.16) 32%, rgba(99, 190, 255, 0) 68%);
  filter: blur(20px);
  opacity: 0.95;
  z-index: -2;
}

.profile-wrap::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(220, 241, 255, 0.28), rgba(81, 140, 224, 0.08) 42%, rgba(4, 9, 22, 0.08) 72%),
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.26), transparent 24%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 20px 44px rgba(12, 28, 66, 0.22);
  z-index: -1;
}

.profile-ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(126, 216, 255, 0.94);
  background: radial-gradient(circle, rgba(136, 212, 255, 0.06), rgba(136, 212, 255, 0) 64%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 0 1px rgba(141, 211, 255, 0.18),
    0 0 22px rgba(87, 195, 255, 0.28),
    0 0 86px rgba(87, 195, 255, 0.24);
  animation: glow-pulse 5.2s ease-in-out infinite;
}

.profile {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid rgba(8, 14, 26, 0.94);
  box-shadow:
    0 0 0 2px rgba(205, 234, 255, 0.16),
    0 18px 34px rgba(9, 18, 42, 0.22),
    0 46px 84px rgba(0, 0, 0, 0.34);
  filter: saturate(1.04) contrast(1.03) brightness(1.02);
}

.tagline,
.eyebrow {
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--muted-strong);
  font-weight: 700;
  text-shadow: var(--text-shadow-soft);
}

h1,
h2,
h3 {
  margin: 0;
  color: #fff;
  text-shadow: var(--text-shadow-strong);
}

h1,
.page-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 600;
  color: rgba(239, 245, 255, 0.92);
  text-align: center;
}

p,
li {
  color: rgba(239, 245, 255, 0.82);
  text-shadow: var(--text-shadow-soft);
}

.hero p,
.section-lead,
.page-lead {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.72;
}

.hero h1,
.hero p,
.hero-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.page-hero .page-title {
  font-size: clamp(32px, 4.1vw, 58px);
  line-height: 0.98;
}

.page-hero .page-lead {
  max-width: 980px;
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions { justify-content: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(124, 151, 219, 0.25);
  background: linear-gradient(135deg, rgba(70, 108, 214, 0.5), rgba(71, 92, 160, 0.24));
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(6, 12, 28, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.secondary {
  background: rgba(8, 14, 28, 0.76);
  border-color: var(--border);
  color: rgba(239, 245, 255, 0.82);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(13, 27, 70, 0.3);
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

section,
.page-section {
  padding: 90px 6vw;
}

.page-hero + .page-section {
  padding-top: 8px;
}

.section-copy {
  display: grid;
  gap: 16px;
  margin-bottom: 36px;
}

.section-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.services-grid,
.project-grid,
.detail-grid {
  display: grid;
  gap: 28px;
}

.services-grid,
.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card,
.detail-panel,
.contact-card {
  background: linear-gradient(180deg, rgba(26, 46, 88, 0.97), rgba(8, 19, 42, 0.96));
  border: 1px solid rgba(171, 210, 255, 0.22);
  padding: 22px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -24px 36px rgba(4, 10, 22, 0.3), 0 24px 48px rgba(18, 42, 94, 0.22), 0 62px 120px rgba(3, 8, 22, 0.32);
}

.service-card h3,
.detail-panel h2,
.detail-panel h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.project-grid {
  align-items: stretch;
}

.project-card {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(33, 56, 102, 0.98), rgba(10, 20, 44, 0.98));
  border: 1px solid rgba(177, 214, 255, 0.24);
  border-radius: var(--radius-xl);
  overflow: clip;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -28px 44px rgba(2, 8, 20, 0.34), 0 18px 28px rgba(66, 118, 214, 0.18), 0 30px 56px rgba(8, 18, 42, 0.24), 0 76px 138px rgba(3, 8, 22, 0.34);
  transform: perspective(1200px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), border-color 320ms ease, box-shadow 320ms ease, background 320ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(180, 222, 255, 0.08) 18%, transparent 46%);
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.18) 0%, rgba(201, 229, 255, 0.08) 18%, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 84% 18%, rgba(101, 180, 255, 0.22), transparent 22%);
  opacity: 0.76;
  pointer-events: none;
  z-index: 0;
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(140, 188, 255, 0.16), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-image img,
.detail-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: relative;
  z-index: 1;
}

.project-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.22), transparent 22%),
    linear-gradient(118deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0) 44%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 320ms ease;
  z-index: 2;
  pointer-events: none;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 14, 0) 25%, rgba(4, 7, 14, 0.1) 65%, rgba(4, 7, 14, 0.72) 100%),
    linear-gradient(90deg, rgba(2, 6, 15, 0.22), rgba(2, 6, 15, 0) 32%, rgba(2, 6, 15, 0.16));
  z-index: 2;
  pointer-events: none;
}

.project-body {
  position: relative;
  z-index: 1;
  padding: 20px 20px 22px;
  display: grid;
  gap: 12px;
}

.project-body h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.project-tech,
.meta-inline {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: rgba(216, 229, 255, 0.88);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 6px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
}

.project-link.secondary {
  color: rgba(239, 245, 255, 0.74);
  font-weight: 500;
  font-size: 14px;
}

.project-link.secondary span {
  font-size: 15px;
}

.contact {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.contact-copy {
  display: none;
}

form {
  display: grid;
  gap: 14px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(126, 150, 205, 0.25);
  background: rgba(8, 12, 24, 0.8);
  color: var(--ink);
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.socials {
  display: flex;
  gap: 18px;
  margin-top: 0;
  justify-content: center;
}

.socials a {
  background: linear-gradient(180deg, rgba(28, 49, 92, 0.98), rgba(9, 18, 38, 0.96));
  border: 1px solid rgba(184, 216, 255, 0.2);
  padding: 12px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 26px rgba(11, 24, 56, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.socials img {
  width: 20px;
  height: 20px;
  filter: invert(1) brightness(1.6);
}

.socials a:hover {
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(44, 78, 142, 1), rgba(12, 24, 50, 0.98));
  box-shadow: 0 20px 34px rgba(11, 24, 56, 0.3), 0 0 0 1px rgba(130, 198, 255, 0.18);
  border-color: rgba(144, 209, 255, 0.36);
}

.site-footer {
  padding: 40px 6vw 60px;
  text-align: center;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: rgba(239, 245, 255, 0.72);
}

.breadcrumb a {
  text-decoration: none;
}

.page-lead {
  margin: 0;
}

.detail-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  align-items: start;
}

.detail-visual {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-card);
  background: linear-gradient(180deg, rgba(18, 33, 64, 0.96), rgba(9, 17, 34, 0.94));
}

.detail-visual img {
  aspect-ratio: 16 / 10;
}

.detail-panel ul {
  margin: 0;
  padding-left: 18px;
}

.detail-panel li + li {
  margin-top: 8px;
}

.project-list {
  display: grid;
  gap: 16px;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 48px rgba(45, 227, 255, 0.12); }
  50% { box-shadow: 0 0 84px rgba(45, 227, 255, 0.22); }
}

@keyframes drift-bg {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

@keyframes drift-glow {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.03); }
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    border-color: rgba(197, 228, 255, 0.42);
    background: linear-gradient(180deg, rgba(45, 76, 136, 0.99), rgba(11, 22, 46, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -34px 50px rgba(2, 8, 20, 0.42), 0 22px 36px rgba(92, 146, 255, 0.24), 0 48px 94px rgba(8, 18, 42, 0.44), 0 92px 148px rgba(3, 8, 22, 0.34), 0 0 0 1px rgba(153, 208, 255, 0.12);
  }

  .project-card:hover .project-image::before {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 12px;
  }

  .nav-shell {
    border-radius: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-wrap {
    width: 170px;
    height: 170px;
  }

  .hero-actions,
  .cta-row {
    flex-direction: column;
  }

  .hero-inner,
  .page-hero-inner {
    padding: 28px 20px;
  }

  .page-hero {
    padding-top: 14px;
    padding-bottom: 8px;
  }

  .project-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  .glow-layer,
  .profile-ring {
    animation: none !important;
  }
  .project-card,
  .project-card:hover {
    transform: none !important;
  }
  .project-image::before,
  .project-card:hover .project-image::before {
    opacity: 0 !important;
  }
}
