/* =========================================================
   Fonts
   ========================================================= */
@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #000000;
  --surface: #0d0d0f;
  --surface-2: #161618;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --line: rgba(255, 255, 255, 0.12);
  --ring: rgba(255, 255, 255, 0.4);
  --glow: 0 0 0 1px rgba(255,255,255,0.15), 0 0 22px rgba(255,255,255,0.32), 0 0 44px rgba(255,255,255,0.12);
  --glow-strong: 0 0 0 1px rgba(255,255,255,0.25), 0 0 30px rgba(255,255,255,0.46), 0 0 70px rgba(255,255,255,0.18);
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --header-top: clamp(16px, 2.4vh, 28px);
  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Faint dot grid behind everything below the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

body.menu-open { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

::selection { background: #fff; color: #000; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.nav-pill :focus-visible,
.mobile-menu :focus-visible { outline-color: #111; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 16px; }

/* =========================================================
   Motion primitives
   ========================================================= */
@keyframes reveal {
  from { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); }
}
@keyframes revealPulse {
  0%   { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); box-shadow: none; }
  60%  { opacity: 1; transform: none; filter: none; box-shadow: var(--glow-strong); }
}
@keyframes headlineFade {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-24px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}
@keyframes scrollCue {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(35px); opacity: 0; }
}
@keyframes overlayIn  { from { opacity: 0; } }
@keyframes overlayOut { to { opacity: 0; } }
@keyframes menuIn  { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
@keyframes menuOut { to { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@keyframes linkIn  { from { opacity: 0; transform: translateY(8px); } }

/* Hero entrance (plays on load). Final state = natural styles, so `backwards`
   keeps hover transforms working once the entrance is over. */
.anim { animation: reveal 0.85s var(--ease) var(--d, 0s) backwards; }

/* Section reveal (triggered by IntersectionObserver) */
.js .reveal:not(.is-in) { opacity: 0; }
.reveal.is-in { animation: reveal 0.85s var(--ease) var(--d, 0s) backwards; }

/* Decode effect glyph cells */
.glyph { display: inline-block; text-align: center; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  z-index: 50;
  width: calc(100% - 32px);
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  animation: slideDown 0.7s var(--ease) both;
}
.site-header > * { pointer-events: auto; }

.monogram {
  flex: none;
  width: clamp(40px, 4.4vw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  box-shadow: var(--nav-shadow);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.monogram:hover { transform: scale(1.04); }
.monogram:active { transform: scale(0.97); }

.nav-pill {
  position: relative;
  flex: 1 1 auto;
  max-width: 460px;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--nav-shadow);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav-link {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 clamp(8px, 1.4vw, 14px);
  border-radius: 999px;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  color: var(--nav-text);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.25s var(--ease);
}
.nav-link:hover { opacity: 0.75; }
.nav-link.is-active { opacity: 1; }

/* Single sliding three-dot indicator */
.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 3px;
  height: 3px;
  opacity: 0;
  pointer-events: none;
}
.nav-indicator.is-ready {
  opacity: 1;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.nav-indicator::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.cv-btn {
  flex: none;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 1.8vw, 20px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  box-shadow: var(--nav-shadow);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.cv-btn:hover { background: #323234; color: #fff; transform: translateY(-1px); }

/* Once past the hero: glassy pills + a slightly stronger shadow */
.site-header.is-scrolled .monogram,
.site-header.is-scrolled .nav-pill,
.site-header.is-scrolled .cv-btn {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
}
.site-header.is-scrolled .nav-pill { background: rgba(255, 255, 255, 0.86); }
.site-header.is-scrolled .cv-btn { background: rgba(40, 40, 42, 0.82); }
.site-header.is-scrolled .cv-btn:hover { background: rgba(50, 50, 52, 0.92); }

/* Burger (mobile only) */
.burger {
  display: none;
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pill-dark);
  box-shadow: var(--nav-shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s var(--ease);
}
.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  margin: -0.75px 0 0 -9px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.38s var(--ease), opacity 0.2s var(--ease), background-color 0.3s var(--ease);
}
.burger span:nth-child(1) { transform: translateY(-6.5px); }
.burger span:nth-child(3) { transform: translateY(6.5px); }
.burger[aria-expanded="true"] { background: #fff; }
.burger[aria-expanded="true"] span { background: #000; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(0) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(0) rotate(-45deg); }

/* Mobile menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.28s var(--ease) both;
}
.mobile-menu {
  position: fixed;
  z-index: 45;
  top: calc(var(--header-top) + 48px + 12px);
  left: 16px;
  right: 16px;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: #fff;
  color: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform-origin: top right;
  animation: menuIn 0.38s var(--ease) both;
}
.menu-overlay.is-closing { animation: overlayOut 0.2s ease-in forwards; }
.mobile-menu.is-closing  { animation: menuOut 0.2s ease-in forwards; }

.m-link {
  display: block;
  padding: 10px 10px 16px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  text-decoration: none;
  animation: linkIn 0.45s var(--ease) both;
  animation-delay: calc(90ms + var(--i, 0) * 50ms);
  -webkit-tap-highlight-color: transparent;
}
.m-link span { position: relative; display: inline-block; }
.m-link.is-active { opacity: 1; }
.m-link.is-active span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}
.m-cv {
  margin-top: 14px;
  height: 52px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  text-decoration: none;
  animation: linkIn 0.45s var(--ease) both;
  animation-delay: calc(90ms + var(--i, 0) * 50ms);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(88px, 11.5vh, 120px) var(--gutter) clamp(18px, 3vh, 30px);
  background: #000;
}
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  /* The source has heavy baked-in grain: a sub-pixel blur smooths it, the
     slight scale hides the blurred edge, saturation brings the pastels back */
  filter: blur(0.6px) saturate(1.12) contrast(1.03);
  transform: scale(1.01);
}
/* Darken only where the title sits + a soft edge vignette, then melt into
   the black sections — no grey veil over the whole scene */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 24% at 50% 44%, rgba(0, 0, 0, 0.34), transparent 75%),
    radial-gradient(130% 100% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(to bottom, transparent 55%, #000 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Profile photo */
.avatar {
  position: relative;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}
.avatar-ring {
  position: relative;
  z-index: 1;
  padding: 6px;
  border-radius: 50%;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
}
.avatar-photo {
  width: clamp(110px, min(14vw, 17vh), 150px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.6s var(--ease);
}
.avatar:hover .avatar-photo { filter: grayscale(0) contrast(1.05); }

.orbit {
  position: absolute;
  top: -16px;
  left: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  max-width: none;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.55));
  animation: spin 30s linear infinite;
}
.orbit circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 2.2;
  stroke-dasharray: 1 9;
  stroke-linecap: round;
}

.status {
  position: absolute;
  z-index: 2;
  left: calc(100% - 34px);
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: #c4c2c3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  animation: pulse 2s var(--ease) infinite;
}

/* Headline */
.headline {
  width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, min(6.2vw, 9.5vh), 80px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff;
}
.headline .line {
  display: block;
  white-space: nowrap;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.45), 0 2px 14px rgba(0, 0, 0, 0.45), 0 4px 44px rgba(0, 0, 0, 0.55);
  animation: headlineFade 0.85s var(--ease) backwards;
}
.headline .line-1 { animation-delay: 0.12s; }
.headline .line-2 { animation-delay: 0.3s; }

.subhead {
  max-width: min(520px, 92%);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6);
  margin: clamp(14px, 2.2vh, 22px) auto 0;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  line-height: 1.55;
  color: #d0d0d0;
  opacity: 0.8;
}

/* Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(20px, 3.2vh, 32px);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--glow-strong); }
.btn-primary.anim { animation-name: revealPulse; }
.btn-ghost {
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border: 1px solid var(--ring);
  font-weight: 500;
}
.btn-ghost:hover { background: #323234; color: #fff; transform: translateY(-2px); }

.icon-btn {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.icon-btn:hover {
  transform: translateY(-3px);
  background: #323234;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

/* Stats */
.stats {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin-top: clamp(20px, 3.5vh, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  text-align: center;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: var(--line);
}
.stat-icon {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.scroll-cue {
  position: relative;
  z-index: 2;
  flex: none;
  width: 1px;
  height: 40px;
  margin-top: clamp(12px, 2vh, 24px);
  background: rgba(255, 255, 255, 0.3);
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: scrollCue 1.8s var(--ease) infinite;
}

/* =========================================================
   Section system
   ========================================================= */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--gutter);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.section-index {
  flex: none;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  align-self: center;
  height: 1px;
  min-width: 24px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease) 0.25s;
}
.section-head.is-in .section-rule,
.no-js .section-rule { transform: scaleX(1); }

.mini-label {
  margin: 30px 0 12px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #c8c8c8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

/* =========================================================
   01 / About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.about-photo {
  position: relative;
  isolation: isolate;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--ring);
  background: var(--surface-2);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.6s var(--ease), transform 1.2s var(--ease);
}
.about-photo:hover img { filter: grayscale(0) contrast(1.05); transform: scale(1.03); }
.about-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1;
}

.about-bio p {
  margin: 0 0 16px;
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.7;
  color: #c8c8c8;
}
.about-bio p:first-child { color: #fff; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--ring);
  color: #e8e8e8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.skill:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.22);
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.lang-level { color: var(--muted); }

/* =========================================================
   Timelines (02 Education, 03 Experience)
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 36px;
}
/* top/height are set from the first and last node in main.js */
.tl-rail {
  position: absolute;
  left: 5px;
  top: 10px;
  height: calc(100% - 20px);
  width: 1px;
  background: var(--line);
}
.tl-fill {
  position: absolute;
  inset: 0;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}
.tl-item { position: relative; }
.tl-node {
  position: absolute;
  left: -36px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--ring);
  transition: box-shadow 0.5s var(--ease);
}
.tl-node.is-passed {
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(255, 255, 255, 0.85), 0 0 18px 5px rgba(255, 255, 255, 0.35);
}

/* Education entries */
.edu-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px 32px;
  padding-bottom: clamp(36px, 6vh, 56px);
}
.edu-item:last-child { padding-bottom: 0; }
.tl-years {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
  color: var(--muted);
  white-space: nowrap;
}
.edu-degree {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.edu-school { margin: 0; font-size: 15px; color: #c8c8c8; }
.edu-desc { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }

/* Experience rows */
.xp-item {
  scroll-margin-top: 96px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s var(--ease);
}
.xp-item:first-child { border-top: 1px solid var(--line); }
.xp-item:hover { background: rgba(255, 255, 255, 0.03); }
.xp-item .tl-node { top: 29px; }

.xp-head { margin: 0; font: inherit; }
.xp-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 36px;
  grid-template-areas: "dates main icon";
  align-items: start;
  gap: 4px 32px;
  padding: 22px 16px 22px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.xp-dates { grid-area: dates; padding-top: 4px; }
.xp-main { grid-area: main; display: flex; flex-direction: column; gap: 4px; }
.xp-title { font-size: 18px; font-weight: 600; line-height: 1.4; color: #fff; }
.xp-meta { font-size: 14.5px; color: #c8c8c8; }
.xp-icon {
  grid-area: icon;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  font-size: 13px;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.xp-icon i { transition: transform 0.5s var(--ease); }
.xp-toggle:hover .xp-icon { box-shadow: 0 0 16px rgba(255, 255, 255, 0.18); }
.xp-item.is-open .xp-icon { background: #fff; color: #000; }
.xp-item.is-open .xp-icon i { transform: rotate(135deg); }

.xp-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.xp-item.is-open .xp-body { grid-template-rows: 1fr; }
.xp-body-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.5s;
}
.xp-item.is-open .xp-body-inner {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease) 0.1s, visibility 0s;
}
.xp-content { padding: 0 68px 26px calc(190px + 32px); }
.xp-bullets { display: grid; gap: 8px; margin-bottom: 16px; }
.xp-bullets li {
  position: relative;
  padding-left: 18px;
  color: #c8c8c8;
  font-size: 15px;
  line-height: 1.6;
}
.xp-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

/* =========================================================
   04 / Certifications — flip badges
   ========================================================= */
.cert-grid {
  --gap: clamp(14px, 2vw, 22px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.cert {
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
  aspect-ratio: 1;
  perspective: 1000px;
}
.cert-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
}
@media (hover: hover) {
  .cert:hover .cert-inner { transform: rotateY(180deg); }
}
.cert:has(:focus-visible) .cert-inner,
.cert.is-flipped .cert-inner { transform: rotateY(180deg); }

.cert-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--ring);
  background: var(--surface);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.cert-back {
  transform: rotateY(180deg);
  background: var(--surface-2);
  gap: 4px;
}
.cert-num {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
}
.cert-hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}
.badge {
  padding: 7px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
}
.badge-inner {
  width: clamp(60px, 7vw, 76px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  font-size: clamp(22px, 2.4vw, 28px);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.18);
}
.cert-name { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.cert-issuer { margin: 0; font-size: 14px; color: var(--muted); }
.cert-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cert-date {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.cert-id {
  margin-bottom: 22px;
  font-size: 14px;
  color: #c8c8c8;
  overflow-wrap: anywhere;
}
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* Shine sweep across the front */
.cert-front::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
  transform: translateX(-100%);
}
@media (hover: hover) {
  .cert:hover .cert-front::after {
    transform: translateX(100%);
    transition: transform 0.9s var(--ease);
  }
}

/* =========================================================
   05 / Projets — featured rows + compact cards
   ========================================================= */
.features {
  display: grid;
  gap: clamp(72px, 11vh, 112px);
}

.feature {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head media" "body media";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 4.5vw, 56px);
  align-items: start;
}
/* Signature hover: the page's dot grid lights up around the cursor.
   `fixed` keeps these dots aligned with the body grid. */
.feature::before {
  content: "";
  position: absolute;
  inset: -48px -64px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
  -webkit-mask-image: radial-gradient(280px circle at calc(var(--gx, -999px) + 64px) calc(var(--gy, -999px) + 48px), #000, transparent 70%);
  mask-image: radial-gradient(280px circle at calc(var(--gx, -999px) + 64px) calc(var(--gy, -999px) + 48px), #000, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .feature:hover::before { opacity: 1; }
}

.feature-head { grid-area: head; }
.feature-media { grid-area: media; margin: 0; }
.feature-body { grid-area: body; }

.feature-meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.feature-dates {
  font-family: var(--font-display);
  font-size: 14px;
}
.feature-title {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  margin-top: 14px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: #c4c2c3;
  font-size: 12px;
  font-weight: 500;
}
.feature-pitch {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: #c8c8c8;
}
.feature-role {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #e8e8e8;
}
.feature-role span { color: var(--muted); }

.feature-proof {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.figure {
  flex: none;
  max-width: 150px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.figure-value {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.figure-label {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.facts {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.facts li {
  font-size: 14px;
  line-height: 1.45;
  color: #e0e0e0;
}
.feature-body .tags { margin-top: 20px; }
.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Screenshot in a browser frame — nothing is ever drawn over the image */
.shot {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ring);
  border-radius: 20px;
  background: var(--surface);
  text-align: left;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.4s var(--ease), transform 0.3s var(--ease);
}
.shot:focus-visible { outline-offset: 4px; }
.shot:active { transform: scale(0.99); }
.shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.shot-bar .status-dot { flex: none; width: 7px; height: 7px; }
.shot-url { overflow: hidden; text-overflow: ellipsis; }
.shot-view {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.shot-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s var(--ease);
}
.shot-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--ring);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
@media (hover: hover) {
  .shot:hover { border-color: rgba(255, 255, 255, 0.7); }
  .shot:hover img { transform: scale(1.02); }
  .shot:hover .shot-hint { opacity: 1; transform: none; }
}
.shot:focus-visible .shot-hint { opacity: 1; transform: none; }
@media (hover: none) {
  .shot-hint { opacity: 1; transform: none; }
}
.shot-caption {
  margin: 12px 2px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* The framed screenshot unveils top to bottom (no blur on large images).
   The clip sits on the children: a clipped target never "intersects". */
@keyframes clipIn { from { clip-path: inset(0 0 100% 0 round 20px); } to { clip-path: inset(0 round 20px); } }
@keyframes captionIn { from { opacity: 0; transform: translateY(6px); } }
.js .reveal-clip:not(.is-in) .shot { clip-path: inset(0 0 100% 0); }
.js .reveal-clip:not(.is-in) .shot-caption { opacity: 0; }
.reveal-clip.is-in .shot { animation: clipIn 0.9s var(--ease) calc(var(--d, 0s) + 0.12s) backwards; }
.reveal-clip.is-in .shot-caption { animation: captionIn 0.6s var(--ease) calc(var(--d, 0s) + 0.6s) backwards; }

/* Other projects */
.others-label { margin: clamp(88px, 13vh, 120px) 0 20px; }
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card.has-action:hover {
  transform: translateY(-2px);
  border-color: var(--ring);
}
.card-media {
  aspect-ratio: 8 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
/* Light or dark UIs sit inside the same dark band, like a window peeking up */
.card-media--shot { padding: 18px 18px 0; }
.card-media--shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.6s var(--ease);
  transform-origin: top center;
}
.card.has-action:hover .card-media--shot img { transform: scale(1.02); }
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
}
.card-meta {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.card-text {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: #c8c8c8;
}
.card-body .tags { margin-top: 16px; }
.card-action {
  align-self: flex-start;
  margin-top: auto;
  padding: 18px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
/* The whole card is the hit area */
.card-action::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
}
.card-action span { transition: transform 0.3s var(--ease); }
.card.has-action:hover .card-action span { transform: translateX(3px); }
.card.has-action:hover a.card-action span { transform: translateY(3px); }
.card-action:focus-visible { outline: none; }
.card-action:focus-visible::after { outline: 2px solid #fff; outline-offset: 3px; }

/* Architecture diagram for projects without public screenshots */
.schema {
  position: relative;
  isolation: isolate;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(14px, 5%, 32px);
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 14px 14px;
}
.schema-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}
.schema-lines path { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; }
.schema-lines circle { fill: #fff; }
.schema-from { display: flex; flex-direction: column; gap: 6px; }
.schema-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill-dark);
  color: #c8c8c8;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.schema-hub {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}
.schema-out {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.schema-out b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1;
}
.schema-out small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* Screenshot viewer */
.gallery {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.97);
  color: #fff;
  overscroll-behavior: contain;
}
.gallery[open] {
  display: flex;
  flex-direction: column;
  animation: galleryIn 0.24s var(--ease);
}
.gallery::backdrop { background: transparent; }
.gallery.is-closing { animation: galleryOut 0.16s ease-in forwards; }
@keyframes galleryIn  { from { opacity: 0; transform: scale(0.98); } }
@keyframes galleryOut { to { opacity: 0; transform: scale(0.98); } }
html.gallery-open { overflow: hidden; }

.gallery-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 8px;
}
.gallery-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-count {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
}
.gallery-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery-btn:hover { background: #323234; }
.gallery-btn:active { transform: scale(0.94); }
.gallery-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -4px; }
.gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 8px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.gallery-slide picture { display: contents; }
.gallery-slide img {
  width: auto;
  height: auto;
  max-width: min(100%, 1280px);
  max-height: calc(100% - 52px);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--ring);
  background: var(--surface);
}
.gallery-slide figcaption {
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
  color: #c8c8c8;
  text-align: center;
}
/* Phones see a readable crop; this opens the whole screenshot (pinch to zoom) */
.gallery-full {
  display: none;
  margin-top: 6px;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px var(--gutter) max(20px, env(safe-area-inset-bottom));
}

/* =========================================================
   06 / Contact
   ========================================================= */
.contact { text-align: center; }
.contact .section-head { text-align: left; }

.closing {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 110px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
}
.closing .line { display: block; white-space: nowrap; }

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: clamp(32px, 5vh, 52px);
  padding: 6px;
  border-radius: 999px;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.email-pill:hover { border-color: rgba(255, 255, 255, 0.7); box-shadow: 0 0 30px rgba(255, 255, 255, 0.12); }
.email-link {
  min-width: 0;
  padding: 0 14px 0 20px;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  flex: none;
  width: clamp(44px, 4.6vw, 52px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.copy-btn:hover { transform: scale(1.06); box-shadow: var(--glow-strong); }
.copy-btn:active { transform: scale(0.94); }

.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 5px;
  border-radius: 999px;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: var(--sign-in-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.social-pill:hover { transform: translateY(-2px); background: #323234; color: #fff; }
.social-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font-size: 14px;
}

.contact-form {
  max-width: 720px;
  margin: clamp(64px, 10vh, 104px) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
  text-align: left;
}
.form-intro {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: 400 16px/1.5 var(--font-sans);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover,
.field textarea:hover { border-bottom-color: rgba(255, 255, 255, 0.3); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: #fff;
  box-shadow: 0 1px 0 #fff;
}
.field input.is-invalid,
.field textarea.is-invalid { border-bottom-color: #ff6b6b; box-shadow: 0 1px 0 #ff6b6b; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

/* Footer */
.site-footer { padding: 0 var(--gutter); }
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #c8c8c8;
}
.footer-inner p { margin: 0; }
.footer-end { display: flex; align-items: center; gap: 16px; }
.footer-note { font-size: 12px; color: var(--muted); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--pill-dark);
  border: 1px solid var(--ring);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "media" "body";
    grid-template-rows: none;
    row-gap: 20px;
  }
  .feature-pitch { margin-top: 0; max-width: 60ch; }
}

@media (max-width: 960px) {
  .cert { flex-basis: calc((100% - var(--gap)) / 2); }
}

@media (max-height: 940px) {
  .scroll-cue { display: none; }
}

@media (max-width: 720px) {
  /* Phones show the video downscaled (less grain) and the title over the
     brightest band: skip the blur, darken a wider strip behind the title */
  .bg-video { filter: saturate(1.12) contrast(1.03); transform: none; }
  .hero::after {
    background:
      radial-gradient(ellipse 95% 20% at 50% 36%, rgba(0, 0, 0, 0.5), transparent 80%),
      radial-gradient(130% 100% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.42) 100%),
      linear-gradient(to bottom, transparent 55%, #000 100%);
  }
  .site-header { justify-content: space-between; }
  .nav-pill, .cv-btn { display: none; }
  .monogram { width: 48px; }
  .burger { display: block; }

  .headline { letter-spacing: -0.08em; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .stat:nth-child(3)::before { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 440px; }

  .edu-item { grid-template-columns: 1fr; gap: 6px; }

  .xp-toggle {
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-areas: "dates icon" "main icon";
    gap: 6px 16px;
    padding-right: 12px;
  }
  .xp-dates { padding-top: 0; }
  .xp-item .tl-node { top: 27px; }
  .xp-content { padding: 0 12px 24px 0; }

  .features { gap: 72px; }
  .feature { row-gap: 16px; }
  .feature::before { display: none; }
  .feature-title { font-size: 26px; }
  .shot { border-radius: 16px; }
  .shot-bar { height: 24px; padding: 0 12px; font-size: 11px; }
  .shot-view { aspect-ratio: 5 / 4; }
  .shot-hint { right: 10px; bottom: 10px; height: 32px; padding: 0 12px; font-size: 12px; }
  .shot-caption { margin-top: 10px; }
  .feature-pitch { font-size: 16px; }
  .feature-proof { flex-direction: column; align-items: flex-start; gap: 14px; }
  .figure { max-width: none; flex-direction: row; align-items: center; gap: 14px; }
  .figure-value { font-size: 36px; }
  .facts { padding-left: 0; border-left: 0; }
  .facts li { position: relative; padding-left: 16px; }
  .facts li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
  }
  .feature-actions .btn { flex: 1 1 0; height: 44px; }
  .others-label { margin-top: 72px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-media--shot { padding: 14px 14px 0; }
  .card-body { padding: 18px 18px 20px; }
  .gallery-slide figcaption { font-size: 13px; }
  .gallery-full { display: block; padding: 6px 0; }
  .gallery-slide img { border-radius: 12px; }

  .contact-form { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-end { width: 100%; justify-content: space-between; }
}

@media (min-width: 721px) {
  .mobile-menu, .menu-overlay { display: none !important; }
}

@media (max-width: 520px) {
  .cert { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .headline { letter-spacing: -0.09em; }
  .avatar-photo { width: 100px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .anim, .reveal.is-in, .headline .line, .site-header,
  .menu-overlay, .mobile-menu, .m-link, .m-cv { animation: none !important; }
  .orbit, .status-dot, .scroll-cue::after { animation: none; }
  .section-rule { transform: none; transition: none; }

  .reveal-clip.is-in .shot, .reveal-clip.is-in .shot-caption, .gallery[open], .gallery.is-closing { animation: none !important; }
  .feature::before { display: none; }

  /* No flips: back info is shown under the front */
  .cert { aspect-ratio: auto; perspective: none; }
  .cert-inner {
    transform: none !important;
    transition: none;
    overflow: hidden;
    border: 1px solid var(--ring);
    border-radius: 24px;
    background: var(--surface);
  }
  .cert-face {
    position: relative;
    inset: auto;
    transform: none;
    border: 0;
    border-radius: 0;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
  }
  .cert-front { padding-top: 44px; }
  .cert-back { border-top: 1px solid var(--line); }
  .cert-front::after, .cert-hint { display: none; }
}
