@font-face {
  font-family: "Orbitron Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("./fonts/orbitron-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: dark;
  --theme-h: 215;
  --theme-s: 60%;
  --theme-l: 55%;
  --theme-primary: hsl(var(--theme-h) var(--theme-s) var(--theme-l));
  --theme-secondary: hsl(calc(var(--theme-h) + 30) var(--theme-s) var(--theme-l));
  --glow: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3);
  --glow-strong: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.5);
  --bg: #09090b;
  --card-bg: rgb(255 255 255 / 0.03);
  --surface-strong: rgb(9 9 11 / 0.88);
  --text: #e0e0e0;
  --muted: #a1a1aa;
  --line: rgb(255 255 255 / 0.08);
  --max: 1200px;
  --font-heading: "Orbitron Variable", "Noto Sans SC Variable", sans-serif;
  --font-body: "Noto Sans SC Variable", system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", "Noto Sans SC Variable", monospace;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
html { max-width: 100vw; scroll-behavior: smooth; scroll-padding-top: 92px; }
body { position: relative; isolation: isolate; min-height: 100vh; max-width: 100vw; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; }
body::before { content: ""; position: fixed; z-index: -3; inset: 0; background-image: var(--site-background-image); background-position: var(--site-background-position, center); background-size: cover; opacity: var(--site-background-opacity, 0); pointer-events: none; }
::selection { background: rgb(255 255 255 / 0.2); color: #fff; }
h1, h2, h3, .brand { font-family: var(--font-heading); }
a { color: inherit; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2000; top: -80px; left: 16px; padding: 12px 16px; background: #fff; color: #09090b; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--theme-primary); outline-offset: 3px; }

#particleCanvas { position: fixed; z-index: -2; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scan-lines { position: fixed; z-index: 800; inset: 0; background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.03) 0 1px, transparent 1px 2px); pointer-events: none; }
.mouse-follower, .mouse-follower-dot { position: fixed; z-index: 1500; top: 0; left: 0; border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform; }
.mouse-follower { width: 32px; height: 32px; border: 1px solid rgb(255 255 255 / 0.5); mix-blend-mode: difference; transition: opacity 0.2s; }
.mouse-follower-dot { width: 6px; height: 6px; background: #fff; transition: opacity 0.2s; }
.scroll-progress { position: fixed; z-index: 1800; inset: 0 auto auto 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); box-shadow: 0 0 10px var(--theme-primary); transform: scaleX(0); transform-origin: left; }

/* One DOM: v12-like wide header becomes the centered floating glass island. */
.island { position: fixed; z-index: 1000; top: max(8px, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 32px), 1200px); transform: translateX(-50%); border: 1px solid transparent; border-radius: 999px; background: transparent; transition: top 0.3s, width 0.42s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.island[data-compact] { top: max(16px, env(safe-area-inset-top)); width: min(calc(100% - 24px), 850px); border-color: var(--line); background: rgb(9 9 11 / 0.72); box-shadow: 0 0 30px rgb(0 0 0 / 0.5), inset 0 1px rgb(255 255 255 / 0.08); backdrop-filter: blur(20px) saturate(150%); }
.island-row { display: flex; min-width: 0; min-height: 64px; align-items: center; gap: 12px; padding: 7px 10px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; margin-right: auto; padding: 8px; color: #fff; font-size: 1rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark { color: var(--theme-primary); filter: drop-shadow(0 0 8px var(--glow)); transition: filter 0.3s, color 0.4s; }
.brand:hover .brand-mark { filter: drop-shadow(0 0 12px var(--glow-strong)); }
.desktop-links { display: none; align-items: center; gap: 10px; }
.desktop-links a { position: relative; display: inline-flex; min-height: 44px; align-items: center; padding: 10px 8px; color: rgb(255 255 255 / 0.7); font-size: 0.85rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.desktop-links a::after { content: ""; position: absolute; right: 8px; bottom: 6px; left: 8px; height: 2px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.3s; }
.desktop-links a:hover { color: #fff; }
.desktop-links a:hover::after { transform: scaleX(1); }
.control-group { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / 0.03); }
.control-group button, .menu-button { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; }
.control-group button[aria-pressed="true"] { border: 1px solid hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3); background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); color: #fff; box-shadow: 0 0 10px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.1); }
.menu-button { display: grid; flex-shrink: 0; place-content: center; gap: 4px; border: 1px solid var(--line); }
.menu-button span { display: block; width: 20px; height: 1px; background: #fff; transition: transform 0.25s, opacity 0.25s; }
.menu-button[aria-expanded="true"] span:first-child { transform: translateY(5px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:last-child { transform: translateY(-5px) rotate(-45deg); }
.mobile-menu { position: absolute; top: calc(100% + 10px); right: 0; display: none; width: min(320px, calc(100vw - 24px)); padding: 10px; grid-template-columns: 1fr 1fr; gap: 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-strong); box-shadow: 0 18px 50px rgb(0 0 0 / 0.55); backdrop-filter: blur(24px); }
.mobile-menu[data-open] { display: grid; }
.mobile-menu a { display: grid; min-height: 48px; place-items: center; padding: 10px; border-radius: 12px; background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.1); text-align: center; text-decoration: none; }
.mobile-language { grid-column: 1 / -1; display: flex; }
.mobile-language button { flex: 1; }

.palette-selector { position: fixed; z-index: 1100; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgb(9 9 11 / 0.72); box-shadow: 0 12px 36px rgb(0 0 0 / 0.5); backdrop-filter: blur(20px); }
.palette-selector button { display: grid; min-width: 44px; min-height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.palette-selector span { width: 18px; height: 18px; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 10px color-mix(in srgb, var(--swatch) 55%, transparent); transition: transform 0.2s, border-color 0.2s; }
.palette-selector button[aria-pressed="true"] span { border-color: #fff; transform: scale(1.2); }

.hero { position: relative; display: flex; min-height: 100vh; align-items: center; justify-content: center; overflow: hidden; padding: 6rem 0 4rem; }
.hero-content { position: relative; z-index: 3; max-width: 900px; text-align: center; }
.hero-blob, .cta-glow { position: absolute; border-radius: 50%; opacity: 0.15; filter: blur(80px); pointer-events: none; }
.hero-blob { animation: blob-float 10s infinite; }
.blob-1 { top: 10%; left: 10%; width: 500px; height: 500px; background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary)); }
.blob-2 { top: 50%; right: 10%; width: 400px; height: 400px; background: linear-gradient(135deg, #fff, rgb(255 255 255 / 0.5)); animation-delay: -3s; }
.blob-3 { bottom: 10%; left: 30%; width: 350px; height: 350px; background: linear-gradient(135deg, var(--theme-secondary), var(--theme-primary)); animation-delay: -6s; }
@keyframes blob-float { 25% { transform: translate(30px, -50px) scale(1.05); } 50% { transform: translate(-20px, 20px) scale(0.95); } 75% { transform: translate(20px, 30px) scale(1.02); } }
.hero-subtitle { margin-bottom: 0.5rem; color: rgb(255 255 255 / 0.8); font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 400; }
.hero-title { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin: 0 0 2rem; color: #fff; font-weight: 900; line-height: 1.25; }
.title-line { display: block; margin-bottom: 0.25rem; color: #fff; font-size: clamp(2.8rem, 8.5vw, 5.5rem); font-weight: 900; letter-spacing: -0.01em; text-shadow: 0 0 30px rgb(255 255 255 / 0.15); }
.title-gradient { display: block; font-size: clamp(1.8rem, 5.5vw, 3.2rem); font-weight: 700; line-height: 1.2; background: linear-gradient(135deg, #fff 40%, #a1a1aa); background-clip: text; color: transparent; }
.role-prefix { margin-inline-end: 0.2em; color: rgb(255 255 255 / 0.7); font-size: 0.5em; font-weight: 500; -webkit-text-fill-color: rgb(255 255 255 / 0.7); vertical-align: middle; }
.hero-desc { max-width: 600px; margin: 0 auto 2.5rem; color: var(--muted); font-size: 1.1rem; white-space: pre-line; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; }
.btn { position: relative; display: inline-flex; min-height: 50px; align-items: center; gap: 0.5rem; justify-content: center; overflow: hidden; padding: 0.875rem 1.75rem; border: 0; border-radius: 50px; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s; }
.btn::before { content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.4), transparent); transform: skewX(-25deg); }
.btn:hover { transform: translateY(-3px); }
.btn:hover::before { left: 150%; transition: left 0.6s; }
.btn-primary { background: #fff; color: #09090b; box-shadow: 0 4px 15px rgb(0 0 0 / 0.3), 0 0 10px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.1); }
.btn-primary:hover { background: #fff; box-shadow: 0 10px 25px rgb(0 0 0 / 0.4), 0 0 25px var(--glow), 0 0 12px rgb(255 255 255 / 0.2); }
.btn-outline { border: 1px solid rgb(255 255 255 / 0.1); background: rgb(255 255 255 / 0.03); color: #fff; backdrop-filter: blur(10px); }
.btn-outline:hover { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.4); background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.06); box-shadow: 0 10px 25px rgb(0 0 0 / 0.4), 0 0 20px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); }
.btn-large { padding: 1rem 2.5rem; font-size: 1.05rem; }
.hero-stats { display: flex; align-items: flex-end; justify-content: center; gap: 4rem; margin-top: 3rem; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.stat-value { display: block; font-family: var(--font-mono); font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; background: linear-gradient(135deg, #fff, #a1a1aa); background-clip: text; color: transparent; }
.stat-label { color: rgb(255 255 255 / 0.6); font-size: 0.9rem; font-weight: 500; letter-spacing: 1px; line-height: 1; text-transform: uppercase; }
.scroll-indicator { position: absolute; bottom: 2rem; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; color: rgb(255 255 255 / 0.4); font-size: 0.75rem; }
.mouse { position: relative; width: 24px; height: 38px; border: 2px solid rgb(255 255 255 / 0.3); border-radius: 12px; }
.wheel { position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: scroll-wheel 2s infinite; }
@keyframes scroll-wheel { 0% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(12px); } }

.proof-strip { position: relative; z-index: 3; padding: 2.5rem 0; border-block: 1px solid var(--line); background: rgb(9 9 11 / 0.25); }
.proof-strip .container { display: flex; align-items: center; gap: 2rem; }
.proof-grid { display: grid; flex: 1; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.proof-item { text-align: center; }
.proof-value { display: block; font-family: var(--font-mono); font-size: clamp(1.4rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; background: linear-gradient(135deg, #fff, #a1a1aa); background-clip: text; color: transparent; }
.proof-label { color: rgb(255 255 255 / 0.55); font-size: 0.75rem; }

.headline-band { position: relative; z-index: 3; overflow: hidden; padding: 1.25rem 0; border-bottom: 1px solid var(--line); background: rgb(9 9 11 / 0.25); }
.headline-track { display: flex; width: max-content; animation: headline-scroll 28s linear infinite; }
.headline-track span { padding-right: 4rem; font-family: var(--font-heading); font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 900; line-height: 1.3; letter-spacing: 0.04em; white-space: nowrap; }
.headline-track .solid { color: rgb(255 255 255 / 0.85); text-shadow: 0 0 24px var(--glow); }
.headline-track .outline { color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / 0.28); }
@keyframes headline-scroll { to { transform: translateX(-50%); } }

.section { position: relative; z-index: 3; padding: 6rem 0; background: transparent; }
.section-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 4rem; text-align: center; }
.section-tag { position: relative; display: inline-block; overflow: hidden; margin-bottom: 1rem; padding: 0.25rem 1rem; border: 1px solid var(--line); border-radius: 50px; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 0.85rem; font-weight: 500; backdrop-filter: blur(4px); }
.section-tag::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); opacity: 0.2; animation: tag-pulse 2s infinite alternate; }
@keyframes tag-pulse { to { opacity: 0.38; } }
.section-title { position: relative; display: inline-block; margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; background: linear-gradient(90deg, #fff, #a1a1aa); background-clip: text; color: transparent; }
.section-title::after { content: ""; display: block; width: 180px; height: 2px; margin: 1rem auto 0; background: linear-gradient(90deg, transparent, var(--theme-primary) 20%, var(--theme-secondary) 80%, transparent); box-shadow: 0 0 12px var(--theme-primary); transform: scaleX(0); transform-origin: center; transition: transform 1.2s cubic-bezier(0.1, 0.9, 0.2, 1); }
.section-header[data-revealed] .section-title::after { transform: scaleX(1); }
.section-desc { max-width: 600px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }
.glass-card { position: relative; overflow: hidden; padding: 2.5rem 2rem; border: 1px solid rgb(255 255 255 / 0.1); border-radius: 20px; background: var(--card-bg); backdrop-filter: blur(20px); transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s; }
.glass-card::before { content: ""; position: absolute; z-index: -1; inset: -5px; border-radius: inherit; background: linear-gradient(135deg, hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.2), hsl(calc(var(--theme-h) + 30) var(--theme-s) var(--theme-l) / 0.2)); opacity: 0.1; filter: blur(20px); transition: opacity 0.4s; }
.glass-card:hover { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.5); box-shadow: 0 20px 60px rgb(0 0 0 / 0.4), 0 0 40px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); transform: translateY(-5px); }
.glass-card:hover::before { opacity: 0.6; }

.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.gallery-item { position: relative; display: flex; aspect-ratio: 3 / 4; flex-direction: column; justify-content: flex-end; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card-bg); color: #fff; text-decoration: none; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s, box-shadow 0.4s; }
.gallery-item:hover { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.4); box-shadow: 0 20px 40px rgb(0 0 0 / 0.6), 0 0 30px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); transform: translateY(-8px); }
.gallery-img-wrapper { position: absolute; z-index: 1; inset: 0; overflow: hidden; background-color: rgb(255 255 255 / 0.02); background-image: linear-gradient(90deg, rgb(255 255 255 / 0) 0%, hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.05) 50%, rgb(255 255 255 / 0) 100%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; }
@keyframes skeleton-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.gallery-img-wrapper picture, .gallery-img-wrapper img, .gallery-img-wrapper video { width: 100%; height: 100%; }
.gallery-img-wrapper img, .gallery-img-wrapper video { object-fit: cover; opacity: 0; transition: opacity 0.6s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gallery-img-wrapper img.loaded, .gallery-img-wrapper video { opacity: 1; }
.gallery-item:hover .gallery-img-wrapper img, .gallery-item:hover .gallery-img-wrapper video { transform: scale(1.08); }
.gallery-content { position: relative; z-index: 2; display: flex; flex-direction: column; padding: 3.5rem 1.5rem 1.5rem; background: linear-gradient(0deg, rgb(9 9 11 / 0.96), rgb(9 9 11 / 0.62) 62%, transparent); }
.project-num { color: var(--theme-primary); font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.1em; transition: color 0.4s; }
.gallery-category { align-self: flex-start; margin: 0.6rem 0; padding: 0.3rem 0.75rem; border: 1px solid hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3); border-radius: 50px; background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); font-size: 0.7rem; transition: background 0.3s, border-color 0.3s; }
.gallery-item:hover .gallery-category { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.5); background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3); }
.gallery-content h3 { margin: 0 0 0.5rem; color: #fff; font-size: 1.3rem; }
.gallery-content p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.gallery-border { position: absolute; z-index: 3; inset: 0; border: 1.5px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color 0.4s, box-shadow 0.4s; }
.gallery-item:hover .gallery-border { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3); box-shadow: inset 0 0 15px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.2); }

.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.resume-container { position: relative; overflow: hidden; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 20px; background-color: var(--card-bg); background-image: linear-gradient(90deg, rgb(255 255 255 / 0) 0%, hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.05) 50%, rgb(255 255 255 / 0) 100%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; }
.resume-container img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.resume-container img.loaded { opacity: 1; }
.resume-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0.2), transparent); }
.resume-status { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; gap: 0.5rem; padding: 1.5rem; color: #fff; font-size: 0.9rem; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--theme-primary); animation: status-pulse 2s infinite; }
@keyframes status-pulse { 0% { box-shadow: 0 0 0 0 var(--glow-strong); } 70% { box-shadow: 0 0 0 10px transparent; } }
.about-text p { margin: 0 0 1rem; color: var(--muted); font-size: 1.1rem; line-height: 1.8; }
.about-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.info-item { display: flex; flex-direction: column; }
.info-label { margin-bottom: 0.25rem; color: rgb(255 255 255 / 0.5); font-size: 0.85rem; }
.info-value { color: #fff; font-size: 1rem; font-weight: 500; }

.roles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.card-index { color: var(--theme-primary); font-family: var(--font-mono); }
.roles-grid h3 { margin: 0.75rem 0; color: #fff; font-size: 1.25rem; }
.roles-grid p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.timeline-container { position: relative; display: flex; flex-direction: column; gap: 3rem; padding: 2rem 0; }
.timeline-container::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: 50%; width: 2px; background: rgb(255 255 255 / 0.1); transform: translateX(-50%); }
.timeline-item { position: relative; z-index: 2; width: 50%; }
.timeline-item.left { align-self: flex-start; padding-right: 3rem; }
.timeline-item.right { align-self: flex-end; padding-left: 3rem; }
.timeline-node { position: absolute; z-index: 3; top: 50%; width: 16px; height: 16px; border: 3px solid var(--theme-primary); border-radius: 50%; background: var(--bg); box-shadow: 0 0 15px var(--glow-strong); transform: translateY(-50%); }
.timeline-item.left .timeline-node { right: -8px; }
.timeline-item.right .timeline-node { left: -8px; }
.timeline-item h3 { margin: 0 0 0.5rem; color: #fff; font-size: 1.2rem; }
.job-time { margin: 0 0 1rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; }
.timeline-item ul { margin: 0; padding-left: 1.2rem; color: rgb(255 255 255 / 0.75); font-size: 0.9rem; }
.timeline-item li + li { margin-top: 0.5rem; }

.skills-grid-cards { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.skill-card { padding: 2rem 2rem 2rem 2.5rem; border-left: 3px solid transparent; }
.skill-card:hover { border-left-color: var(--theme-primary); }
.skill-card-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.skill-card-num { font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary)); background-clip: text; color: transparent; filter: drop-shadow(0 0 12px var(--glow)); transition: transform 0.3s; }
.skill-card:hover .skill-card-num { transform: scale(1.05); }
.skill-card h3 { margin: 0; color: #fff; font-size: 1.3rem; }
.skill-card ul { margin: 0; padding: 0; list-style: none; }
.skill-card li { position: relative; padding: 0.55rem 0 0.55rem 1.5rem; color: rgb(255 255 255 / 0.75); font-size: 0.95rem; transition: color 0.2s, padding-left 0.2s; }
.skill-card li::before { content: "▸"; position: absolute; left: 0; color: var(--theme-primary); transition: color 0.2s; }
.skill-card li:hover { padding-left: 1.75rem; color: #fff; }
.skill-card li:hover::before { color: var(--theme-secondary); }

.cta { overflow: hidden; padding: 8rem 0; text-align: center; }
.cta-content { position: relative; z-index: 2; }
.cta-content h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cta-content p { margin: 0 0 2rem; color: rgb(255 255 255 / 0.6); }
.glow-1 { top: -200px; left: 20%; width: 600px; height: 600px; background: #fff; filter: blur(100px); }
.glow-2 { right: 20%; bottom: -150px; width: 400px; height: 400px; background: var(--theme-primary); filter: blur(100px); }

.footer { position: relative; z-index: 3; padding: 4rem 0 6rem; border-top: 1px solid var(--line); background: transparent; }
.footer p { color: rgb(255 255 255 / 0.5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.footer-links h3 { margin: 0 0 0.75rem; }
.footer-links a { color: rgb(255 255 255 / 0.55); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8rem; }

.project-detail { position: relative; z-index: 3; max-width: 960px; margin: 0 auto; padding: 7rem 2rem 4rem; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 2rem; color: var(--theme-primary); text-decoration: none; }
.project-header { margin-bottom: 4rem; padding: 0 0 2rem; border-bottom: 1px solid rgb(255 255 255 / 0.1); }
.project-num-large { color: var(--theme-primary); font-family: var(--font-heading); font-size: 1rem; opacity: 0.7; }
.project-header h1 { margin: 0.5rem 0; color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.15; }
.project-subtitle { margin: 0; color: rgb(255 255 255 / 0.6); font-size: 1.1rem; }
.project-section { margin-bottom: 3rem; }
.project-section h2 { margin: 0 0 1rem; color: var(--theme-primary); font-size: 1.5rem; }
.project-section p { margin: 0; color: rgb(255 255 255 / 0.85); font-size: 1.05rem; line-height: 1.8; }
.project-gallery { display: grid; gap: 1.5rem; margin: 4rem 0; }
.project-gallery picture, .project-gallery img, .project-gallery video { width: 100%; }
.project-gallery img, .project-gallery video { height: auto; border: 1px solid var(--line); border-radius: 12px; opacity: 0; transition: opacity 0.6s; }
.project-gallery img.loaded, .project-gallery video { opacity: 1; }
.project-nav { display: flex; justify-content: space-between; gap: 1rem; padding-top: 3rem; border-top: 1px solid rgb(255 255 255 / 0.1); }
.project-nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--theme-primary); text-decoration: none; }

[data-reveal] { opacity: 0; filter: blur(5px); transform: translateY(30px) scale(0.95); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
[data-revealed] { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }

/* Palette switch smoothing: theme-tinted elements cross-fade instead of hard-jumping. */
.timeline-node, .status-dot, .scroll-progress, .card-index, .back-link, .project-section h2, .project-num-large, .project-nav a, .control-group button, .section-tag::after { transition: color 0.4s, border-color 0.4s, background 0.4s, background-color 0.4s, box-shadow 0.4s; }

/* ── v16 section rhythm: ghost numbers, alternating headers, tinted bands ── */
.section[data-num]::before { content: attr(data-num); position: absolute; z-index: 0; top: 1.5rem; left: 2vw; font-family: var(--font-heading); font-size: clamp(7rem, 18vw, 16rem); font-weight: 900; line-height: 1.2; color: rgb(255 255 255 / 0.035); pointer-events: none; }
.section.num-right[data-num]::before { left: auto; right: 2vw; }
.section .container { position: relative; z-index: 1; }
.section.tint { border-block: 1px solid var(--line); background: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.04); }
.section-header.left { align-items: flex-start; text-align: left; }
.section-header.right { align-items: flex-end; text-align: right; }
.section-header.left .section-desc, .section-header.right .section-desc { margin: 0; }
.section-header.left .section-title::after { margin: 1rem 0 0; }
.section-header.right .section-title::after { margin: 1rem 0 0 auto; }
main > .section:not(.tint) + .section:not(.tint)::after { content: ""; position: absolute; z-index: 1; top: 0; right: 10%; left: 10%; height: 1px; background: linear-gradient(90deg, transparent, hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.25), transparent); }

/* ── v16 uneven grids ── */
.roles-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }
.roles-grid .glass-card:nth-child(1) { grid-column: 1 / span 8; grid-row: 1 / span 2; }
.roles-grid .glass-card:nth-child(2) { grid-column: 9 / span 4; }
.roles-grid .glass-card:nth-child(3) { grid-column: 9 / span 4; }
.skills-grid-cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.75rem; }
.skills-grid-cards .skill-card:nth-child(1) { grid-column: 1 / span 7; }
.skills-grid-cards .skill-card:nth-child(2) { grid-column: 8 / span 5; }
.skills-grid-cards .skill-card:nth-child(3) { grid-column: 1 / span 5; }
.skills-grid-cards .skill-card:nth-child(4) { grid-column: 6 / span 7; }

/* ── v16 sticky-stack gallery (cinematic scrollytelling) ── */
.gallery-stack { display: flex; flex-direction: column; gap: 20vh; margin-top: 2rem; }
.project-card { position: sticky; top: 80px; display: block; height: 80vh; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgb(0 0 0 / 0.3); color: inherit; text-decoration: none; transition: border-color 0.4s, box-shadow 0.4s; }
.project-card:hover { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.4); box-shadow: 0 20px 60px rgb(0 0 0 / 0.5), 0 0 30px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.15); }
.project-card picture, .project-card img, .project-card video { width: 100%; height: 100%; }
.project-card img, .project-card video { object-fit: cover; opacity: 0; transition: transform 0.6s ease, opacity 0.6s; }
.project-card img.loaded, .project-card video { opacity: 1; }
.project-card:hover img, .project-card:hover video { transform: scale(1.05); }
.project-card-overlay { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 2.5rem; background: linear-gradient(0deg, rgb(0 0 0 / 0.85), transparent); color: #fff; }
.project-card-overlay h3 { margin: 0.25rem 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
.project-card-overlay p { margin: 0; font-size: 1rem; opacity: 0.85; }
.project-card .gallery-border { border-radius: 16px; }
.project-card:hover .gallery-border { border-color: hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.3); box-shadow: inset 0 0 15px hsl(var(--theme-h) var(--theme-s) var(--theme-l) / 0.2); }

/* ── v16 glass-card cursor spotlight ── */
.card-spot { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(240px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgb(255 255 255 / 0.08), transparent 65%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.glass-card:hover .card-spot { opacity: 1; }

/* ── v16 film grain ── */
body::after { content: ""; position: fixed; z-index: 1900; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); opacity: 0.035; pointer-events: none; }

/* ── v16 timeline pulse on reveal ── */
[data-revealed] .timeline-node { animation: node-pulse 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s; }
@keyframes node-pulse { 0% { box-shadow: 0 0 0 0 var(--glow-strong); } 100% { box-shadow: 0 0 0 16px transparent; } }

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1079px) {
  .proof-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .desktop-links { display: flex; }
  .menu-button, .mobile-menu { display: none !important; }
}

@media (min-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
  .island { top: max(12px, env(safe-area-inset-top)); width: min(calc(100% - 24px), 850px); border-color: var(--line); background: rgb(9 9 11 / 0.72); box-shadow: 0 0 30px rgb(0 0 0 / 0.5); backdrop-filter: blur(20px); }
  .roles-grid { grid-template-columns: 1fr; }
  .roles-grid .glass-card:nth-child(n) { grid-column: auto; grid-row: auto; }
  .skills-grid-cards .skill-card:nth-child(n) { grid-column: auto; }
  .about-layout { grid-template-columns: 1fr; gap: 2rem; }
  .section-header.right { align-items: flex-start; text-align: left; }
  .section-header.right .section-desc { margin: 0 auto 0 0; }
  .section-header.right .section-title::after { margin: 1rem 0 0; }
}

@media (max-width: 768px) {
  #particleCanvas { opacity: 0.3; }
  .scan-lines, .mouse-follower, .mouse-follower-dot { display: none; }
  .hero { min-height: 760px; padding: 7rem 0 4rem; }
  .hero-blob { opacity: 0.1; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { gap: 1.5rem; }
  .stat-value { font-size: 1.7rem; }
  .proof-strip .container { flex-direction: column; }
  .proof-grid { width: 100%; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .gallery-item { aspect-ratio: 3 / 2; }
  .section { padding: 4rem 0; }
  .section-header { margin-bottom: 3rem; }
  .timeline-container::before { left: 20px; }
  .timeline-item { width: 100%; padding-right: 0 !important; padding-left: 3rem !important; }
  .timeline-item.left .timeline-node, .timeline-item.right .timeline-node { right: auto; left: 12px; }
  .skills-grid-cards { grid-template-columns: 1fr; }
  .skills-grid-cards .skill-card:nth-child(n) { grid-column: auto; }
  .gallery-stack { gap: 12vh; }
  .project-card { top: 60px; height: 70vh; }
  .project-card-overlay { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .island { max-width: calc(100vw - 24px); }
  .brand { font-size: 13px; }
  .language-control { display: none; }
  .hero-content, .hero-title, .title-line, .title-gradient, .hero-desc { max-width: 100%; }
  .hero-title { width: 100%; gap: 0.75rem; }
  .title-line { font-size: clamp(2.4rem, 12vw, 3rem); }
  .title-gradient { font-size: clamp(1.45rem, 7.5vw, 2rem); }
  .hero-desc { padding-inline: 4px; overflow-wrap: anywhere; white-space: normal; }
  .hero-stats { width: 100%; gap: 0.75rem; }
  .stat { flex: 1; min-width: 0; }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: 0.66rem; }
  .palette-selector { max-width: calc(100vw - 32px); gap: 0; padding: 4px; }
  .palette-selector button { min-width: 44px; min-height: 44px; }
  .about-info-grid { gap: 0.75rem; }
  .glass-card { padding: 1.25rem; }
  .project-detail { padding-inline: 1rem; }
  .project-nav { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #particleCanvas, .mouse-follower, .mouse-follower-dot { display: none; }
  [data-reveal] { opacity: 1; filter: none; transform: none; }
  .section-title::after { transform: scaleX(1); }
}
