/* ============================================================
   MUHAMMET ALI ŞAHİN — Portfolio v2
   Dark, premium, AI/SaaS-product direction (LangChain-inspired)
   ============================================================ */

/* ============================================================
   ACCESSIBILITY — SKIP LINK
   ============================================================ */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #08080c;
  font: 600 14px/1 var(--font-ui, Inter, system-ui, sans-serif);
  text-decoration: none;
  transform: translateY(-150%);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  outline: 2px solid var(--accent-cool, #38bdf8);
  outline-offset: 2px;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Surfaces (deep, layered — never flat black) */
  --bg:        #08080c;   /* deepest base */
  --bg-1:      #0b0b11;   /* page base */
  --bg-2:      #11111a;   /* elevated section */
  --bg-3:      #16161f;   /* card / panel */
  --bg-4:      #1d1d29;   /* hover panel */

  /* Text */
  --ink:       #f3f3f7;   /* primary */
  --ink-2:     #b6b6c4;   /* secondary */
  --ink-3:     #7b7b8c;   /* tertiary */

  /* Hairlines (no heavy borders) */
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);

  /* Accents — warm ember as signature, used sparingly */
  --accent:    #ff6a2c;   /* ember orange (primary) */
  --accent-2:  #ff3d68;   /* magenta-red (gradient end) */
  --accent-3:  #7c5cff;   /* violet (ambient only) */
  --accent-cool:#38bdf8;  /* cyan (secondary) */
  --good:      #34d399;   /* open-to-work */

  --grad-accent: linear-gradient(105deg, #ff7a3d 0%, #ff3d68 100%);
  --grad-soft:   linear-gradient(105deg, rgba(255,122,61,0.16), rgba(255,61,104,0.16));

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.45);
  --shadow-lg: 0 30px 80px rgba(0,0,0,0.55);

  /* Radii */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-1);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; }

::selection { background: rgba(255,106,44,0.28); color: #fff; }

/* ============================================================
   ATMOSPHERE (fixed background layers)
   ============================================================ */
.bg-atmos {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(255,106,44,0.10), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(124,92,255,0.08), transparent 55%),
    radial-gradient(70% 60% at 100% 100%, rgba(255,61,104,0.06), transparent 60%),
    var(--bg-1);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 { width: 46vw; height: 46vw; top: -14vw; right: -8vw;
  background: radial-gradient(circle, rgba(255,106,44,0.5), transparent 70%);
  animation: drift1 22s var(--ease) infinite alternate; }
.orb-2 { width: 38vw; height: 38vw; bottom: -10vw; left: -10vw;
  background: radial-gradient(circle, rgba(124,92,255,0.42), transparent 70%);
  animation: drift2 26s var(--ease) infinite alternate; }
.orb-3 { width: 30vw; height: 30vw; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(255,61,104,0.32), transparent 70%);
  animation: drift3 30s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate3d(-4vw, 5vw, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(5vw, -3vw, 0) scale(1.12); } }
@keyframes drift3 { to { transform: translate3d(-6vw, -4vw, 0) scale(0.92); } }

.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.6;
}
.bg-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -1;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,44,0.12), transparent 60%);
  pointer-events: none; opacity: 0;
  transition: opacity 0.4s ease;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  mix-blend-mode: screen;
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  z-index: 200;
  background: var(--grad-accent);
  box-shadow: 0 0 12px rgba(255,106,44,0.6);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 12vw, 150px); position: relative; }
.section-dark { background: var(--bg-2); }
.section-dark::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 50% at 50% 0%, rgba(255,255,255,0.025), transparent 70%);
  pointer-events: none;
}

/* ============================================================
   LANGUAGE TOGGLE
   ============================================================ */
body:not(.lang-en-active) .lang-en { display: none; }
body.lang-en-active .lang-tr { display: none; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.eyebrow,
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.grad {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.display-1 { font-size: clamp(40px, 7.5vw, 92px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.0; color: var(--ink); }
.display-2 { font-size: clamp(32px, 5.5vw, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; color: var(--ink); }

.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); line-height: 1.65; max-width: 60ch; }

.link { color: var(--accent); transition: color 0.2s var(--ease); }
.link:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  border-radius: var(--r-pill);
  padding: 14px 26px;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease),
              color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap; will-change: transform;
}
.btn svg { transition: transform 0.3s var(--ease); }

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(255,106,44,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(255,106,44,0.4); }
.btn-primary:hover svg { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; box-shadow: 0 0 0 1px rgba(255,106,44,0.4), 0 12px 30px rgba(0,0,0,0.3); }
.btn-ghost:hover svg { transform: translateX(3px); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(8,8,12,0.55);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(8,8,12,0.8);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gutter);
  height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px;
  background: var(--grad-accent);
  color: #fff; font-family: var(--font-display);
  font-size: 13px; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(255,106,44,0.35);
}
.brand-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.brand-name-dim { color: var(--ink-3); }

.nav-links { display: none; gap: 30px; }
.nav-link {
  position: relative; font-size: 15px; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--grad-accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.28s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.segmented {
  display: inline-flex; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 2px;
}
.seg-btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-3); padding: 5px 13px; border-radius: var(--r-pill);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.seg-btn.is-active { background: var(--bg-3); color: var(--ink); box-shadow: var(--shadow-sm); }

.icon-link {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--ink-2); border: 1px solid var(--line);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-link:hover { color: #fff; background: rgba(255,106,44,0.14); border-color: rgba(255,106,44,0.4); transform: translateY(-1px); }

.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0 10px; border-radius: 10px;
  transition: background 0.2s var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,0.05); }
.hamburger span { display: block; height: 1.5px; width: 100%; background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
.hamburger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.menu-overlay {
  position: fixed; inset: 0; background: rgba(4,4,8,0.5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  z-index: 110;
}
.menu-overlay.is-open { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; right: 0; height: 100svh; width: min(86vw, 340px);
  background: rgba(13,13,20,0.94); backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.4s var(--ease); z-index: 120;
  display: flex; flex-direction: column; padding: 22px 26px 30px;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.menu-close {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,0.05); color: var(--ink);
}
.menu-close:hover { background: rgba(255,255,255,0.1); }
.mobile-nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-link {
  font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.mobile-link:hover { color: var(--accent); padding-left: 6px; }
.mobile-menu-foot { margin-top: auto; display: flex; flex-direction: column; gap: 20px; padding-top: 24px; }
.mobile-socials { display: flex; gap: 18px; }
.mobile-socials a { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.mobile-socials a:hover { color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: clamp(120px, 16vh, 170px); padding-bottom: clamp(70px, 9vh, 110px);
  overflow: hidden;
}
.hero-inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
.hero-copy { max-width: 620px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--ink-2); background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 15px; margin-bottom: 26px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 4px rgba(52,211,153,0.18); position: relative;
}
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(52,211,153,0.5); animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.8); opacity: 0.8; } 100% { transform: scale(2.1); opacity: 0; } }

.hero-title {
  font-size: clamp(46px, 9vw, 100px); font-weight: 700; letter-spacing: -0.05em;
  line-height: 0.96; margin: 0 0 22px; color: var(--ink);
}
.hero-line { display: block; }
.hero-role {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: clamp(15px, 2vw, 19px);
  color: var(--ink-2); margin-bottom: 26px; min-height: 1.4em;
}
.hero-role-static { color: var(--ink-3); }
.hero-role-rotate { color: var(--accent); font-weight: 600; }
.hero-role-rotate::after { content: "▌"; margin-left: 2px; color: var(--accent-2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); line-height: 1.6; max-width: 48ch; margin-bottom: 36px; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Hero media / portrait composition */
.hero-media { position: relative; display: flex; justify-content: center; }
.hero-portrait { position: relative; width: min(400px, 78vw); aspect-ratio: 4/5; }
.portrait-glow {
  position: absolute; inset: -14% -14% -14% -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255,106,44,0.4), rgba(124,92,255,0.18) 55%, transparent 72%);
  filter: blur(30px); opacity: 0.85;
}
.portrait-ring {
  position: absolute; inset: 0; border-radius: var(--r-xl);
  padding: 1.5px;
  background: linear-gradient(150deg, rgba(255,122,61,0.8), rgba(255,61,104,0.5) 40%, rgba(124,92,255,0.5) 75%, rgba(255,255,255,0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.portrait-badge {
  position: absolute; bottom: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: #fff;
  background: rgba(8,8,12,0.62); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 7px 13px;
}

/* Tech ticker */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 60px;
  overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 26px; width: max-content;
  animation: ticker 32s linear infinite;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em;
  color: var(--ink-3); white-space: nowrap;
}
.ticker-track i { color: var(--accent); font-style: normal; font-size: 9px; opacity: 0.7; }
@keyframes ticker { to { transform: translateX(-50%); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-cue span { width: 3px; height: 8px; border-radius: 3px; background: var(--ink-3); animation: scrollCue 1.8s var(--ease) infinite; }
@keyframes scrollCue { 0% { opacity: 0; transform: translateY(0); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
  padding-block: clamp(38px, 6vw, 60px);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: ""; position: absolute; right: -12px; top: 18%; height: 64%; width: 1px; background: var(--line);
}
.stat-value {
  font-family: var(--font-display); font-size: clamp(36px, 5.5vw, 58px); font-weight: 700;
  letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #c8c8d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { margin-top: 8px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.about-copy .display-2 { margin-bottom: 26px; }
.about-copy .lede { margin-bottom: 14px; }

.facts { margin-top: 38px; display: grid; }
.fact {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.fact dd { margin: 0; font-size: 16px; color: var(--ink); }

.about-visual { position: sticky; top: 110px; }
.aside-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}
.focus-list { display: grid; gap: 2px; }
.focus-list li {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 500;
  color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.focus-list li:hover { color: #fff; padding-left: 8px; }
.focus-idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.05em; }
.focus-note {
  margin-top: 24px; padding: 22px; border-radius: var(--r-lg);
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.focus-note span { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.focus-note strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }

/* ============================================================
   SKILLS
   ============================================================ */
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.skills-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.skill-group-title {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.skill-rows { display: grid; }
.skill-row {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 22px 14px; border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), padding-left 0.3s var(--ease);
  overflow: hidden;
}
.skill-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}
.skill-row[data-accent="violet"]::before { background: var(--accent-3); }
.skill-row[data-accent="cool"]::before { background: var(--accent-cool); }
.skill-row[data-accent="red"]::before { background: var(--accent-2); }
.skill-row:hover { background: rgba(255,255,255,0.025); padding-left: 22px; }
.skill-row:hover::before { transform: scaleY(1); }
.skill-idx { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.skill-name { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 28px); font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.skill-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); text-align: right; }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline { display: grid; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 240px 1fr; gap: clamp(24px, 4vw, 60px);
  padding: clamp(32px, 4.5vw, 48px) 0; border-top: 1px solid var(--line); position: relative;
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-when { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; position: relative; }
.timeline-when::before {
  content: ""; position: absolute; left: -26px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid var(--ink-3);
}
.timeline-item:first-child .timeline-when::before { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255,106,44,0.16); }
.timeline-year { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.timeline-body { min-width: 0; }
.timeline-role { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 6px; color: var(--ink); }
.timeline-org { font-size: 16px; color: var(--accent); font-weight: 500; margin-bottom: 18px; }
.timeline-list { display: grid; gap: 10px; }
.timeline-list li { position: relative; padding-left: 20px; font-size: 16px; color: var(--ink-2); line-height: 1.55; }
.timeline-list li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.timeline-list strong { color: var(--ink); font-weight: 600; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--ink-2); background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 5px 12px;
}
.tag-live { color: var(--good); border-color: rgba(52,211,153,0.35); }
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }

/* ============================================================
   PROJECTS (case-study showcase)
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px); border-color: rgba(255,106,44,0.4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,106,44,0.18);
}
.project-card.is-featured { grid-column: 1 / -1; flex-direction: row; }
.project-thumb {
  position: relative; height: 150px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255,106,44,0.12), transparent 70%), var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.project-card.is-featured .project-thumb {
  height: auto; flex: 0 0 42%; border-bottom: 0; border-right: 1px solid var(--line);
  min-height: 280px;
}
.project-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 30% 20%, rgba(124,92,255,0.12), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.project-card:hover .project-thumb::after { opacity: 1; }
.project-monogram {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.04em;
  color: var(--ink); opacity: 0.22; transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease);
}
.project-card.is-featured .project-monogram { font-size: clamp(60px, 9vw, 120px); }
.project-card:hover .project-monogram { transform: scale(1.08); opacity: 0.4; }
.project-num {
  position: absolute; top: 14px; left: 16px; z-index: 1;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3);
}
.project-body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-card.is-featured .project-body { justify-content: center; padding: clamp(32px, 4vw, 52px); }
.project-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.project-card.is-featured .project-name { font-size: clamp(26px, 3.4vw, 38px); }
.project-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.project-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--accent); transition: gap 0.25s var(--ease);
}
.project-link:hover { gap: 12px; color: var(--accent-2); }
.project-lang { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; }
.project-lang::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.projects-cta { margin-top: clamp(44px, 5vw, 60px); display: flex; justify-content: center; }
.projects-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 40px 0; font-family: var(--font-mono); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { position: relative; overflow: hidden; }
.contact-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 50%, rgba(255,106,44,0.12), transparent 65%);
}
.contact-wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 7vw, 88px); align-items: center;
}
.contact-copy .display-1 { margin-bottom: 22px; }
.contact-copy .lede { margin-bottom: 30px; }
.contact-mail { font-size: 16px; }
.contact-links { display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between; padding: 20px 24px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.contact-row:hover { transform: translateY(-3px); border-color: rgba(255,106,44,0.4); background: var(--bg-4); }
.contact-row-arrow { color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.contact-row:hover .contact-row-arrow { transform: translate(3px, -3px); color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding-top: clamp(50px, 7vw, 74px); padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-note { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-3); }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a, .footer-col li { font-size: 15px; color: var(--ink-2); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-loading { color: var(--ink-3) !important; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-3); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

:where(section[id]) { scroll-margin-top: 86px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 981px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
}

@media (max-width: 980px) {
  body { font-size: 16px; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; gap: 44px; }
  .hero-copy { max-width: 640px; }
  .hero-media { order: -1; }
  .hero-portrait { width: min(300px, 70vw); }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { position: static; }
  .focus-list li { font-size: 22px; }

  .skills-cols { grid-template-columns: 1fr; gap: 40px; }
  .project-card.is-featured { flex-direction: column; }
  .project-card.is-featured .project-thumb { flex: none; height: 160px; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }

  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .brand-name { display: none; }
  .nav-actions { gap: 10px; }
  .seg-btn { padding: 5px 11px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 16px; }
  .stat:not(:last-child)::after { display: none; }

  .hero-role { font-size: 14px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; }

  .timeline-item { grid-template-columns: 1fr; gap: 14px; }
  .timeline-when { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .timeline-when::before { display: none; }
  .fact { grid-template-columns: 1fr; gap: 4px; }

  .projects-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-row { padding: 16px 18px; font-size: 17px; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .ticker-track, .scroll-cue span, .status-dot::after, .hero-role-rotate::after { animation: none !important; }
  .btn:hover, .project-card:hover, .contact-row:hover, .skill-row:hover, .focus-list li:hover { transform: none !important; }
  .cursor-glow { display: none; }
}

/* ============================================================
   404 PAGE
   ============================================================ */
.err { position: relative; min-height: 100svh; display: flex; align-items: center; padding-top: 92px; padding-bottom: clamp(40px, 8vh, 80px); }
.err-inner { text-align: center; max-width: 640px; }
.err .eyebrow { margin-bottom: 18px; }
.err .hero-title { font-size: clamp(96px, 24vw, 230px); line-height: 0.86; margin-bottom: 20px; }
.err .lede { margin: 0 auto 36px; text-align: center; }
.err-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
