:root {
  --bg: #09090b;
  --bg-2: #0e0f12;
  --surface: #121317;
  --surface-2: #17181d;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #ededef;
  --text-2: #a1a1aa;
  --text-3: #63636b;
  --accent: #7cc8b8;
  --accent-2: #5fb3a2;
  --accent-dim: rgba(124, 200, 184, 0.1);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 16px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Cursor */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 120; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px; background: var(--accent); }
.cursor__ring {
  width: 36px; height: 36px; margin: -18px; border: 1px solid rgba(124, 200, 184, 0.6);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background 0.3s, border-color 0.3s;
}
.cursor.is-hover .cursor__ring { width: 72px; height: 72px; margin: -36px; background: var(--accent-dim); border-color: transparent; }
.cursor.is-hidden .cursor__dot, .cursor.is-hidden .cursor__ring { opacity: 0; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: transform 0.5s var(--ease), background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(10, 12, 16, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 14px; padding-bottom: 14px; border-bottom-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: -0.01em; display: inline-block; }
.nav__links { display: flex; gap: 4px; }
.nav__links a { position: relative; display: block; padding: 8px 14px; font-size: 14px; color: var(--text-2); transition: color 0.3s; }
.nav__links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-size: 14px; padding: 9px 18px; border: 1px solid var(--line-2); border-radius: 999px; display: inline-block; transition: border-color 0.3s, background 0.3s, color 0.3s; }
.nav__cta:hover { border-color: var(--accent); color: var(--accent); }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text); transition: transform 0.4s var(--ease); }
.nav__burger span:first-child { top: 18px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 var(--gutter);
}
.menu[hidden] { display: none; }
.menu a { font-family: var(--font-display); font-size: clamp(40px, 12vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  overflow: hidden; isolation: isolate; transition: color 0.4s var(--ease), border-color 0.4s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: #ffffff;
  transform: translateY(101%); border-radius: 50% 50% 0 0; transition: transform 0.5s var(--ease), border-radius 0.5s var(--ease);
}
.btn--primary:hover::before { transform: translateY(0); border-radius: 0; }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, 0.04);
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.btn--ghost:hover { border-color: var(--line-2); }
.btn--ghost:hover::before { transform: scaleX(1); }
.btn--ghost:hover svg { transform: translateY(2px); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 120px 0 40px; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; width: 70vmax; height: 70vmax; left: 50%; top: 40%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124, 200, 184, 0.045) 0%, rgba(124, 200, 184, 0) 60%); pointer-events: none;
}
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, rgba(10, 12, 16, 0), var(--bg)); pointer-events: none; }
.hero__content { position: relative; z-index: 2; pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }
.hero__eyebrow { color: var(--text-2); margin-bottom: 28px; text-transform: none; letter-spacing: 0.02em; font-size: 13px; border: 1px solid var(--line); padding: 6px 14px 6px 12px; border-radius: 999px; background: rgba(14, 15, 18, 0.7); backdrop-filter: blur(6px); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(46px, 9.5vw, 132px); line-height: 0.95; letter-spacing: -0.045em; margin-left: -0.04em; }
.hero__line { display: block; overflow: hidden; padding: 0 0.06em 0.2em 0; margin-bottom: -0.14em; }
.hero__line--outline { color: transparent; -webkit-text-stroke: 1px rgba(237, 237, 239, 0.32); }
.char { display: inline-block; will-change: transform; }
.hero__role { margin-top: 32px; font-size: clamp(14px, 1.3vw, 16px); color: var(--text-2); min-height: 1.6em; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; background: var(--accent); vertical-align: -0.18em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__tagline { margin-top: 18px; max-width: 520px; color: var(--text); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__meta { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); margin-top: auto; padding-top: 48px; text-transform: uppercase; letter-spacing: 0.1em; }
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; }
.hero__scroll-line { width: 1px; height: 36px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--accent); animation: scrollline 1.8s var(--ease) infinite; }
@keyframes scrollline { to { top: 100%; } }

/* Sections */
.section { position: relative; padding: clamp(96px, 14vw, 180px) 0; }
.section__head { margin-bottom: clamp(48px, 7vw, 88px); }
.section__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -0.035em; margin-top: 16px; }

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); margin-top: 40px; align-items: end; }
.about__text p { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 30px); line-height: 1.3; letter-spacing: -0.02em; color: var(--text); }
.about__text p + p { margin-top: 0.9em; }
.about__text .word { display: inline-block; opacity: 0.18; }
.about__text p:nth-child(n+2) { color: var(--text-2); font-size: clamp(18px, 1.9vw, 24px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 0; }
.stat { padding: 26px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat dt { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.stat dd { margin: 0; font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; display: flex; flex-direction: column-reverse; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

/* Projects */
.projects { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.project {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 24px; background: var(--bg-2); overflow: hidden;
  --mx: 50%; --my: 50%;
}
.project::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.22), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.project:hover::before { opacity: 1; }
.project:nth-child(even) .project__visual { order: 2; }
.project__visual { position: relative; min-height: 440px; background: #0c0f14; border-right: 1px solid var(--line); overflow: hidden; }
.project:nth-child(even) .project__visual { border-right: 0; border-left: 1px solid var(--line); }
.project__visual canvas, .project__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project__visual-tag { position: absolute; left: 20px; top: 18px; z-index: 2; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; }
.project__body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; }
.project__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: 0.06em; }
.project__index { color: var(--accent); }
.project__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.04em; line-height: 1; margin-top: 28px; }
.project__kind { color: var(--text-2); margin-top: 10px; font-size: 15px; }
.project__summary { margin-top: 22px; color: var(--text); }
.project__list { margin-top: 22px; display: grid; gap: 12px; }
.project__list li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.project__list li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); background: rgba(255, 255, 255, 0.02); transition: border-color 0.3s, color 0.3s, background 0.3s; }
.chip:hover { border-color: rgba(124, 200, 184, 0.5); color: var(--accent); background: var(--accent-dim); }
.project__link { margin-top: auto; padding-top: 30px; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 15px; font-weight: 500; }
.project__link .arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background 0.4s var(--ease), border-color 0.4s, transform 0.4s var(--ease); }
.project__link .arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project__link:hover .arrow { background: var(--text); border-color: var(--text); color: var(--bg); transform: rotate(-45deg); }

/* Skills */
.skills { overflow: hidden; }
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin-bottom: clamp(80px, 12vw, 150px); overflow: hidden; transform: rotate(-2deg) scale(1.04); background: var(--bg-2); }
.marquee__track { display: flex; width: max-content; gap: 0; animation: marquee 38s linear infinite; }
.marquee__item { font-family: var(--font-display); font-size: clamp(28px, 4vw, 52px); font-weight: 500; letter-spacing: -0.03em; padding: 0 28px; display: inline-flex; align-items: center; gap: 56px; white-space: nowrap; color: var(--text-3); }
.marquee__item::after { content: ''; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
.marquee__item.is-hl { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }
.skills__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skill-card { position: relative; border: 1px solid var(--line); border-radius: 20px; padding: 30px; background: var(--bg-2); overflow: hidden; transition: border-color 0.4s; }
.skill-card:hover { border-color: var(--line-2); }
.skill-card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.skill-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; }
.skill-card__count { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.skill-card .chips { margin-top: 0; }

/* Journey */
.timeline-wrap { position: relative; max-width: 860px; }
.timeline__rail { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline__fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.timeline { display: grid; gap: 56px; }
.tl { position: relative; padding-left: 48px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
.tl::before { content: ''; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); transition: border-color 0.4s, background 0.4s, box-shadow 0.4s; }
.tl.is-active::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-dim); }
.tl--future::before { border-style: dashed; }
.tl__when { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 4px; }
.tl__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; line-height: 1.2; }
.tl__place { color: var(--accent); font-size: 14px; margin-top: 6px; }
.tl__body { color: var(--text-2); margin-top: 10px; }

/* Contact */
.contact { padding-bottom: 0; }
.contact__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(42px, 7.5vw, 112px); line-height: 0.98; letter-spacing: -0.045em; margin-top: 28px; }
.contact__line { display: block; }
.contact__line--muted { color: var(--text-3); }
.contact__sub { color: var(--text-2); margin-top: 32px; max-width: 520px; font-size: 17px; }
.contact__actions { margin-top: 48px; }
.email { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 0; }
.email__addr { font-family: var(--font-display); font-size: clamp(20px, 2.8vw, 34px); letter-spacing: -0.02em; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; transition: border-color 0.4s, color 0.4s; word-break: break-all; }
.email:hover .email__addr { color: var(--accent); border-color: var(--accent); }
.email__hint { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.socials a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--text-2); transition: color 0.3s, border-color 0.3s; }
.socials a:hover { color: var(--accent); border-color: rgba(124, 200, 184, 0.5); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-3); padding-top: 40px; padding-bottom: 40px; margin-top: clamp(96px, 14vw, 160px); border-top: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.08em; }
.footer a { display: inline-block; transition: color 0.3s; }
.footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .about__grid { grid-template-columns: 1fr; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; }
  .project:nth-child(even) .project__visual { order: 0; border-left: 0; }
  .project__visual, .project:nth-child(even) .project__visual { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .skills__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero__meta span:first-child, .hero__meta span:last-child { display: none; }
  .hero__meta { justify-content: center; }
  .hero__ctas .btn { flex: 1 1 100%; justify-content: center; }
  .tl { grid-template-columns: 1fr; gap: 6px; padding-left: 36px; }
  .skill-card { padding: 22px; }
  .stat { padding: 20px 16px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .about__text .word { opacity: 1; }
}
