:root {
  --ink: #eaf5f0;
  --muted: #8b9d97;
  --green: #65ffc3;
  --green-dark: #1db77d;
  --header-h: 78px;
  --page-x: clamp(42px, 5.2vw, 100px);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; scrollbar-gutter: stable; background: #07100f; }
body { margin: 0; color: var(--ink); background: #07100f; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-x: clip; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.content-width { width: 100%; max-width: 1680px; margin: 0 auto; padding-inline: var(--page-x); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--green); color: #03100b; padding: 12px 18px; transition: top .2s; }
.skip-link:focus { top: 16px; }
.desktop-fallback { display: none; }

.hero {
  position: sticky; top: 0; z-index: 1; height: calc(100vh - var(--header-h)); min-height: 600px;
  overflow: hidden; background: radial-gradient(circle at 72% 48%, #10251f 0, #091714 31%, #07100f 65%);
  border-bottom: 1px solid rgba(101,255,195,.09);
}
.hero::before { content: ''; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(101,255,195,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(101,255,195,.1) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(circle at 72% 48%, black, transparent 60%); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,16,15,.9) 0, rgba(7,16,15,.44) 47%, transparent 71%); pointer-events: none; }
.sphere-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-glow { position: absolute; z-index: 0; width: min(54vw, 820px); aspect-ratio: 1; left: 69%; top: 48%; transform: translate(-50%,-50%); border-radius: 50%; border: 1px solid rgba(101,255,195,.1); box-shadow: 0 0 100px rgba(41,209,147,.08), inset 0 0 100px rgba(41,209,147,.04); }
.hero-content { position: relative; z-index: 3; height: 100%; display: flex; align-items: center; }
.hero-copy { width: min(630px, 45vw); transform: translateY(-1vh); }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 12px; color: var(--green); font: 600 11px/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow > span { width: 32px; height: 1px; background: currentColor; }
h1, h2 { font-family: ui-sans-serif, system-ui, sans-serif; letter-spacing: -.055em; font-weight: 400; margin: 0; }
h1 { font-size: clamp(66px, 6.3vw, 112px); line-height: .94; }
h1 em, h2 em { color: var(--green); font-style: normal; }
.hero-intro { max-width: 560px; margin: 30px 0 34px; color: #a8b9b3; font-size: clamp(16px, 1.15vw, 20px); line-height: 1.65; }
.hero-actions { display: flex; gap: 30px; align-items: center; }
.button { text-decoration: none; display: inline-flex; gap: 32px; align-items: center; padding: 16px 19px; border: 1px solid rgba(101,255,195,.4); font: 600 12px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; transition: .3s var(--ease); }
.button-primary { background: var(--green); color: #04130d; }
.button:hover, .button:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(41,209,147,.16); }
.text-link { text-decoration: none; color: #d4e2dd; font-size: 14px; border-bottom: 1px solid rgba(234,245,240,.25); padding-bottom: 5px; transition: color .2s; }
.text-link:hover, .text-link:focus-visible { color: var(--green); }
.sphere-label { position: absolute; z-index: 3; right: var(--page-x); bottom: 44px; display: flex; gap: 16px; color: #667b73; text-transform: uppercase; font: 600 9px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .16em; }
.sphere-label span + span { color: var(--green); }
.hero-index { position: absolute; z-index: 3; right: var(--page-x); top: 38px; color: #63776f; font: 500 10px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .18em; }
.scroll-cue { position: absolute; z-index: 3; bottom: 24px; left: var(--page-x); display: flex; gap: 13px; align-items: center; color: #63776f; font: 600 9px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 42px; background: #30443d; position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; inset: 0; background: var(--green); animation: scan-down 2.1s ease-in-out infinite; transform: translateY(-100%); }
@keyframes scan-down { 50%,100% { transform: translateY(100%); } }

.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(8,18,17,.93); border-block: 1px solid rgba(140,181,164,.13); backdrop-filter: blur(18px); box-shadow: 0 8px 34px rgba(0,0,0,.14); }
.nav-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; justify-self: start; align-items: center; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; filter: saturate(.7) brightness(1.25); }
nav { display: flex; align-self: stretch; gap: clamp(24px, 2.5vw, 48px); }
nav a { display: grid; place-items: center; position: relative; color: #80918b; text-decoration: none; font: 600 10px 'Manrope', ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .13em; transition: color .25s; }
nav a::after { content: ''; position: absolute; height: 2px; background: var(--green); bottom: -1px; left: 50%; right: 50%; transition: .3s var(--ease); }
nav a:hover, nav a:focus-visible, nav a.active { color: var(--ink); }
nav a.active::after { left: 0; right: 0; }
.availability { justify-self: end; display: flex; align-items: center; gap: 9px; color: #758a82; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.availability i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(101,255,195,.75); }

.stage { position: relative; height: 122vh; min-height: 810px; z-index: 2; }
.stage-panel { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); min-height: 590px; overflow: hidden; border-top: 1px solid rgba(255,255,255,.06); box-shadow: 0 -28px 55px rgba(0,0,0,.25); }
.stage-about { z-index: 2; }
.stage-education { z-index: 3; }
.stage-projects { z-index: 4; }
.stage-homelab { z-index: 5; height: calc(100vh - var(--header-h)); min-height: 590px; }
.stage-education { z-index: 6; }
.stage-contact { z-index: 7; height: 100vh; min-height: 700px; }
.stage-about .stage-panel { background: #0c1716; }
.stage-education .stage-panel { background: #111b20; }
.stage-projects .stage-panel { background: #121914; }
.stage-homelab .stage-panel { background: #081412; }
.stage-contact .stage-panel { background: #07100f; }
.stage-panel::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(101,255,195,.025)); }
.section-grid { height: 100%; display: grid; grid-template-columns: 120px minmax(480px, 1fr) minmax(320px, .66fr); gap: clamp(45px, 6vw, 120px); align-items: center; position: relative; z-index: 2; }
.section-meta { align-self: start; margin-top: 72px; color: #596b65; font: 600 10px 'Manrope', ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .15em; }
.section-meta span { color: var(--green); display: block; margin-bottom: 8px; }
.section-meta p { margin: 0; writing-mode: vertical-rl; }
.about-copy { max-width: 710px; }
h2 { font-size: clamp(58px, 5vw, 90px); line-height: .98; }
.about-copy .lead { color: #dceae5; font-size: clamp(19px, 1.35vw, 24px); line-height: 1.55; margin: 32px 0 20px; }
.about-copy > p:last-of-type { color: var(--muted); max-width: 630px; font-size: 15px; line-height: 1.75; }
.capabilities { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.capabilities span { border: 1px solid rgba(101,255,195,.15); color: #91aaa1; padding: 9px 12px; font: 600 9px 'Manrope', ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.portrait-frame { width: min(100%, 430px); justify-self: end; margin: 0; position: relative; }
.portrait-frame::before { content: ''; position: absolute; left: -18px; top: 24px; width: 1px; height: 72%; background: linear-gradient(var(--green), transparent); }
.portrait-frame img { display: block; width: 100%; aspect-ratio: .82; object-fit: cover; object-position: center 24%; filter: saturate(.72) contrast(1.06); clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 8% 100%, 0 92%); }
.portrait-frame figcaption { display: flex; justify-content: space-between; padding-top: 12px; color: #5d726a; font: 600 8px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.portrait-lines { position: absolute; z-index: -1; inset: -20px 20px 30px -24px; border: 1px solid rgba(101,255,195,.12); }
.orbital-mark { position: absolute; right: -12vw; top: 50%; width: 48vw; aspect-ratio: 1; transform: translateY(-50%); border: 1px solid rgba(101,255,195,.05); border-radius: 50%; }
.orbital-mark::after, .orbital-mark::before { content: ''; position: absolute; border: 1px solid rgba(101,255,195,.04); border-radius: 50%; inset: 13%; }
.orbital-mark::after { inset: 29%; }

.tile-section-layout { position: relative; z-index: 2; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: clamp(52px, 6.5vh, 84px); padding-bottom: clamp(24px, 3.5vh, 44px); }
.tile-section-header { display: grid; grid-template-columns: 120px minmax(0, 1fr) 28px; gap: clamp(36px, 5vw, 84px); align-items: end; padding-bottom: clamp(20px, 2.5vh, 34px); }
.tile-section-header .section-meta { align-self: start; margin-top: 4px; }
.tile-section-header .section-meta p { writing-mode: horizontal-tb; }
.tile-heading { position: relative; display: flex; align-items: end; gap: clamp(24px, 3vw, 52px); padding-top: 28px; }
.tile-heading .eyebrow { position: absolute; top: 0; left: 0; }
.tile-heading h2 { flex: 0 0 auto; font-size: clamp(52px, 5vw, 82px); }
.tile-heading > p:last-child { max-width: 430px; margin: 0 0 7px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tile-progress { width: 1px; height: 66px; justify-self: end; position: relative; background: rgba(101,255,195,.13); }
.tile-progress span { position: absolute; inset: 0; transform-origin: top; transform: scaleY(0); background: var(--green); will-change: transform; }
.tile-progress b { position: absolute; right: 10px; bottom: 0; color: #52675f; font: 600 8px ui-sans-serif, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; writing-mode: vertical-rl; }
.tile-columns-viewport { min-height: 0; overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); mask-image: linear-gradient(to bottom, transparent 0, black 22px, black calc(100% - 10px), transparent 100%); }
.tile-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(22px, 2.2vw, 40px); padding-inline: 120px 28px; will-change: transform, opacity; }
.tile-column { display: flex; min-width: 0; flex-direction: column; gap: clamp(14px, 1.5vh, 22px); padding: 24px 0 var(--tile-bottom-margin, 40px); will-change: transform; }
.tile-column-right { padding-top: clamp(62px, 8vh, 108px); }
.scroll-tile { position: relative; flex: 0 0 auto; padding: clamp(20px, 2.2vw, 34px); overflow: hidden; background: rgba(16,31,29,.76); border: 1px solid rgba(134,180,163,.14); border-radius: 3px; box-shadow: 0 22px 48px rgba(0,0,0,.13); transition: border-color .25s, background .25s, box-shadow .25s; }
.stage-education .scroll-tile { background: rgba(17,34,39,.82); }
.scroll-tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--green); transform: scaleY(0); transform-origin: bottom; transition: transform .32s var(--ease); }
.scroll-tile:hover, .scroll-tile:focus-within { border-color: rgba(101,255,195,.3); background: rgba(19,40,36,.92); box-shadow: 0 28px 58px rgba(0,0,0,.23); }
.scroll-tile:hover::before, .scroll-tile:focus-within::before { transform: scaleY(1); }
.scroll-tile-featured { border-color: rgba(101,255,195,.23); background: linear-gradient(135deg, rgba(22,52,43,.88), rgba(13,29,27,.83)); }
.tile-card-meta { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 16px; color: var(--green); font: 600 8px ui-sans-serif, system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.tile-card-meta time, .tile-card-meta span:last-child:not(:first-child) { color: #63776f; }
.scroll-tile h3 { max-width: 560px; margin: 0; color: #eef8f4; font: 500 clamp(20px, 1.55vw, 28px)/1.16 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
.tile-institution { margin: 8px 0 0; color: #a7bbb4; font-size: 13px; }
.tile-summary { margin: 18px 0 0; max-width: 650px; color: #849991; font-size: 13px; line-height: 1.68; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.tile-tags span { padding: 7px 9px; color: #91aaa1; background: rgba(101,255,195,.035); border: 1px solid rgba(101,255,195,.13); font: 600 8px ui-sans-serif, system-ui, sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.tile-links { display: flex; gap: 18px; margin-top: 20px; }
.tile-links a { color: #dceae5; text-decoration: none; font: 600 9px ui-sans-serif, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid rgba(101,255,195,.3); padding-bottom: 4px; transition: color .2s, border-color .2s; }
.tile-links a:hover, .tile-links a:focus-visible { color: var(--green); border-color: var(--green); }
.grid-field { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(123,174,155,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(123,174,155,.07) 1px, transparent 1px); background-size: 96px 96px; mask-image: linear-gradient(90deg, transparent, black 45%, black); }
.project-rings { position: absolute; right: 6vw; top: 50%; width: min(42vw, 670px); aspect-ratio: 1; transform: translateY(-50%); }
.project-rings i { position: absolute; border: 1px solid rgba(101,255,195,.11); border-radius: 50%; inset: 0; }
.project-rings i:nth-child(2) { inset: 18%; border-color: rgba(101,255,195,.2); }
.project-rings i:nth-child(3) { inset: 39%; background: rgba(101,255,195,.05); box-shadow: 0 0 90px rgba(101,255,195,.05); }

.contact-layout { position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: 120px 1fr minmax(390px, .75fr); gap: clamp(50px, 6vw, 100px); align-items: center; }
.contact-copy { max-width: 730px; }
.contact-copy p:last-child { color: var(--muted); max-width: 590px; line-height: 1.75; font-size: 17px; margin-top: 30px; }
.contact-links { border-top: 1px solid rgba(255,255,255,.11); }
.contact-links a { position: relative; display: grid; grid-template-columns: 1fr auto; padding: 22px 42px 22px 0; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.11); transition: padding .3s var(--ease), color .2s; }
.contact-links a:hover, .contact-links a:focus-visible { padding-left: 12px; color: var(--green); }
.contact-links span { font: 500 15px 'Manrope', ui-sans-serif, system-ui, sans-serif; }
.contact-links b { grid-row: 2; color: #65776f; font-size: 11px; font-weight: 400; margin-top: 5px; }
.contact-links i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-size: 18px; }
.contact-layout footer { position: absolute; left: var(--page-x); right: var(--page-x); bottom: 24px; display: flex; justify-content: space-between; color: #4c6159; text-transform: uppercase; font: 600 8px 'Manrope', ui-sans-serif, system-ui, sans-serif; letter-spacing: .15em; }
.contact-layout footer a { text-decoration: none; }
.contact-noise { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }

.ready .hero-copy { animation: rise .9s .1s var(--ease) both; }
.stage-panel .section-meta, .stage-panel h2, .stage-panel .lead, .stage-panel .contact-links, .stage-panel .portrait-frame { opacity: .32; transform: translateY(20px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.stage-panel.is-visible .section-meta, .stage-panel.is-visible h2, .stage-panel.is-visible .lead, .stage-panel.is-visible .contact-links, .stage-panel.is-visible .portrait-frame { opacity: 1; transform: none; }
.stage-panel.is-visible h2 { transition-delay: .06s; }
.stage-panel.is-visible .portrait-frame, .stage-panel.is-visible .contact-links { transition-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

@media (max-width: 1180px) and (min-width: 1024px) {
  :root { --page-x: 42px; }
  .availability { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .section-grid { grid-template-columns: 70px 1fr 330px; gap: 34px; }
  .contact-layout { grid-template-columns: 70px 1fr 390px; gap: 38px; }
  .tile-section-header { grid-template-columns: 70px minmax(0, 1fr) 20px; gap: 28px; }
  .tile-columns { padding-inline: 70px 20px; gap: 22px; }
  .tile-heading > p:last-child { max-width: 330px; }
}

@media (max-width: 1023px) {
  .site-shell { display: none; }
  .desktop-fallback { min-height: 100vh; padding: 36px; display: grid; place-content: center; text-align: center; background: radial-gradient(circle, #10251f, #07100f 68%); }
  .desktop-fallback img { width: 80px; margin: 0 auto 22px; }
  .desktop-fallback h1 { font-size: clamp(38px, 9vw, 72px); }
  .desktop-fallback p { max-width: 520px; color: var(--muted); line-height: 1.7; }
}

@media (max-width: 767px) {
  :root { --header-h: 62px; --page-x: 20px; }
  html, body { overflow-x: clip; }
  .site-shell { display: block; }
  .desktop-fallback { display: none; }
  .content-width { padding-inline: var(--page-x); }
  .site-header { height: var(--header-h); }
  .nav-inner { display: flex; justify-content: space-between; }
  .brand img { width: 38px; height: 38px; }
  nav, .availability { display: none; }
  .hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 620px; }
  .hero-content { align-items: end; padding-bottom: 110px; }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(50px, 15vw, 72px); }
  .hero-intro { font-size: 15px; }
  .hero-glow { left: 70%; width: 82vw; opacity: .55; }
  .orbital-mark { display: none; }
  .stage, .stage-contact { height: auto !important; min-height: 0; }
  .stage-panel { position: relative; top: auto; height: auto; min-height: 0; overflow: visible; padding-block: 72px; }
  .section-grid, .contact-layout { height: auto; display: block; }
  .section-meta { margin: 0 0 28px; }
  .section-meta p { writing-mode: horizontal-tb; }
  h2 { font-size: clamp(48px, 15vw, 68px); }
  .portrait-frame { margin-top: 46px; }
  .tile-section-layout { display: block; padding-block: 0; }
  .tile-section-header { display: block; }
  .tile-heading { display: block; padding-top: 28px; }
  .tile-heading h2 { font-size: 54px; }
  .tile-heading > p:last-child { margin-top: 18px; }
  .tile-progress { display: none; }
  .tile-columns-viewport { overflow: visible; mask-image: none; }
  .tile-columns { display: block; padding: 0; transform: none !important; }
  .tile-column { gap: 14px; padding: 18px 0 0; transform: none !important; }
  .tile-column-right { padding-top: 14px; }
  .scroll-tile { padding: 22px; }
  .contact-copy p:last-child { font-size: 15px; }
  .contact-links { margin-top: 42px; }
  .contact-layout footer { position: relative; left: auto; right: auto; bottom: auto; margin-top: 52px; }
}
