:root {
  --bg: #07111f;
  --bg-soft: #0b1626;
  --panel: rgba(16, 28, 47, 0.72);
  --panel-solid: #101c2f;
  --text: #f6f8fb;
  --muted: #9ca9ba;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #73e5c2;
  --accent-2: #7bb7ff;
  --accent-3: #b59cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shell: 1180px;
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-soft: #eaf0f7;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-solid: #ffffff;
  --text: #102033;
  --muted: #5d6c7e;
  --line: rgba(16, 32, 51, 0.11);
  --accent: #0f9f80;
  --accent-2: #276ec9;
  --accent-3: #7858d7;
  --shadow: 0 22px 70px rgba(44, 72, 108, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(115, 229, 194, 0.08), transparent 32%),
    radial-gradient(circle at 100% 10%, rgba(123, 183, 255, 0.08), transparent 32%),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #07111f; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }
button { color: inherit; }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.section { padding: 112px 0; }

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(90px);
  opacity: .12;
  pointer-events: none;
  z-index: -1;
}
.page-glow-one { top: 12vh; left: -180px; background: var(--accent); }
.page-glow-two { top: 52vh; right: -220px; background: var(--accent-2); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: linear-gradient(to bottom, rgba(7, 17, 31, .88), rgba(7, 17, 31, .52), transparent);
  backdrop-filter: blur(14px);
}
html[data-theme="light"] .site-header {
  background: linear-gradient(to bottom, rgba(244, 247, 251, .9), rgba(244, 247, 251, .62), transparent);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px 10px 14px;
  background: color-mix(in srgb, var(--panel-solid) 76%, transparent);
  box-shadow: 0 8px 34px rgba(0,0,0,.08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 190px; }
.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06111c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand-copy { display: flex; flex-direction: column; font-weight: 700; line-height: 1.1; }
.brand-copy small { color: var(--muted); margin-top: 5px; font-size: 11px; font-weight: 500; letter-spacing: .03em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
}
.nav-links > a:hover { color: var(--text); background: var(--panel); }
.theme-toggle, .menu-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.theme-toggle { width: 40px; height: 40px; border-radius: 12px; }
.menu-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; padding: 11px; }
.menu-toggle span { display: block; height: 2px; background: currentColor; margin: 4px 0; border-radius: 2px; }

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 76px;
  padding-top: 72px;
  padding-bottom: 84px;
}
.eyebrow, .kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 15%, transparent);
}
.hero h1, .section-heading h2, .contact-card h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: -.045em;
  line-height: .98;
  margin: 0;
}
.hero h1 { font-size: clamp(48px, 6.4vw, 82px); max-width: 780px; }
.hero h1 span { color: transparent; background: linear-gradient(110deg, var(--accent), var(--accent-2) 55%, var(--accent-3)); background-clip: text; -webkit-background-clip: text; }
.hero-lead { max-width: 650px; color: var(--muted); font-size: 18px; margin: 28px 0 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-tags span, .project-stack span, .role-tag {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 750;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #05111c; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 75%, white)); border-color: transparent; }
.button-secondary { background: var(--panel); }
.button-secondary:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.text-link { color: var(--muted); font-weight: 700; font-size: 14px; padding: 10px; }
.text-link:hover { color: var(--text); }
.full { width: 100%; }

.hero-visual { position: relative; }
.visual-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
.visual-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(150deg, rgba(255,255,255,.08), transparent 30%, transparent 72%, rgba(115,229,194,.06)); }
.visual-topbar { height: 46px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.visual-topbar > span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.visual-topbar small { margin-left: auto; color: var(--muted); font-size: 11px; }
.visual-card img { width: 100%; min-height: 310px; object-fit: cover; object-position: center top; }
.visual-caption { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 20px 20px; }
.visual-caption div { display: flex; flex-direction: column; }
.visual-caption strong { font-size: 14px; }
.visual-caption span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.visual-caption a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); }
.floating-chip { position: absolute; z-index: 2; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 90%, transparent); box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 12px; font-weight: 700; }
.chip-one { left: -28px; bottom: 90px; }
.chip-two { right: -22px; top: 74px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
}
.metrics article { padding: 24px 26px; min-height: 118px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics strong { font-family: "Space Grotesk"; font-size: 28px; line-height: 1; }
.metrics span { color: var(--muted); font-size: 12px; margin-top: 9px; }

.section-heading { display: grid; grid-template-columns: 1fr .75fr; align-items: end; gap: 50px; margin-bottom: 48px; }
.section-heading h2 { font-size: clamp(38px, 4.6vw, 62px); margin-top: 12px; max-width: 760px; }
.section-heading > p { color: var(--muted); margin: 0 0 4px; max-width: 540px; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  background: var(--panel);
  min-height: 315px;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.project-card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.project-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.project-card:has(.project-card-link) { cursor: pointer; }
.project-links { position: relative; z-index: 1; }
.project-featured { grid-row: span 2; min-height: 648px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--panel-solid)), var(--panel)); }
.project-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.project-card h3 { font-family: "Space Grotesk"; font-size: clamp(30px, 4vw, 52px); line-height: 1; margin: auto 0 18px; letter-spacing: -.04em; }
.project-card p { color: var(--muted); margin: 0; max-width: 620px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.project-links { display: flex; gap: 24px; margin-top: 30px; font-size: 13px; font-weight: 700; }
.project-links a:hover { color: var(--accent); }

.smart-section, .skills-section { position: relative; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-soft) 65%, transparent); }
.smart-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; }
.smart-story { border-top: 1px solid var(--line); }
.story-block { display: grid; grid-template-columns: 60px 1fr; gap: 22px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.story-number { color: var(--accent); font-family: "Space Grotesk"; font-size: 13px; }
.story-block h3 { font-size: 20px; margin: 0 0 8px; }
.story-block p { color: var(--muted); margin: 0; }
.impact-card { position: sticky; top: 112px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--panel); }
.impact-card ul { list-style: none; padding: 0; margin: 22px 0 26px; }
.impact-card li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.impact-card li:first-child { padding-top: 0; }
.impact-card li:last-child { border-bottom: 0; }
.impact-card strong, .impact-card span { display: block; }
.impact-card strong { font-size: 14px; }
.impact-card span { color: var(--muted); font-size: 12px; margin-top: 4px; }

.gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 84px 0 24px; }
.gallery-heading h3 { font-family: "Space Grotesk"; font-size: 34px; letter-spacing: -.035em; margin: 7px 0 0; }
.gallery-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-item {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-solid);
  cursor: zoom-in;
  text-align: left;
}
.gallery-wide { grid-column: 1 / -1; min-height: 460px; }
.gallery-item img { width: 100%; height: 100%; min-height: inherit; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.gallery-item::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.gallery-item > span { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 20px; display: flex; justify-content: space-between; align-items: end; gap: 20px; color: #fff; }
.gallery-item strong, .gallery-item small { display: block; }
.gallery-item small { opacity: .7; margin-top: 3px; }
.gallery-item:hover img { transform: scale(1.025); }

.timeline { max-width: 960px; margin: 0 auto; }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 36px; padding: 32px 0; border-top: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--muted); font-size: 13px; font-weight: 700; padding-top: 6px; }
.timeline-content h3 { font-family: "Space Grotesk"; font-size: 28px; letter-spacing: -.03em; margin: 14px 0 8px; }
.timeline-content p { color: var(--muted); margin: 0; }

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-card { min-height: 250px; border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--panel); }
.skill-card > span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font: 700 12px "Space Grotesk"; }
.skill-card h3 { font-family: "Space Grotesk"; font-size: 23px; letter-spacing: -.025em; margin: 72px 0 9px; }
.skill-card p { color: var(--muted); margin: 0; font-size: 14px; }

.principles { padding-top: 80px; padding-bottom: 80px; }
.quote-card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(140deg, color-mix(in srgb, var(--accent-3) 7%, var(--panel)), var(--panel)); padding: clamp(32px, 6vw, 72px); }
.quote-card blockquote { font-family: "Space Grotesk"; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.04em; margin: 22px 0; max-width: 1050px; }
.quote-card p { color: var(--muted); max-width: 670px; margin: 0; }

.contact-section { padding-top: 80px; }
.contact-card { display: grid; grid-template-columns: 1fr 330px; gap: 60px; align-items: end; border-radius: var(--radius-xl); padding: clamp(34px, 6vw, 72px); color: #07111f; background: linear-gradient(130deg, #74e4c3 0%, #9bd7ff 50%, #c1b4ff 100%); box-shadow: var(--shadow); }
.contact-card .kicker { color: rgba(7,17,31,.62); }
.contact-card h2 { font-size: clamp(38px, 5vw, 66px); margin-top: 14px; }
.contact-card p { max-width: 720px; color: rgba(7,17,31,.68); margin: 20px 0 0; }
.contact-actions { display: flex; flex-direction: column; gap: 11px; }
.contact-card .button-primary { background: #07111f; color: white; }
.contact-card .button-secondary { background: rgba(255,255,255,.35); border-color: rgba(7,17,31,.16); }
.contact-card .text-link { color: rgba(7,17,31,.7); text-align: center; }

.site-footer { display: flex; justify-content: space-between; gap: 30px; align-items: center; padding: 26px 0 44px; color: var(--muted); font-size: 12px; }
.site-footer > div { display: flex; flex-direction: column; }
.site-footer strong { color: var(--text); font-size: 13px; }
.site-footer p { margin: 0; }

.lightbox {
  width: min(94vw, 1240px);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-solid);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lightbox::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; background: #05090f; }
.lightbox p { margin: 0; padding: 14px 18px 18px; color: var(--muted); font-size: 13px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(0,0,0,.58); color: white; font-size: 25px; cursor: pointer; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 50px; min-height: auto; }
  .hero-copy { padding-top: 36px; }
  .hero-visual { width: min(720px, 96%); margin-inline: auto; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .smart-layout { grid-template-columns: 1fr; }
  .impact-card { position: static; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .section { padding: 84px 0; }
  .menu-toggle { display: block; margin-left: auto; }
  .nav { position: relative; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links > a { padding: 12px 14px; }
  .theme-toggle { width: 100%; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid { grid-template-columns: 1fr; }
  .project-featured { grid-row: auto; min-height: 430px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-wide { grid-column: auto; min-height: 360px; }
  .timeline-item { grid-template-columns: 1fr; gap: 9px; }
}

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .site-header { padding-top: 8px; }
  .brand-copy small { display: none; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: clamp(45px, 14vw, 68px); }
  .hero-lead { font-size: 16px; }
  .visual-card { transform: none; border-radius: 20px; }
  .visual-card img { min-height: 220px; }
  .floating-chip { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { border-right: 0; border-bottom: 1px solid var(--line); min-height: 100px; }
  .metrics article:last-child { border-bottom: 0; }
  .project-card { padding: 24px; min-height: 320px; }
  .project-featured { min-height: 420px; }
  .story-block { grid-template-columns: 42px 1fr; gap: 14px; }
  .gallery-heading { align-items: start; flex-direction: column; gap: 6px; }
  .gallery-item, .gallery-wide { min-height: 270px; }
  .gallery-item > span { flex-direction: column; align-items: start; gap: 4px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 210px; }
  .skill-card h3 { margin-top: 46px; }
  .contact-card { padding: 32px 24px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
