/* =================================================================
   Wadi Martinelli — Personal Site
   Design system: tech-forward dark, slate + cobalt→violet depth
   ================================================================= */

:root {
  /* --- Surfaces (dark slate, cool) --- */
  --bg-0: oklch(0.155 0.014 260);
  --bg-1: oklch(0.185 0.018 260);
  --bg-2: oklch(0.225 0.020 260);
  --bg-3: oklch(0.275 0.022 262);
  --line:  oklch(0.42 0.02 262 / 0.32);
  --line-soft: oklch(0.42 0.02 262 / 0.16);

  /* --- Text --- */
  --tx-hi:  oklch(0.97 0.004 260);
  --tx-mid: oklch(0.76 0.012 262);
  --tx-lo:  oklch(0.60 0.014 262);
  --tx-dim: oklch(0.50 0.016 262);

  /* --- Accents (same L/C, varied hue) --- */
  --cobalt: oklch(0.70 0.16 258);
  --cyan:   oklch(0.80 0.13 215);
  --violet: oklch(0.70 0.16 300);
  --mint:   oklch(0.80 0.13 165);
  --amber:  oklch(0.82 0.13 80);

  --accent: var(--cobalt);
  --grad: linear-gradient(120deg, var(--cobalt), var(--violet));
  --grad-soft: linear-gradient(120deg, oklch(0.70 0.16 258 / 0.16), oklch(0.70 0.16 300 / 0.16));

  /* --- Type --- */
  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Manrope", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;

  /* --- Geometry --- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);

  --shadow-1: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 12px 40px -16px oklch(0 0 0 / 0.7);
  --shadow-glow: 0 0 0 1px oklch(0.70 0.16 258 / 0.4), 0 18px 60px -20px oklch(0.70 0.16 258 / 0.5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--ff-body);
  background: var(--bg-0);
  color: var(--tx-mid);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  overflow-x: hidden;
}

::selection { background: oklch(0.70 0.16 258 / 0.4); color: var(--tx-hi); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* --- Ambient background field --- */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% 8%, oklch(0.70 0.16 300 / 0.14), transparent 70%),
    radial-gradient(55% 45% at 12% 22%, oklch(0.70 0.16 258 / 0.16), transparent 70%),
    radial-gradient(50% 50% at 50% 100%, oklch(0.80 0.13 215 / 0.08), transparent 70%),
    var(--bg-0);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(oklch(0.42 0.02 262 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.42 0.02 262 / 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, black, transparent 80%);
}
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
.bg-orb.a { width: 480px; height: 480px; background: oklch(0.70 0.16 258 / 0.5); top: -120px; left: -80px; animation: drift1 24s var(--ease) infinite alternate; }
.bg-orb.b { width: 420px; height: 420px; background: oklch(0.70 0.16 300 / 0.42); top: 30%; right: -120px; animation: drift2 28s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(80px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-90px, -80px) scale(1.1); } }

/* =================================================================
   Layout primitives
   ================================================================= */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
section { position: relative; padding-block: clamp(72px, 11vw, 150px); }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 {
  font-family: var(--ff-display);
  color: var(--tx-hi);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-top: 18px;
  text-wrap: balance;
}
.section-head p { margin-top: 18px; color: var(--tx-lo); font-size: clamp(16px, 2vw, 19px); }

.grad-text {
  background: linear-gradient(110deg, var(--cyan), var(--cobalt) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* =================================================================
   Navigation
   ================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: oklch(0.155 0.014 260 / 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi); letter-spacing: -0.01em; }
.brand .mono {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad); color: white;
  font-family: var(--ff-display); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 24px -8px oklch(0.70 0.16 258 / 0.8);
}
.brand .bn { font-size: 16px; }
.brand .bn small { display: block; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--tx-dim); font-weight: 400; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--tx-lo); padding: 8px 14px; border-radius: 9px;
  transition: color 0.2s, background 0.2s; position: relative;
}
.nav-links a:hover { color: var(--tx-hi); background: oklch(1 0 0 / 0.05); }
.nav-links a.active { color: var(--tx-hi); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; font-family: var(--ff-mono); font-size: 12px;
  background: oklch(1 0 0 / 0.02);
}
.lang-toggle button {
  border: none; background: transparent; color: var(--tx-lo); cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font-family: inherit; font-size: inherit;
  letter-spacing: 0.05em; transition: color 0.2s, background 0.3s var(--ease);
}
.lang-toggle button.on { background: var(--grad); color: white; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--ff-body); font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: white; box-shadow: 0 10px 30px -12px oklch(0.70 0.16 258 / 0.9); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px oklch(0.70 0.16 258 / 1); }
.btn-ghost { background: oklch(1 0 0 / 0.03); color: var(--tx-hi); border-color: var(--line); }
.btn-ghost:hover { background: oklch(1 0 0 / 0.07); border-color: oklch(0.70 0.16 258 / 0.5); transform: translateY(-2px); }

.nav-toggle { display: none; }

/* =================================================================
   Hero
   ================================================================= */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; width: 100%;
}
.hero-status {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--ff-mono);
  font-size: 12px; letter-spacing: 0.1em; color: var(--tx-mid);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  background: oklch(1 0 0 / 0.02);
}
.hero-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 oklch(0.80 0.13 165 / 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.80 0.13 165 / 0.5); } 70% { box-shadow: 0 0 0 8px oklch(0.80 0.13 165 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.80 0.13 165 / 0); } }

.hero h1 {
  font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi);
  font-size: clamp(40px, 7.2vw, 86px); line-height: 0.98; letter-spacing: -0.03em;
  margin: 26px 0 0; text-wrap: balance;
}
.hero h1 .role { display: block; }
.hero-sub { margin-top: 26px; max-width: 540px; font-size: clamp(16px, 2vw, 19px); color: var(--tx-mid); }
.hero-tagline {
  margin-top: 30px; padding-left: 22px; border-left: 2px solid; border-image: var(--grad) 1;
  font-family: var(--ff-display); font-style: italic; font-size: clamp(16px, 2vw, 20px);
  color: var(--tx-mid); max-width: 560px; line-height: 1.45;
}
.hero-cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-photo { position: relative; justify-self: center; }
.hero-photo .frame {
  position: relative; width: clamp(260px, 32vw, 400px); aspect-ratio: 1; border-radius: var(--r-xl);
  overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 40px 100px -30px oklch(0 0 0 / 0.9), 0 0 0 1px oklch(1 0 0 / 0.04) inset;
}
.hero-photo .frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.02) contrast(1.02); }
.hero-photo .frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, oklch(0.155 0.014 260 / 0.55));
  mix-blend-mode: multiply;
}
.hero-photo .glow {
  position: absolute; inset: -30px; border-radius: var(--r-xl); z-index: -1;
  background: var(--grad); filter: blur(50px); opacity: 0.4;
}
.hero-photo .chip {
  position: absolute; z-index: 3; background: oklch(0.185 0.018 260 / 0.86); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 15px;
  display: flex; align-items: center; gap: 11px; box-shadow: var(--shadow-1);
}
.hero-photo .chip .k { font-family: var(--ff-display); font-weight: 700; font-size: 22px; color: var(--tx-hi); line-height: 1; }
.hero-photo .chip .l { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--tx-lo); text-transform: uppercase; }
.hero-photo .chip.c1 { bottom: 22px; left: -34px; animation: float1 6s ease-in-out infinite; }
.hero-photo .chip.c2 { top: 30px; right: -30px; animation: float2 7s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translateY(-12px); } }
@keyframes float2 { 50% { transform: translateY(10px); } }

.hero-marquee {
  margin-top: clamp(48px, 7vw, 84px); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding-block: 18px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track { display: flex; gap: 44px; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.12em; color: var(--tx-dim); text-transform: uppercase; display: inline-flex; align-items: center; gap: 44px; }
.marquee-track span::after { content: "◆"; color: var(--accent); font-size: 8px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =================================================================
   Reveal animation utility
   ================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.40s; }

/* =================================================================
   About
   ================================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.about-lead { font-family: var(--ff-display); font-weight: 400; font-size: clamp(22px, 3vw, 32px); line-height: 1.3; color: var(--tx-hi); letter-spacing: -0.01em; text-wrap: pretty; }
.about-lead b { font-weight: 600; }
.about-body p { color: var(--tx-lo); margin-bottom: 18px; }
.about-body p:last-child { margin-bottom: 0; }
.about-facts { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fact { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: oklch(1 0 0 / 0.015); }
.fact .l { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-dim); }
.fact .v { margin-top: 6px; color: var(--tx-hi); font-weight: 600; font-size: 15px; }

/* =================================================================
   Metrics / Impact
   ================================================================= */
.metrics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.metric--lg { grid-column: span 3; padding: clamp(34px, 4vw, 46px) clamp(30px, 3.4vw, 40px); display: flex; flex-direction: column; }
.metric--sm { grid-column: span 2; }
.metric--lg .num { font-size: clamp(52px, 7vw, 88px); }
.metric--lg .lab { font-size: clamp(15px, 1.5vw, 18px); margin-top: auto; }
.metric--lg .num + .lab { margin-top: 22px; }
.metric {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 26px; background: linear-gradient(180deg, oklch(1 0 0 / 0.03), oklch(1 0 0 / 0.005));
  overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.metric::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(80% 80% at 50% 0%, oklch(0.70 0.16 258 / 0.16), transparent 70%);
}
.metric:hover { transform: translateY(-5px); border-color: oklch(0.70 0.16 258 / 0.5); box-shadow: 0 24px 60px -24px oklch(0.70 0.16 258 / 0.5); }
.metric:hover::before { opacity: 1; }
.metric .num { font-family: var(--ff-display); font-weight: 700; font-size: clamp(36px, 4.6vw, 56px); line-height: 1; letter-spacing: -0.03em; color: var(--tx-hi); }
.metric .num .suf { -webkit-text-fill-color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.metric .lab { margin-top: 14px; color: var(--tx-mid); font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.metric .tag { margin-top: 10px; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx-dim); }

/* =================================================================
   Experience timeline
   ================================================================= */
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; }
.tl-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px;
  background: oklch(1 0 0 / 0.015); transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
  position: relative;
}
.tl-item:hover { border-color: oklch(0.70 0.16 258 / 0.45); background: oklch(1 0 0 / 0.03); }
.tl-meta .period { font-family: var(--ff-mono); font-size: 12.5px; color: var(--accent); letter-spacing: 0.04em; }
.tl-meta .dur { margin-top: 6px; font-family: var(--ff-mono); font-size: 11px; color: var(--tx-dim); letter-spacing: 0.05em; }
.tl-meta .co { margin-top: 14px; color: var(--tx-hi); font-weight: 600; font-size: 16px; }
.tl-meta .loc { margin-top: 3px; font-size: 13px; color: var(--tx-lo); }
.tl-body h3 { font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi); font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.01em; }
.tl-body .summary { margin-top: 10px; color: var(--tx-mid); font-size: 15.5px; }
.tl-points { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.tl-points li { list-style: none; position: relative; padding-left: 20px; color: var(--tx-lo); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }
.tl-points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.tl-points li b { color: var(--tx-hi); font-weight: 600; }
.tl-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-tags span { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--tx-lo); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px 11px; }

/* =================================================================
   Skills & tools
   ================================================================= */
.ai-banner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  border: 1px solid oklch(0.70 0.16 300 / 0.35); border-radius: var(--r-xl); padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(70% 120% at 100% 0%, oklch(0.70 0.16 300 / 0.16), transparent 60%),
    radial-gradient(70% 120% at 0% 100%, oklch(0.70 0.16 258 / 0.14), transparent 60%),
    oklch(1 0 0 / 0.02);
  margin-bottom: 28px; position: relative; overflow: hidden;
}
.ai-banner h3 { font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi); font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.1; }
.ai-banner p { margin-top: 16px; color: var(--tx-lo); font-size: 16px; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-tool {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; background: oklch(0.155 0.014 260 / 0.5); transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.ai-tool:hover { transform: translateY(-3px); border-color: oklch(0.70 0.16 300 / 0.6); background: oklch(0.70 0.16 300 / 0.08); }
.ai-tool .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--grad-soft); font-size: 15px; }
.ai-tool .nm { color: var(--tx-hi); font-weight: 600; font-size: 14px; line-height: 1.1; }
.ai-tool .nm small { display: block; font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--tx-dim); text-transform: uppercase; font-weight: 400; margin-top: 2px; }

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.skill-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; background: oklch(1 0 0 / 0.015); }
.skill-card h4 { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.skill-card h4 .n { color: var(--tx-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-s {
  font-size: 13.5px; color: var(--tx-mid); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; background: oklch(1 0 0 / 0.02); transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.chip-s:hover { color: var(--tx-hi); border-color: oklch(0.70 0.16 258 / 0.5); background: oklch(0.70 0.16 258 / 0.08); transform: translateY(-2px); }

/* =================================================================
   Certifications & languages
   ================================================================= */
.cert-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 4vw, 48px); align-items: start; }
.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert {
  display: flex; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 22px; background: oklch(1 0 0 / 0.015); transition: border-color 0.3s, transform 0.3s var(--ease);
}
.cert:hover { border-color: oklch(0.70 0.16 258 / 0.45); transform: translateX(4px); }
.cert .yr { font-family: var(--ff-mono); font-size: 12px; color: var(--accent); flex: none; width: 48px; }
.cert .nm { color: var(--tx-hi); font-weight: 600; font-size: 15.5px; }
.cert .nm small { display: block; color: var(--tx-lo); font-weight: 400; font-size: 13px; margin-top: 2px; font-family: var(--ff-body); }
.cert .score { margin-left: auto; font-family: var(--ff-mono); font-size: 13px; color: var(--tx-mid); border: 1px solid var(--line-soft); border-radius: 8px; padding: 5px 10px; flex: none; }

.lang-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; background: oklch(1 0 0 / 0.015); }
.lang-card h4 { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.lang { margin-bottom: 22px; }
.lang:last-child { margin-bottom: 0; }
.lang .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.lang .top .nm { color: var(--tx-hi); font-weight: 600; font-size: 15px; }
.lang .top .lvl { font-family: var(--ff-mono); font-size: 11.5px; color: var(--tx-lo); letter-spacing: 0.04em; }
.lang .bar { height: 6px; border-radius: 999px; background: oklch(1 0 0 / 0.06); overflow: hidden; }
.lang .bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); width: 0; transition: width 1.2s var(--ease); }

.edu-note { margin-top: 24px; border: 1px dashed var(--line); border-radius: var(--r-md); padding: 18px 22px; }
.edu-note .l { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx-dim); }
.edu-note .v { margin-top: 8px; color: var(--tx-hi); font-weight: 600; font-size: 15px; }
.edu-note .v small { display: block; color: var(--tx-lo); font-weight: 400; font-size: 13px; margin-top: 3px; }

/* =================================================================
   Hobbies
   ================================================================= */
.hobbies-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hobby {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 22px;
  background: oklch(1 0 0 / 0.015); overflow: hidden; min-height: 130px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.hobby:hover { transform: translateY(-5px); border-color: oklch(0.70 0.16 258 / 0.45); background: oklch(1 0 0 / 0.03); }
.hobby .ico { font-size: 26px; line-height: 1; filter: saturate(1.1); align-self: flex-start; transform-origin: center; }
.hobby .nm { color: var(--tx-hi); font-weight: 600; font-size: 16px; margin-top: auto; }
.hobby .nm small { display: block; color: var(--tx-lo); font-weight: 400; font-size: 13px; margin-top: 4px; line-height: 1.4; }
.hobby.feature { grid-column: span 2; min-height: 130px; background: var(--grad-soft); border-color: oklch(0.70 0.16 258 / 0.3); }
.hobby.wide { grid-column: span 2; }

/* =================================================================
   Contact
   ================================================================= */
.contact-card {
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(36px, 6vw, 72px);
  background:
    radial-gradient(80% 140% at 0% 0%, oklch(0.70 0.16 258 / 0.14), transparent 55%),
    radial-gradient(80% 140% at 100% 100%, oklch(0.70 0.16 300 / 0.12), transparent 55%),
    oklch(1 0 0 / 0.02);
  text-align: center; position: relative; overflow: hidden;
}
.contact-card h2 { font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi); font-size: clamp(32px, 5.5vw, 60px); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.contact-card p { margin: 20px auto 0; max-width: 540px; color: var(--tx-lo); font-size: 17px; }
.reveal-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.reveal-btn {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; padding: 15px 22px; background: oklch(0.155 0.014 260 / 0.5);
  color: var(--tx-mid); font-family: var(--ff-body); font-size: 15px; transition: border-color 0.3s, transform 0.3s var(--ease), color 0.3s, background 0.3s;
  text-align: left;
}
.reveal-btn:hover { border-color: oklch(0.70 0.16 258 / 0.6); transform: translateY(-3px); color: var(--tx-hi); background: oklch(0.70 0.16 258 / 0.06); }
.reveal-btn .ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); }
.reveal-btn .ico svg { width: 19px; height: 19px; color: var(--tx-hi); }
.reveal-btn .tx { display: flex; flex-direction: column; line-height: 1.25; }
.reveal-btn .tx .k { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-dim); }
.reveal-btn .tx .v { font-weight: 600; font-size: 15px; color: var(--tx-hi); }
.reveal-btn.revealed { border-color: oklch(0.80 0.13 165 / 0.5); }

/* =================================================================
   Footer
   ================================================================= */
.footer { padding-block: 48px; border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.footer .meta { font-family: var(--ff-mono); font-size: 12px; color: var(--tx-dim); letter-spacing: 0.04em; }
.footer .meta a:hover { color: var(--tx-mid); }
.back-top { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--tx-lo); cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; background: transparent; transition: color 0.2s, border-color 0.2s; }
.back-top:hover { color: var(--tx-hi); border-color: var(--accent); }

/* =================================================================
   ░░ CINEMATIC ENHANCEMENT LAYER ░░
   ================================================================= */
.progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 200; background: var(--grad); width: 0; box-shadow: 0 0 12px oklch(0.70 0.16 258 / 0.8); }

@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* Bricolage display tuning */
h1, h2, h3, .brand, .ai-banner h3, .contact-card h2 { font-optical-sizing: auto; }

/* ---------- Cursor glow (sits behind content) ---------- */
.cursor-glow {
  position: fixed; width: 520px; height: 520px; left: 0; top: 0; z-index: -1;
  transform: translate3d(-50%, -50%, 0); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, oklch(0.70 0.16 270 / 0.16), transparent 62%);
  opacity: 0; transition: opacity 0.6s var(--ease); will-change: transform;
}
.cursor-glow.on { opacity: 1; }
@media (hover: none) { .cursor-glow { display: none; } }

/* ---------- Spotlight (cursor-tracking light on cards) ---------- */
.spotlight { position: relative; }
.spotlight::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), oklch(0.82 0.13 220 / 0.16), transparent 60%);
  opacity: 0; transition: opacity 0.45s var(--ease); pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* ---------- Magnetic + tilt ---------- */
.magnetic { will-change: transform; }
.tilt { perspective: 1100px; }
.tilt-inner { transition: transform 0.4s var(--ease); transform-style: preserve-3d; will-change: transform; }
.frame-shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: overlay;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), oklch(1 0 0 / 0.35), transparent 55%);
  transition: opacity 0.4s var(--ease);
}
.tilt:hover .frame-shine { opacity: 1; }

/* ---------- Hero headline: char reveal + rotator ---------- */
.hero h1 { perspective: 800px; }
.split { display: block; }
.split .char {
  display: inline-block; opacity: 0; transform: translateY(0.55em) rotateX(-55deg);
  transition: opacity 0.55s var(--ease), transform 0.6s var(--ease); will-change: transform, opacity;
}
.split .char.sp { width: 0.28em; }
.split.show .char { opacity: 1; transform: none; }

.rotator { display: block; min-height: 1.2em; line-height: 1.1; position: relative; padding-bottom: 0.08em; }
.rot-word {
  display: inline-block; line-height: 1.12; padding-bottom: 0.08em; transition: opacity 0.5s var(--ease), transform 0.55s var(--ease), filter 0.55s var(--ease); will-change: transform, opacity;
  background: linear-gradient(110deg, var(--cyan), var(--cobalt) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.rot-word.out { opacity: 0; transform: translateY(-0.45em) skewY(3deg); filter: blur(4px); }
.rot-word.pre { opacity: 0; transform: translateY(0.5em) skewY(-3deg); filter: blur(4px); }

/* ---------- PILLARS ---------- */
.pillars-section { padding-top: clamp(40px, 6vw, 80px); }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 30px 30px; overflow: hidden;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.035), oklch(1 0 0 / 0.005));
  transition: transform 0.5s var(--ease), border-color 0.5s;
}
.pillar::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); transition: width 0.55s var(--ease); z-index: 2; }
.pillar:hover { transform: translateY(-7px); border-color: oklch(0.70 0.16 258 / 0.5); }
.pillar:hover::before { width: 100%; }
.pillar-ix { font-family: var(--ff-mono); font-size: 12px; color: var(--tx-dim); letter-spacing: 0.22em; }
.pillar-ico {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; margin: 20px 0 20px;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--tx-hi);
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.pillar-ico svg { width: 27px; height: 27px; }
.pillar:hover .pillar-ico { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 36px -14px oklch(0.70 0.16 270 / 0.8); }
.pillar h3 { font-family: var(--ff-display); font-weight: 600; color: var(--tx-hi); font-size: clamp(20px, 2.3vw, 25px); letter-spacing: -0.01em; }
.pillar p { margin-top: 11px; color: var(--tx-lo); font-size: 15px; text-wrap: pretty; }

/* ---------- ABOUT signature index ---------- */
.section-head .ix {
  font-family: var(--ff-mono); font-size: 12px; color: var(--tx-dim);
  letter-spacing: 0.2em; display: block; margin-bottom: 14px;
}

/* ---------- Animated section-head underline ---------- */
.section-head h2 { position: relative; }

/* ---------- Metric counter pop ---------- */
.metric .num { transition: transform 0.5s var(--ease); }
.metric:hover .num { transform: scale(1.04); transform-origin: left; }

/* ---------- EXPERIENCE: scroll-fill spine + nodes ---------- */
.timeline { padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: oklch(1 0 0 / 0.08); border-radius: 2px; }
.tl-fill { position: absolute; left: 11px; top: 8px; width: 2px; height: 0; border-radius: 2px; background: linear-gradient(var(--cyan), var(--cobalt), var(--violet)); box-shadow: 0 0 14px oklch(0.70 0.16 258 / 0.9); z-index: 1; }
.tl-item::before {
  content: ""; position: absolute; left: -36px; top: 32px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid var(--cobalt); box-shadow: 0 0 0 5px var(--bg-0); transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
  z-index: 2;
}
.tl-item:hover::before { background: var(--cobalt); transform: scale(1.15); box-shadow: 0 0 0 5px var(--bg-0), 0 0 18px oklch(0.70 0.16 258 / 0.9); }

/* ---------- AI BANNER: animated conic border + orbit ---------- */
.ai-banner::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 0;
  background: conic-gradient(from var(--ang), oklch(0.70 0.16 258 / 0.9), oklch(0.70 0.16 300 / 0.9), oklch(0.80 0.13 215 / 0.9), oklch(0.70 0.16 258 / 0.9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.55;
  animation: spin-ang 9s linear infinite;
}
@keyframes spin-ang { to { --ang: 360deg; } }
.ai-banner > * { position: relative; z-index: 1; }
.ai-tool { position: relative; overflow: hidden; }
.ai-tool .ico { background: var(--grad-soft); transition: transform 0.4s var(--ease); }
.ai-tool:hover .ico { transform: rotate(-8deg) scale(1.1); }
.ai-tool .nm small { display: block; font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--tx-dim); text-transform: uppercase; font-weight: 400; margin-top: 3px; }

/* ---------- LANGUAGE RINGS ---------- */
.lang-rings { display: flex; flex-direction: column; gap: 14px; }
.ring { display: flex; align-items: center; gap: 18px; }
.ring-dial {
  --p: 0; flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--bg-1) 78%, transparent 79% 100%),
    conic-gradient(oklch(0.74 0.15 var(--ring-h)) calc(var(--p) * 1%), oklch(1 0 0 / 0.07) 0);
  transition: --p 1.3s var(--ease);
}
@property --p { syntax: "<number>"; initial-value: 0; inherits: false; }
.ring-num { font-family: var(--ff-display); font-weight: 700; font-size: 18px; color: var(--tx-hi); }
.ring-meta .nm { color: var(--tx-hi); font-weight: 600; font-size: 16px; }
.ring-meta .lvl { display: block; font-family: var(--ff-mono); font-size: 11.5px; color: var(--tx-lo); margin-top: 3px; }

/* ---------- BEYOND feature card animated gradient ---------- */
.hobby.feature { position: relative; }
.hobby.feature::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.9;
  background: linear-gradient(120deg, oklch(0.70 0.16 258 / 0.22), oklch(0.70 0.16 300 / 0.18), oklch(0.80 0.13 215 / 0.16));
  background-size: 200% 200%; animation: gradShift 10s ease infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hobby .ico { transition: transform 0.4s var(--ease); }
.hobby:hover .ico { transform: scale(1.18) translateY(-2px); }

/* ---------- CONTACT animated ring ---------- */
.contact-card::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; z-index: 0;
  background: conic-gradient(from var(--ang), transparent, oklch(0.70 0.16 258 / 0.7), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: spin-ang 12s linear infinite; opacity: 0.6;
}
.contact-card > * { position: relative; z-index: 1; }

/* ---------- nav brand mark spin on hover ---------- */
.brand .mono { transition: transform 0.5s var(--ease); }
.brand:hover .mono { transform: rotate(8deg) scale(1.05); }

/* ---------- scroll-cue ---------- */
.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tx-dim);
}
.scroll-cue .line { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.scroll-cue .line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--tx-hi); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { top: -50%; } 100% { top: 100%; } }

@media (max-width: 1000px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-banner::before, .contact-card::after, .hobby.feature::before, .bg-orb, .scroll-cue .line::after { animation: none !important; }
}

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric--lg, .metric--sm { grid-column: span 1; }
  .metric--lg { grid-column: span 2; }
  .ai-banner { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .hobbies-grid { grid-template-columns: repeat(3, 1fr); }
  .tl-item { grid-template-columns: 1fr; gap: 18px; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric--lg, .metric--sm { grid-column: span 1; }
  .metric--lg { grid-column: span 2; }
  .metric--lg .num { font-size: clamp(44px, 12vw, 64px); }
  .hobbies-grid { grid-template-columns: 1fr 1fr; }
  .about-facts { grid-template-columns: 1fr; }
  .hobby.feature, .hobby.wide { grid-column: span 2; }
  .hero-photo .chip.c1 { left: -10px; }
  .hero-photo .chip.c2 { right: -8px; }
  .lang-toggle { display: none; }
  .nav .btn-ghost { display: none; }
}

/* =================================================================
   ░░ CINEMATIC LAYER v2 — atmosphere, chapter-rail, parallax ░░
   ================================================================= */

/* ---------- Film grain + vignette atmosphere ---------- */
.vignette {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(125% 105% at 50% 42%, transparent 56%, oklch(0.08 0.01 260 / 0.55) 100%);
}
.grain {
  position: fixed; inset: -120% ; z-index: 81; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.7s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(-3%, 2%, 0); }
  50% { transform: translate3d(2%, -2%, 0); }
  75% { transform: translate3d(-2%, -1%, 0); }
  100% { transform: translate3d(1%, 2%, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- Chapter scroll-rail (left edge) ---------- */
.crail {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 16px;
  opacity: 0; transition: opacity 0.6s var(--ease) 0.4s;
}
.crail.ready { opacity: 1; }
.crail-item {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: none; border: none; padding: 2px 0; color: var(--tx-dim);
  font-family: var(--ff-mono); transition: color 0.35s var(--ease);
}
.crail-num { font-size: 10px; letter-spacing: 0.14em; width: 16px; text-align: right; opacity: 0.55; transition: opacity 0.35s; }
.crail-tick { width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: width 0.45s var(--ease), background 0.45s, box-shadow 0.45s; }
.crail-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateX(-8px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.crail-item:hover { color: var(--tx-mid); }
.crail-item:hover .crail-label { opacity: 1; transform: none; }
.crail-item.on { color: var(--tx-hi); }
.crail-item.on .crail-num { opacity: 1; }
.crail-item.on .crail-tick { width: 26px; background: var(--accent); box-shadow: 0 0 12px oklch(0.70 0.16 258 / 0.9); }
@media (max-width: 1320px) { .crail-label { display: none; } }
@media (max-width: 1180px) { .crail { display: none; } }

/* ---------- Cinematic blur-in for section heads ---------- */
.section-head.reveal {
  filter: blur(12px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}
.section-head.reveal.in { filter: blur(0); }

/* ---------- Scramble / decode text ---------- */
.scrambling { color: var(--accent); }

/* ---------- Nav link animated underline ---------- */
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 1.5px;
  background: var(--grad); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.34s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a:hover { background: transparent; }

/* ---------- Hero parallax + scroll cue placement ---------- */
.hero-photo { transform: translate3d(0, var(--par, 0px), 0); will-change: transform; }
.hero { position: relative; }
.scroll-cue { cursor: pointer; transition: opacity 0.5s var(--ease); }
.scroll-cue:hover { color: var(--tx-mid); }
.scroll-cue.gone { opacity: 0; pointer-events: none; }

/* ---------- Metric feature tile flourish ---------- */
.metric--lg::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: var(--grad-soft); filter: blur(28px); opacity: 0.5;
  pointer-events: none; transition: opacity 0.5s, transform 0.6s var(--ease);
}
.metric--lg:hover::after { opacity: 0.85; transform: scale(1.15); }

@media (max-width: 1180px) {
  .section-head.reveal { filter: none; }
}
