:root {
  --ink: #07111f;
  --ink-2: #0c1929;
  --panel: #112237;
  --line: rgba(255,255,255,.12);
  --muted: #91a2b6;
  --paper: #f5f7f8;
  --accent: #43f2a1;
  --accent-2: #66d7ff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: #fff; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.section-shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.section-space { padding-block: 128px; }

.site-header { width: min(calc(100% - 48px), var(--max)); height: 86px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(67,242,161,.55); color: var(--accent); font-size: .78rem; letter-spacing: -.04em; transform: rotate(-4deg); }
.main-nav { display: flex; align-items: center; gap: 34px; font-size: .88rem; color: #b6c2ce; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--accent); }
.main-nav .nav-contact { border: 1px solid var(--line); padding: 10px 18px; color: #fff; }
.menu-toggle { display: none; border: 0; background: none; color: white; padding: 8px; }
.menu-toggle span { display: block; width: 26px; height: 1px; background: currentColor; margin: 6px; }

.hero { min-height: calc(100vh - 86px); display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(40px, 7vw, 92px); padding-block: 56px 92px; position: relative; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; left: -330px; top: 10%; background: var(--accent-2); opacity: .08; filter: blur(100px); border-radius: 50%; }
.eyebrow { color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 24px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.45rem, 6.7vw, 6.6rem); line-height: .94; letter-spacing: -.065em; margin: 24px 0 30px; font-weight: 760; }
h1 em, h2 em { font-family: Georgia, serif; font-weight: 400; color: var(--accent); }
.hero-text { color: #b0becc; font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 610px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.button { min-height: 50px; padding: 13px 22px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: .92rem; border: 1px solid var(--line); transition: .25s ease; }
.button-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.button-primary:hover { background: #fff; border-color: #fff; transform: translateY(-2px); }
.button-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-tags { list-style: none; display: flex; gap: 12px; padding: 0; margin: 38px 0 0; color: #7f91a4; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.hero-tags li:not(:last-child)::after { content: "/"; margin-left: 12px; color: #435267; }
.portrait-wrap { position: relative; justify-self: end; width: min(100%, 470px); }
.portrait-frame { position: relative; border: 1px solid var(--line); padding: 14px; background: rgba(255,255,255,.025); }
.portrait-frame::before { content: ""; position: absolute; inset: -1px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); clip-path: polygon(68% 0,100% 0,100% 32%,98% 32%,98% 2%,68% 2%); pointer-events: none; }
.portrait-frame img { width: 100%; aspect-ratio: .78; display: block; object-fit: cover; object-position: center; filter: contrast(1.05); }
.portrait-card { position: absolute; left: -34px; bottom: 28px; background: rgba(7,17,31,.94); backdrop-filter: blur(12px); border: 1px solid var(--line); padding: 15px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.portrait-card strong, .portrait-card small { display: block; }
.portrait-card strong { font-size: .84rem; }
.portrait-card small { color: var(--muted); font-size: .72rem; }
.status-dot { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(67,242,161,.12); }
.code-stamp { position: absolute; right: -42px; bottom: -25px; color: rgba(102,215,255,.42); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; line-height: 1.35; transform: rotate(4deg); }

.about { border-top: 1px solid var(--line); }
.section-label { color: #75879a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; font-size: .76rem; display: flex; gap: 13px; align-items: center; }
.section-label span { color: var(--accent); }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 9vw; margin-top: 55px; }
h2 { font-size: clamp(2.7rem, 5vw, 5.25rem); line-height: 1; letter-spacing: -.055em; margin-bottom: 28px; }
.about-copy { color: #aebbc8; font-size: 1.14rem; padding-top: 5px; }
.about-copy p + p { margin-top: 24px; }
.principles { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 88px; border-top: 1px solid var(--line); }
.principles article { padding: 32px 28px 0 0; border-right: 1px solid var(--line); min-height: 190px; }
.principles article + article { padding-left: 28px; }
.principles article:last-child { border: 0; }
.principles span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; }
.principles h3 { font-size: 1.35rem; margin: 20px 0 8px; }
.principles p { color: var(--muted); font-size: .94rem; max-width: 270px; }

.tech-section { background: var(--paper); color: var(--ink); }
.section-heading { max-width: 750px; }
.section-heading h2 { margin: 25px 0 20px; }
.section-heading > p { color: #5c6977; font-size: 1.08rem; max-width: 630px; }
.tech-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 58px; }
.tech-card { background: #fff; border: 1px solid #dce2e6; padding: 28px; min-height: 320px; position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.tech-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(22,43,60,.09); }
.tech-icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--ink); color: var(--accent); font-weight: 800; font-size: .88rem; }
.learning { position: absolute; top: 32px; right: 28px; color: #5c6977; font-size: .67rem; letter-spacing: .12em; }
.tech-card h3 { font-size: 1.48rem; margin: 40px 0 12px; }
.tech-card p { color: #667381; font-size: .94rem; }
.study-line { height: 2px; position: absolute; bottom: 30px; left: 28px; right: 28px; overflow: hidden; background: repeating-linear-gradient(90deg, #0ebd78 0 20px, #e8ecee 20px 28px); }

.projects .section-heading { margin-bottom: 55px; }
.project-board { max-width: 920px; margin-left: auto; border: 1px solid var(--line); background: var(--ink-2); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.terminal-bar { height: 46px; display: flex; align-items: center; gap: 7px; padding-inline: 16px; border-bottom: 1px solid var(--line); }
.terminal-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #314054; }
.terminal-bar > span:first-child { background: #ff6b6b; }
.terminal-bar > span:nth-child(2) { background: #f2c14e; }
.terminal-bar > span:nth-child(3) { background: var(--accent); }
.terminal-bar small { color: #617186; margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.project-empty { padding: clamp(42px, 7vw, 80px); }
.prompt { color: #6f8398; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.prompt span { color: var(--accent); }
.project-empty h3 { font-size: clamp(2rem, 4vw, 3.7rem); letter-spacing: -.04em; line-height: 1.05; margin: 32px 0 12px; }
.project-empty p { color: var(--muted); }
.project-empty a { display: inline-flex; gap: 10px; color: var(--accent); font-weight: 700; margin-top: 22px; padding-bottom: 5px; border-bottom: 1px solid rgba(67,242,161,.35); }

.contact { padding-top: 20px; }
.contact-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 98px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px 8vw; align-items: end; }
.contact-panel .eyebrow { grid-column: 1 / -1; }
.contact-panel h2 { margin: 0; }
.contact-panel > p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; align-self: start; max-width: 500px; }
.contact-links { grid-column: 2; }
.contact-links a { display: flex; justify-content: space-between; align-items: center; padding: 19px 2px; border-bottom: 1px solid var(--line); font-size: 1.08rem; transition: color .2s ease, padding .2s ease; }
.contact-links a:hover { color: var(--accent); padding-inline: 8px; }
.contact-links b { font-weight: 400; }
.site-footer { min-height: 145px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #74869a; font-size: .82rem; }
.site-footer .brand { color: #fff; }
.site-footer a:hover { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 850px) {
  .section-shell, .site-header { width: min(calc(100% - 32px), var(--max)); }
  .section-space { padding-block: 90px; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 75px; background: var(--ink-2); border: 1px solid var(--line); padding: 20px; flex-direction: column; align-items: stretch; gap: 0; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .2s ease; }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav a { padding: 13px; }
  .main-nav .nav-contact { margin-top: 8px; text-align: center; }
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .portrait-wrap { justify-self: center; width: min(88%, 470px); }
  .about-grid, .contact-panel { grid-template-columns: 1fr; gap: 35px; }
  .tech-grid { grid-template-columns: 1fr; }
  .contact-links { grid-column: 1; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(3rem, 14vw, 4.5rem); }
  .hero-tags { flex-wrap: wrap; }
  .portrait-card { left: -8px; right: -8px; bottom: 16px; }
  .code-stamp { display: none; }
  .principles { grid-template-columns: 1fr; }
  .principles article, .principles article + article { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 0; min-height: auto; }
  .principles article:last-child { border-bottom: 0; }
  .project-empty { padding: 38px 24px; }
  .site-footer { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
