:root {
  --bg: #07100d;
  --bg-soft: #0a1713;
  --panel: #0c1b16;
  --panel-bright: #10251e;
  --line: #21483c;
  --line-bright: #397864;
  --text: #eef7f2;
  --muted: #91aaa0;
  --green: #79e8bb;
  --green-soft: #b1f6d9;
  --blue: #91b9f6;
  --gold: #ead374;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); font-weight: 300; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.shell-width { width: min(var(--width), calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; background: var(--green); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 91%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 12px; }
.brand { color: var(--muted); white-space: nowrap; }
.brand b { color: var(--green); font-weight: 500; }
.brand span { color: var(--blue); }
.nav-links { display: flex; gap: clamp(14px, 2.5vw, 34px); }
.nav-links a { color: var(--muted); transition: color .2s ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.is-active { color: var(--green); }
.location { color: var(--gold); font-size: 10px; white-space: nowrap; }

.hero { min-height: 680px; display: grid; grid-template-columns: 1.14fr .86fr; align-items: center; gap: clamp(44px, 7vw, 92px); padding-block: 78px; position: relative; isolation: isolate; }
.hero-grid-lines { position: absolute; z-index: -2; inset: 0; opacity: .45; background-image: linear-gradient(#79e8bb0a 1px, transparent 1px), linear-gradient(90deg, #79e8bb0a 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 550px; height: 550px; right: 0; top: -110px; background: radial-gradient(circle, #25a4772c, transparent 67%); pointer-events: none; }
.command-line { margin: 0 0 20px; color: #c3d1cb; font-size: 12px; }
.prompt { color: var(--green); }
.path { color: var(--blue); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(56px, 7vw, 88px); font-weight: 400; letter-spacing: -.055em; line-height: .88; }
h1 em { color: var(--green); font-weight: 400; }
.hero-summary { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.terminal-button { display: inline-flex; align-items: center; min-height: 45px; padding: 10px 16px; border: 1px solid var(--line-bright); background: var(--panel); color: var(--green-soft); font-size: 11px; font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.terminal-button:hover, .terminal-button:focus-visible { background: var(--panel-bright); transform: translateY(-2px); }
.terminal-button.primary { background: var(--green); color: var(--bg); border-color: var(--green); }
.terminal-button.primary:hover, .terminal-button.primary:focus-visible { background: var(--green-soft); }

.profile-terminal, .social-terminal { border: 1px solid var(--line-bright); background: var(--panel); box-shadow: 16px 16px 0 #0b261e; }
.profile-terminal { --profile-x: 0px; --profile-y: 0px; --profile-lift: 0px; cursor: grab; outline: none; touch-action: none; transform: perspective(1000px) translate3d(var(--profile-x), var(--profile-y), 0) rotateX(var(--profile-tilt-x, 0deg)) rotateY(var(--profile-tilt-y, 0deg)) translateY(var(--profile-lift)); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.profile-terminal:hover, .profile-terminal:focus-visible, .profile-terminal.is-selected { --profile-lift: -4px; border-color: var(--green); box-shadow: 22px 22px 0 #0b2d23, 0 0 0 1px #79e8bb33; }
.profile-terminal.is-dragging { cursor: grabbing; transition: none; }
.terminal-chrome { min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #0d201a; }
.terminal-chrome span:last-child { margin-left: 7px; color: var(--muted); font-size: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: #f07770; }.dot.yellow { background: #e7d16e; }.dot.green { background: #6ed6a5; }
.profile-image-wrap { position: relative; aspect-ratio: 1 / .94; overflow: hidden; background: var(--panel-bright); }
.profile-image-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1); transition: transform .28s ease; will-change: transform; }
.profile-terminal.is-selected .profile-image-wrap img { transform: scale(1.04); }
.profile-terminal.is-dragging .profile-image-wrap img { transition: none; }
.profile-image-wrap::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px #07100d52; pointer-events: none; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: #d7fff0; opacity: .6; box-shadow: 0 0 14px var(--green); animation: scan 6s linear infinite; }
.profile-meta { display: flex; justify-content: space-between; gap: 8px; padding: 12px 14px; color: var(--green); font-size: 8px; border-top: 1px solid var(--line); }

.identity-strip { border-block: 1px solid var(--line); background: #08130f; }
.identity-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.identity-grid > div { min-height: 98px; padding: 21px 24px; border-right: 1px solid var(--line); }
.identity-grid > div:first-child { padding-left: 0; }.identity-grid > div:last-child { border: 0; }
.identity-grid strong { display: block; font: 400 23px/1.2 var(--serif); color: var(--green-soft); }
.identity-grid span { display: block; margin-top: 7px; color: #6f8e82; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }

.section { padding-block: 116px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 42px; align-items: end; margin-bottom: 48px; }
.section-heading .command-line { margin-bottom: 14px; }
.section-heading h2, .contact-copy h2 { margin: 0; font: 400 clamp(44px, 6vw, 70px)/.95 var(--serif); letter-spacing: -.045em; }
.section-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.8; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project-card { min-height: 310px; display: grid; grid-template-columns: 42px 1fr; gap: 22px; padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); transition: background .25s, box-shadow .25s, transform .25s; }
.project-card:hover, .project-card:focus-visible { position: relative; z-index: 2; background: var(--panel-bright); box-shadow: inset 0 0 0 1px var(--green); outline: 0; transform: translateY(-3px); }
.project-card.featured { grid-column: 1 / -1; min-height: 340px; background: #0d201a; }
.project-card.more { display: flex; align-items: center; background: transparent; }
.project-index { color: #65877a; font-size: 10px; }
.project-topline { display: flex; justify-content: space-between; margin: 0; color: var(--green); font-size: 9px; letter-spacing: .07em; }
.project-card h3 { margin: 35px 0 13px; font: 400 37px/1 var(--serif); letter-spacing: -.03em; }
.project-card.featured h3 { font-size: 53px; }
.project-card h3 + p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.tags li { padding: 5px 8px; border: 1px solid var(--line); color: #aac4b9; font-size: 9px; }

.section-ruled { border-block: 1px solid var(--line); background: var(--bg-soft); }
.experience-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.experience-row { display: grid; grid-template-columns: 120px 1fr 120px; gap: 22px; align-items: center; min-height: 110px; border-bottom: 1px solid var(--line); }
.experience-date { color: #739688; font-size: 10px; }
.experience-row h3 { margin: 0 0 5px; font: 400 23px/1.2 var(--serif); }
.experience-row p { margin: 0; color: var(--muted); font-size: 11px; }
.log-state { justify-self: end; padding: 5px 8px; border: 1px solid var(--line-bright); color: var(--green); font-size: 9px; }

.education-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.education-card { position: relative; min-height: 300px; padding: 30px 36px; border: 1px solid var(--line); background: var(--bg-soft); }
.education-period { color: var(--gold); font-size: 9px; }
.json-bracket { display: block; margin-top: 24px; color: var(--green); font: 400 29px/1 var(--serif); }
.json-bracket.close { margin: 10px 0 0; }
.education-card dl { margin: 7px 0 0 30px; }
.education-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; margin: 12px 0; }
.education-card dt { color: var(--blue); font-size: 10px; }.education-card dt::after { content: ":"; color: var(--text); }
.education-card dd { margin: 0; color: #d5e5de; font-size: 11px; }.education-card dd::before, .education-card dd::after { content: '"'; color: var(--gold); }

.contact-section { border-top: 1px solid var(--line); background: #091611; }
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.contact-copy > p:not(.command-line) { max-width: 570px; margin: 24px 0 28px; color: var(--muted); font-size: 12px; }
.email-link { display: inline-block; padding-bottom: 5px; border-bottom: 1px solid var(--green); color: var(--green); font-size: clamp(11px, 1.6vw, 15px); }
.social-links { display: grid; }
.social-links a { display: grid; grid-template-columns: 40px 1fr auto; padding: 17px 20px; border-bottom: 1px solid var(--line); color: #cbdcd5; font-size: 12px; transition: color .2s, background .2s; }
.social-links a:last-child { border-bottom: 0; }.social-links a:hover, .social-links a:focus-visible { color: var(--green); background: var(--panel-bright); }.social-links span { color: #5f8074; }.social-links strong { font-weight: 400; }

.music-dock { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-end; }
.music-button { min-height: 42px; padding: 10px 14px; border: 1px solid var(--line-bright); background: #0c1b16eb; color: var(--green); box-shadow: 7px 7px 0 #06100d; cursor: pointer; font-size: 10px; backdrop-filter: blur(10px); }
.music-button:hover, .music-button:focus-visible { background: var(--panel-bright); }.music-icon { display: inline-block; width: 18px; color: var(--gold); }
.music-player { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.music-player iframe { width: 1px; height: 1px; display: block; border: 0; }
.music-fallback { max-width: 320px; padding: 8px; background: var(--panel); color: var(--muted); font-size: 9px; }.music-fallback a { color: var(--green); text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #668479; font-size: 9px; }
.footer-inner p { margin: 0; }.cursor { display: inline-block; width: 7px; height: 13px; background: var(--green); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.js .reveal:not(.profile-terminal) { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal:not(.profile-terminal).is-visible { opacity: 1; transform: none; }
.js .profile-terminal.reveal { opacity: 0; }
.js .profile-terminal.reveal.is-visible { opacity: 1; }
*:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }

@keyframes scan { from { transform: translateY(0); } to { transform: translateY(430px); } }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .location { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 72px 90px; }
  .hero-copy { max-width: 760px; }.profile-terminal { width: min(520px, 100%); }
  .identity-grid { grid-template-columns: repeat(2, 1fr); }.identity-grid > div:nth-child(2) { border-right: 0; }.identity-grid > div:first-child, .identity-grid > div:nth-child(3) { padding-left: 0; }.identity-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; align-items: start; }.section-heading > p { max-width: 520px; }
  .contact-grid { grid-template-columns: 1fr; }.social-terminal { max-width: 560px; }
}

@media (max-width: 680px) {
  .shell-width { width: min(100% - 36px, var(--width)); }
  .nav { min-height: 58px; overflow: hidden; }.brand { padding-right: 8px; }.nav-links { gap: 14px; }.nav-links a:nth-child(2), .nav-links a:nth-child(3) { display: none; }
  .hero { min-height: auto; gap: 44px; padding-block: 62px 70px; }.hero-summary { font-size: 12px; }.profile-meta { font-size: 7px; }
  .identity-grid { grid-template-columns: 1fr 1fr; }.identity-grid strong { font-size: 18px; }.identity-grid > div { min-height: 88px; padding: 18px 13px; }
  .section { padding-block: 84px; }.section-heading { margin-bottom: 34px; }
  .project-grid { grid-template-columns: 1fr; }.project-card.featured { grid-column: auto; }.project-card { min-height: 280px; padding: 24px; }.project-card.featured h3 { font-size: 42px; }
  .experience-row { grid-template-columns: 76px 1fr; padding: 19px 0; }.log-state { display: none; }.experience-row h3 { font-size: 20px; }
  .education-grid { grid-template-columns: 1fr; }.education-card { padding: 26px 22px; }.education-card dl { margin-left: 18px; }.education-card dl div { grid-template-columns: 90px 1fr; }
  .contact-grid { gap: 45px; }.music-dock { right: 14px; bottom: 14px; }.footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}

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