:root {
  --bg: #090a0c;
  --bg-soft: #0e1013;
  --panel: rgba(17, 19, 23, 0.72);
  --text: #f4f5f6;
  --muted: #92979f;
  --line: rgba(244, 245, 246, 0.14);
  --line-strong: rgba(244, 245, 246, 0.28);
  --accent: #8cffb7;
  --accent-dim: rgba(140, 255, 183, 0.12);
  --display: "Helvetica Neue", "Inter", "SF Pro Display", system-ui, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 65% -10%, rgba(140, 255, 183, 0.045), transparent 30rem),
    var(--bg);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.55;
  min-width: 320px;
  overflow-x: hidden;
}

::selection {
  color: var(--bg);
  background: var(--accent);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  opacity: 0.22;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate3d(calc(var(--mouse-x, 50vw) - 50%), calc(var(--mouse-y, 20vh) - 50%), 0);
  background: radial-gradient(circle, rgba(140, 255, 183, 0.075), transparent 66%);
  transition: transform 120ms ease-out;
}

.section-shell,
.site-header {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  position: relative;
  z-index: 10;
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  justify-self: start;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 1;
}

.wordmark span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 3rem);
}

nav a,
.system-status,
.section-index,
.hero-meta,
.build-label,
.progress-readout,
.site-footer {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav a {
  position: relative;
  color: var(--muted);
  transition: color 180ms ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.45rem;
  height: 1px;
  background: var(--accent);
  transition: right 180ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

nav a:hover::after,
nav a:focus-visible::after {
  right: 0;
}

.system-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(140, 255, 183, 0.55);
  animation: pulse 2.4s infinite;
}

.hero {
  min-height: calc(100svh - 92px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding-top: 1.6rem;
  padding-bottom: 2.25rem;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.hero-copy {
  padding: clamp(4rem, 10vh, 8rem) 0;
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2.8rem;
  max-width: 13ch;
  font-size: clamp(3.4rem, 8.4vw, 9.2rem);
  font-weight: 560;
  letter-spacing: -0.075em;
  line-height: 0.89;
}

.outline-word {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.hero-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.hero-footer p {
  max-width: 31rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.terminal-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  background: rgba(9, 10, 12, 0.72);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.terminal-prompt {
  color: var(--accent);
}

.terminal-command {
  color: var(--text);
}

.terminal-command::before {
  content: "$ ";
  color: var(--muted);
}

.terminal-cursor {
  width: 7px;
  height: 1.05em;
  background: var(--accent);
  animation: blink 1s steps(2, end) infinite;
}

.about,
.work,
.contact {
  border-top: 1px solid var(--line);
}

.about {
  display: grid;
  grid-template-columns: 0.75fr 1.7fr 1fr;
  gap: clamp(2rem, 6vw, 7rem);
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.section-index {
  color: var(--muted);
}

.about-copy .lead {
  max-width: 28ch;
  margin-bottom: 2.2rem;
  color: var(--text);
  font-size: clamp(1.75rem, 3.2vw, 3.2rem);
  font-weight: 470;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.about-copy > p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.about-details {
  margin: 0;
}

.about-details div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.about-details div:first-child {
  padding-top: 0;
}

.about-details dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.about-details dd {
  margin: 0;
  font-size: 0.94rem;
}

.work {
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.section-heading h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.empty-projects {
  min-height: 29rem;
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 0.65fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.025), transparent 38%),
    var(--panel);
  overflow: hidden;
}

.empty-visual {
  position: relative;
  width: min(100%, 18rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
}

.corner-tl { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.corner-tr { top: -1px; right: -1px; border-top: 1px solid; border-right: 1px solid; }
.corner-bl { bottom: -1px; left: -1px; border-bottom: 1px solid; border-left: 1px solid; }
.corner-br { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }

.empty-core {
  position: relative;
  z-index: 2;
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.6rem;
  box-shadow: 0 0 32px var(--accent-dim);
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  top: 50%;
  left: -3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(140, 255, 183, 0.8);
}

.orbit-one {
  width: 9rem;
  height: 9rem;
  animation: spin 10s linear infinite;
}

.orbit-two {
  width: 14rem;
  height: 14rem;
  animation: spin 18s linear infinite reverse;
}

.build-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.build-label i {
  width: 7px;
  height: 7px;
  background: #ffc56e;
}

.empty-copy h3 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.4rem, 4.8vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.empty-copy p {
  max-width: 33rem;
  margin-bottom: 0;
  color: var(--muted);
}

.progress-readout {
  align-self: end;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
}

.progress-track {
  width: clamp(3rem, 6vw, 6rem);
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.progress-track i {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent);
  animation: loading 2.4s ease-in-out infinite;
}

.contact {
  display: grid;
  grid-template-columns: 0.75fr 2.7fr;
  gap: 2rem;
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.contact-content p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-content h2 {
  margin-bottom: 2.6rem;
  font-size: clamp(3.4rem, 9vw, 9rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  transition: color 180ms ease, padding 180ms ease, border-color 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  color: var(--accent);
  border-color: var(--accent);
}

.site-footer {
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  justify-self: end;
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(.2,.75,.2,1), transform 700ms cubic-bezier(.2,.75,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(140, 255, 183, 0); }
  100% { box-shadow: 0 0 0 0 rgba(140, 255, 183, 0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loading {
  0%, 100% { transform: translateX(-110%); }
  50% { transform: translateX(240%); }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    display: none;
  }

  .system-status {
    font-size: 0.65rem;
  }

  .hero {
    min-height: calc(100svh - 92px);
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3.1rem, 13.6vw, 6.2rem);
  }

  .hero-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-details {
    margin-top: 1rem;
  }

  .empty-projects {
    grid-template-columns: 1fr;
  }

  .empty-visual {
    width: min(100%, 15rem);
  }

  .progress-readout {
    align-self: auto;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 76px;
  }

  .system-status {
    max-width: 10rem;
    text-align: right;
  }

  .coordinates {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 76px);
  }

  .terminal-line {
    gap: 0.55rem;
    overflow: hidden;
    white-space: nowrap;
  }

  .terminal-prompt {
    display: none;
  }

  .empty-projects {
    padding: 1.25rem;
  }

  .contact-link {
    font-size: 0.85rem;
  }
}

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