/* ===== Design system ===== */
:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0b1728;
  --surface: rgba(16, 31, 51, 0.78);
  --surface-solid: #101f33;
  --surface-raised: #14263d;
  --text: #f4f7fb;
  --text-soft: #b6c1cf;
  --text-muted: #77869a;
  --line: rgba(183, 201, 223, 0.14);
  --line-strong: rgba(183, 201, 223, 0.25);
  --blue: #61a8ff;
  --blue-strong: #3b82f6;
  --cyan: #5eead4;
  --lime: #b8f36b;
  --violet: #a78bfa;
  --danger: #ff7a8a;
  --accent-bg: #b8f36b;
  --accent-ink: #07111f;
  --accent-copy: #29430f;
  --accent-subtle: #3b5b18;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.2);
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shell: 1180px;
  --header-height: 76px;
  --ease: 220ms cubic-bezier(.2, .8, .2, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fc;
  --bg-soft: #edf2f8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-raised: #f9fbff;
  --text: #0c1728;
  --text-soft: #425168;
  --text-muted: #58677c;
  --line: rgba(25, 48, 79, 0.12);
  --line-strong: rgba(25, 48, 79, 0.22);
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --cyan: #087168;
  --lime: #4f7d10;
  --violet: #7047d8;
  --accent-bg: #315c0a;
  --accent-ink: #ffffff;
  --accent-copy: #edf8dd;
  --accent-subtle: #d5edb2;
  --shadow: 0 24px 80px rgba(36, 55, 80, 0.14);
  --shadow-soft: 0 14px 38px rgba(36, 55, 80, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(97, 168, 255, .28); color: var(--text); }

.skip-link { position: fixed; left: 18px; top: -60px; z-index: 9999; padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--blue-strong); transition: top var(--ease); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 72%, transparent); outline-offset: 4px; border-radius: 6px; }

.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.section { position: relative; padding: 112px 0; }
.section-shell { position: relative; }
.section-tinted { background: color-mix(in srgb, var(--bg-soft) 82%, transparent); border-block: 1px solid var(--line); }
.text-gradient { color: var(--blue); background: linear-gradient(110deg, var(--blue), var(--cyan) 52%, var(--violet)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-muted { color: var(--text-muted); }
.eyebrow { margin: 0 0 16px; color: var(--blue); font: 500 .76rem/1.4 var(--font-mono); letter-spacing: .13em; }

.ambient-bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.orb { position: absolute; width: 42vw; aspect-ratio: 1; border-radius: 50%; filter: blur(110px); opacity: .12; }
.orb-one { top: -14vw; right: -12vw; background: var(--blue); }
.orb-two { top: 35%; left: -25vw; background: var(--violet); opacity: .08; }
.grid-overlay { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, #000 0, transparent 76%); }
.cursor-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 12%, transparent), transparent 68%); transform: translate(-50%, -50%); opacity: 0; transition: opacity 300ms ease; }

/* ===== Header ===== */
.site-header { position: fixed; inset: 0 0 auto; z-index: 1000; height: var(--header-height); border-bottom: 1px solid transparent; transition: background var(--ease), border-color var(--ease), box-shadow var(--ease); }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 84%, transparent); border-color: var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: 500 .83rem var(--font-mono); box-shadow: inset 0 1px rgba(255,255,255,.06); }
.brand-copy { display: flex; flex-direction: column; font-size: .88rem; font-weight: 800; line-height: 1.25; }
.brand-copy small { margin-top: 2px; color: var(--text-muted); font: 400 .62rem var(--font-mono); letter-spacing: .04em; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 9px 12px; color: var(--text-soft); font-size: .82rem; font-weight: 600; border-radius: 9px; transition: color var(--ease), background var(--ease); }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-contact { margin-left: 8px; padding-inline: 16px; border: 1px solid var(--line-strong); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-toggle { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color var(--ease), transform var(--ease), background var(--ease); }
.icon-button:hover, .menu-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle { position: relative; display: grid; place-items: center; overflow: hidden; }
.theme-icon { position: absolute; font-size: 1.05rem; transition: transform var(--ease), opacity var(--ease); }
html[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: translateY(0); }
html[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: translateY(24px); }
html[data-theme="light"] .theme-icon-sun { opacity: 0; transform: translateY(-24px); }
html[data-theme="light"] .theme-icon-moon { opacity: 1; transform: translateY(0); }
.menu-toggle { display: none; position: relative; }
.menu-toggle span { position: absolute; left: 11px; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform var(--ease), top var(--ease); }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 24px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: 154px 0 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .72fr); gap: clamp(48px, 8vw, 110px); align-items: center; }
.availability { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 28px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--lime) 28%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--lime) 7%, transparent); color: var(--text-soft); font: 500 .73rem var(--font-mono); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 10%, transparent); }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(3rem, 6.8vw, 6.4rem); font-weight: 700; letter-spacing: -.068em; line-height: .98; }
.hero-summary { max-width: 660px; margin: 28px 0 0; color: var(--text-soft); font-size: clamp(1rem, 1.45vw, 1.14rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 48px; padding: 11px 20px; border: 1px solid transparent; border-radius: 12px; font-size: .84rem; font-weight: 800; transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease); }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--accent-ink); background: var(--accent-bg); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent-bg) 16%, transparent); }
.button-primary:hover { box-shadow: 0 16px 38px color-mix(in srgb, var(--lime) 24%, transparent); }
.button-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: color-mix(in srgb, var(--blue) 52%, var(--line)); background: var(--surface-raised); }
.hero-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.hero-links a, .text-link { color: var(--text-muted); font: 500 .74rem var(--font-mono); transition: color var(--ease); }
.hero-links a:hover, .text-link:hover { color: var(--blue); }
.hero-visual { position: relative; max-width: 430px; justify-self: end; }
.profile-card { position: relative; padding: 12px; border: 1px solid var(--line-strong); border-radius: 28px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); box-shadow: var(--shadow); transform: rotate(1.4deg); }
.profile-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 55%, transparent), transparent 42%, color-mix(in srgb, var(--violet) 30%, transparent)); }
.profile-topline { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 12px; color: var(--text-muted); font: 500 .63rem var(--font-mono); letter-spacing: .04em; }
.profile-status { color: var(--lime); }
.photo-frame { position: relative; overflow: hidden; border-radius: 20px; aspect-ratio: 4 / 4.35; background: var(--bg-soft); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: saturate(.9) contrast(1.03); }
.photo-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,17,31,.22), transparent 48%); }
.profile-details { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 15px 5px 4px; }
.profile-details div { display: flex; flex-direction: column; }
.profile-details strong { font-size: .88rem; }
.profile-details span { color: var(--text-muted); font: 400 .61rem/1.5 var(--font-mono); }
.profile-location { white-space: nowrap; }
.floating-note { position: absolute; z-index: 2; display: flex; flex-direction: column; min-width: 150px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 13px; background: color-mix(in srgb, var(--surface-solid) 90%, transparent); box-shadow: var(--shadow-soft); backdrop-filter: blur(16px); }
.floating-note span { color: var(--text-muted); font: 400 .59rem var(--font-mono); }
.floating-note strong { margin-top: 3px; font-size: .8rem; }
.note-code { left: -72px; top: 20%; }
.note-build { right: -46px; bottom: 18%; }
.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 96px; border-block: 1px solid var(--line); }
.proof-item { display: flex; align-items: center; gap: 12px; padding: 24px clamp(8px, 2vw, 26px); border-right: 1px solid var(--line); }
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { border-right: 0; }
.proof-item strong { font-size: 1.25rem; letter-spacing: -.04em; }
.proof-item span { color: var(--text-muted); font: 400 .67rem var(--font-mono); }

/* ===== Section headings ===== */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 54px; }
.section-heading h2, .about-intro h2 { max-width: 760px; margin: 0; font-size: clamp(2rem, 4.3vw, 4rem); font-weight: 650; letter-spacing: -.055em; line-height: 1.08; }
.section-heading > p { max-width: 400px; margin: 0 0 4px; color: var(--text-muted); font-size: .92rem; }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 1px rgba(255,255,255,.035); transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.project:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.project-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.08fr .92fr; min-height: 600px; background: linear-gradient(135deg, color-mix(in srgb, var(--surface-solid) 97%, transparent), color-mix(in srgb, var(--blue) 5%, var(--surface-solid))); }
.project-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr .8fr; min-height: 440px; }
.project-content { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 5vw, 58px); }
.project-meta { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 38px; color: var(--text-muted); font: 400 .67rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.project-number { color: var(--text); }
.live-label { display: flex; align-items: center; gap: 8px; color: var(--lime); }
.project-kicker { margin: auto 0 12px; color: var(--blue); font: 500 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.project h3 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.05em; }
.project-lead, .project-wide .project-content > p:not(.project-kicker), .project-card > p:not(.project-kicker) { color: var(--text-soft); }
.project-lead { max-width: 620px; margin: 20px 0 0; font-size: 1rem; line-height: 1.8; }
.project-points { display: grid; gap: 10px; margin: 24px 0; padding: 0; list-style: none; color: var(--text-soft); font-size: .84rem; }
.project-points li { position: relative; padding-left: 20px; }
.project-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.project-points strong { color: var(--text); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--surface-raised) 72%, transparent); color: var(--text-muted); font: 500 .65rem var(--font-mono); }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 28px; }
.project-visual { position: relative; align-self: stretch; min-height: 420px; margin: 18px; border: 1px solid var(--line); border-radius: 20px; background: #07101c; overflow: hidden; }
.code-visual::before { content: ""; position: absolute; width: 380px; height: 380px; right: -20%; bottom: -30%; border-radius: 50%; background: var(--blue); filter: blur(110px); opacity: .2; }
.window-bar { display: flex; align-items: center; gap: 7px; height: 48px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #ff6b7d; }
.window-bar span:nth-child(2) { background: #f1c75b; }
.window-bar span:nth-child(3) { background: #62d98a; }
.window-bar small { margin-left: auto; color: #64748b; font: 400 .62rem var(--font-mono); }
.code-visual pre { position: relative; margin: 0; padding: 38px 28px; color: #d7e1ee; font: 400 clamp(.69rem, 1vw, .82rem)/2 var(--font-mono); white-space: pre-wrap; }
.code-dim { color: #66768a; }.code-purple { color: #b89bff; }.code-green { color: #8ce99a; }.code-blue { color: #69b3ff; }
.pipeline-diagram { position: absolute; inset: auto 24px 24px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.035); color: #9fb0c4; font: 500 .6rem var(--font-mono); }
.pipeline-diagram span { padding: 7px 9px; border: 1px solid rgba(97,168,255,.25); border-radius: 6px; color: #c7dcf8; }
.pipeline-diagram i { color: #5eead4; font-style: normal; }
.project-wide .project-content { padding: clamp(28px, 4vw, 48px); }
.project-wide .project-content > p:not(.project-kicker) { max-width: 620px; margin: 18px 0 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 8px 0 24px; border-block: 1px solid var(--line); }
.metric-grid div { display: flex; flex-direction: column; padding: 18px 12px; border-right: 1px solid var(--line); }
.metric-grid div:first-child { padding-left: 0; }
.metric-grid div:last-child { border: 0; }
.metric-grid strong { font-size: 1.35rem; letter-spacing: -.04em; }
.metric-grid span { color: var(--text-muted); font: 400 .62rem var(--font-mono); }
.search-visual { position: relative; min-height: 340px; margin: 18px; border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 54% 44%, rgba(94,234,212,.14), transparent 26%), linear-gradient(145deg, #0a1828, #0b1220); border: 1px solid rgba(255,255,255,.08); }
.search-visual::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(97,168,255,.28) 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(circle, #000, transparent 75%); }
.search-label { position: absolute; left: 20px; top: 18px; color: #64748b; font: 500 .58rem var(--font-mono); letter-spacing: .08em; }
.product-shape { position: absolute; width: 86px; height: 104px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: linear-gradient(145deg, rgba(97,168,255,.22), rgba(167,139,250,.09)); box-shadow: 0 18px 45px rgba(0,0,0,.25); }
.shape-one { left: 16%; top: 32%; transform: rotate(-8deg); }.shape-two { left: 46%; top: 22%; transform: rotate(4deg); }.shape-three { right: 10%; bottom: 20%; transform: rotate(9deg); }
.search-line { position: absolute; height: 1px; transform-origin: left; background: linear-gradient(90deg, #5eead4, transparent); }.line-one { left: 28%; top: 47%; width: 150px; transform: rotate(-16deg); }.line-two { left: 57%; top: 43%; width: 130px; transform: rotate(31deg); }
.search-score { position: absolute; right: 18px; top: 16px; padding: 6px 9px; border: 1px solid rgba(94,234,212,.22); border-radius: 6px; color: #8ce9dd; background: rgba(94,234,212,.07); font: 500 .58rem var(--font-mono); }
.project-card { min-height: 430px; padding: 30px; display: flex; flex-direction: column; align-items: flex-start; }
.project-card .project-meta { margin-bottom: auto; }
.project-card h3 { font-size: 1.72rem; }
.project-card > p:not(.project-kicker) { min-height: 108px; margin: 15px 0 20px; font-size: .86rem; }
.mini-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mini-metrics span { color: var(--cyan); font: 500 .66rem var(--font-mono); }
.mini-metrics span + span::before { content: "/"; margin-right: 8px; color: var(--text-muted); }
.card-link { margin-top: 24px; color: var(--text); font: 500 .71rem var(--font-mono); transition: color var(--ease); }
.card-link:hover { color: var(--blue); }

/* ===== Skills ===== */
.skills-layout { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.skill-panel { position: relative; min-height: 310px; padding: 36px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background var(--ease); }
.skill-panel:nth-child(2n) { border-right: 0; }.skill-panel:nth-child(n+3) { border-bottom: 0; }
.skill-panel:hover { background: var(--surface); }
.skill-index { position: absolute; right: 26px; top: 24px; color: var(--text-muted); font: 400 .65rem var(--font-mono); }
.skill-panel h3 { margin: 45px 0 12px; font-size: 1.25rem; letter-spacing: -.03em; }
.skill-panel p { max-width: 450px; margin: 0 0 24px; color: var(--text-muted); font-size: .86rem; }

/* ===== About ===== */
.about-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(50px, 9vw, 130px); align-items: start; }
.about-intro { position: sticky; top: 125px; }
.about-copy { padding-top: 4px; }
.about-lead { margin: 0; color: var(--text); font-size: clamp(1.2rem, 2vw, 1.58rem); line-height: 1.6; letter-spacing: -.025em; }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; color: var(--text-muted); font-size: .88rem; }
.about-columns p { margin: 0; }
.principles { display: grid; margin-top: 44px; border-top: 1px solid var(--line); }
.principles span { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .84rem; font-weight: 700; }
.principles i { color: var(--blue); font: 400 .63rem var(--font-mono); }

/* ===== Timeline ===== */
.timeline { border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 170px 34px 1fr; padding: 42px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--text-muted); font: 400 .68rem var(--font-mono); }
.timeline-marker { position: relative; }
.timeline-marker::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: -53px; width: 1px; background: var(--line); }
.timeline-row:last-child .timeline-marker::before { display: none; }
.timeline-marker span { position: relative; z-index: 1; display: block; width: 15px; height: 15px; border: 4px solid var(--bg-soft); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-type { margin: 0 0 8px; color: var(--blue); font: 500 .65rem var(--font-mono); letter-spacing: .08em; }
.timeline-body h3 { max-width: 760px; margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.85rem); line-height: 1.25; letter-spacing: -.035em; }
.timeline-body > p:not(.timeline-type) { max-width: 780px; margin: 16px 0 20px; color: var(--text-muted); font-size: .9rem; }

/* ===== Achievements ===== */
.achievement-list { border-top: 1px solid var(--line); }
.achievement-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); transition: padding var(--ease), background var(--ease); }
.achievement-row:hover { padding-inline: 12px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.achievement-no { color: var(--blue); font: 400 .65rem var(--font-mono); }
.achievement-row h3 { margin: 0 0 4px; font-size: 1rem; }
.achievement-row p { max-width: 770px; margin: 0; color: var(--text-muted); font-size: .82rem; }
.achievement-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--text-muted); font: 400 .61rem var(--font-mono); white-space: nowrap; }

/* ===== Contact and footer ===== */
.contact-section { padding: 30px 0 100px; }
.contact-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: end; padding: clamp(34px, 6vw, 72px); border-radius: var(--radius-lg); color: var(--accent-ink); background: var(--accent-bg); }
.contact-card::after { content: "↗"; position: absolute; right: -15px; top: -85px; color: color-mix(in srgb, var(--accent-ink) 7%, transparent); font-size: 18rem; line-height: 1; font-weight: 800; }
.contact-card .eyebrow { color: var(--accent-subtle); }
.contact-card h2 { max-width: 760px; margin: 0; font-size: clamp(2rem, 4.2vw, 4rem); line-height: 1.07; letter-spacing: -.055em; }
.contact-card p:not(.eyebrow) { max-width: 700px; margin: 20px 0 0; color: var(--accent-copy); }
.contact-actions { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; min-width: 210px; }
.button-light { color: var(--accent-bg); background: var(--accent-ink); }
.copy-button { min-height: 46px; padding: 10px 18px; border: 1px solid color-mix(in srgb, var(--accent-ink) 38%, transparent); border-radius: 12px; background: transparent; color: var(--accent-ink); font-size: .8rem; font-weight: 800; cursor: pointer; transition: background var(--ease); }
.copy-button:hover { background: color-mix(in srgb, var(--accent-ink) 8%, transparent); }
.contact-card a:focus-visible,
.contact-card button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 4px; }
.footer { padding: 36px 0; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a, .footer p { color: var(--text-muted); font: 400 .65rem var(--font-mono); }
.footer-links a:hover { color: var(--blue); }
.footer p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 1200; padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-solid); box-shadow: var(--shadow-soft); color: var(--text); font: 500 .7rem var(--font-mono); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity var(--ease), transform var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Motion ===== */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr .72fr; gap: 44px; }
  .note-code { left: -30px; }.note-build { right: -12px; }
  .project-featured, .project-wide { grid-template-columns: 1fr; }
  .project-visual { min-height: 380px; }
  .search-visual { min-height: 300px; }
  .contact-card { grid-template-columns: 1fr; align-items: start; }
  .contact-actions { flex-direction: row; min-width: 0; }
}

@media (max-width: 820px) {
  :root { --header-height: 68px; }
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .section { padding: 82px 0; }
  .nav-menu { position: fixed; inset: var(--header-height) 16px auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; max-height: calc(100dvh - var(--header-height) - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity var(--ease), transform var(--ease), visibility var(--ease); }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { padding: 12px; }.nav-contact { margin: 4px 0 0; text-align: center; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; padding-top: 122px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .hero-visual { width: min(78vw, 420px); justify-self: center; margin-top: 10px; }
  .proof-strip { grid-template-columns: 1fr 1fr; margin-top: 70px; }
  .proof-item { border-bottom: 1px solid var(--line); }
  .proof-item:nth-child(2) { border-right: 0; }.proof-item:nth-child(n+3) { border-bottom: 0; }.proof-item:nth-child(3) { padding-left: 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 20px; }
  .section-heading > p { max-width: 600px; }
  .projects-grid, .skills-layout, .about-layout { grid-template-columns: 1fr; }
  .project-card { min-height: 390px; }
  .skill-panel { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .skill-panel:last-child { border-bottom: 0 !important; }
  .about-intro { position: static; }
  .timeline-row { grid-template-columns: 120px 28px 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; }.footer-inner > p { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .brand-copy { display: none; }
  .hero { padding-top: 106px; }
  .availability { font-size: .62rem; }
  .hero h1 { font-size: clamp(2.75rem, 14vw, 4.4rem); }
  .hero-summary { font-size: .93rem; }
  .hero-actions, .hero-actions .button { width: 100%; }
  .hero-links { gap: 15px; }
  .hero-visual { width: min(88vw, 390px); }
  .floating-note { min-width: 124px; padding: 10px 12px; }.note-code { left: -8px; }.note-build { right: -5px; }
  .proof-item { flex-direction: column; align-items: flex-start; gap: 2px; padding: 18px 12px; }
  .proof-item strong { font-size: 1.05rem; }
  .project-featured, .project-wide { min-height: 0; }
  .project-content, .project-wide .project-content { padding: 25px 20px; }
  .project-meta { margin-bottom: 26px; }
  .project h3 { font-size: 1.8rem; }
  .project-visual { min-height: 330px; margin: 8px; }
  .code-visual pre { padding: 26px 16px; font-size: .6rem; }
  .pipeline-diagram { inset: auto 12px 12px; gap: 5px; padding: 10px; }.pipeline-diagram span { padding: 5px; }
  .search-visual { min-height: 280px; margin: 8px; }
  .metric-grid strong { font-size: 1rem; }
  .project-card { min-height: 0; padding: 24px 20px; }
  .project-card .project-meta { margin-bottom: 40px; }
  .project-card > p:not(.project-kicker) { min-height: 0; }
  .about-columns { grid-template-columns: 1fr; gap: 18px; }
  .timeline-row { grid-template-columns: 20px 1fr; gap: 10px; }
  .timeline-date { grid-column: 2; margin-bottom: 8px; }.timeline-marker { grid-column: 1; grid-row: 1 / span 2; }.timeline-body { grid-column: 2; }
  .achievement-row { grid-template-columns: 32px 1fr; align-items: start; }.achievement-tag { display: none; }
  .contact-card { padding: 32px 22px; }.contact-actions { flex-direction: column; width: 100%; }.contact-actions > * { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }.footer-inner > p { grid-column: auto; }.footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
