:root {
  color-scheme: dark;
  --bg: #222222;
  --panel: #2a2a2a;
  --text: #d7d5d0;
  --muted: #8e8d89;
  --line: #4a4a47;
  --accent: #e8ff65;
  --accent-ink: #171717;
  --display: Arial, Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e8e6df;
  --panel: #f2f0e9;
  --text: #20201e;
  --muted: #686762;
  --line: #bbb8ae;
  --accent: #335cff;
  --accent-ink: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  transition: background 180ms ease, color 180ms ease;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.editor-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 44px;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.editor-tab,
.editor-actions {
  display: flex;
  align-items: center;
}

.editor-tab {
  gap: 0.55rem;
  min-width: min(58vw, 320px);
  padding: 0 1rem;
  border-right: 1px solid var(--line);
  font-size: 0.72rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 75%, transparent);
}

.clock {
  padding: 0 0.85rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.editor-actions button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.theme-toggle {
  width: 44px;
  font-size: 1rem !important;
}

.menu-toggle {
  padding: 0 1rem;
  font-size: 0.68rem !important;
  text-transform: uppercase;
}

.editor-actions button:hover,
.editor-actions button:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}

.site-nav {
  position: fixed;
  top: 44px;
  right: 0;
  z-index: 9;
  display: grid;
  width: min(360px, 100%);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--panel);
  transform: translateY(-130%);
  transition: transform 220ms ease;
}

.site-nav.is-open {
  transform: translateY(0);
}

.site-nav a {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 44px);
  grid-template-columns: 44px 1fr;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  content: "";
  opacity: 0.12;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.line-numbers {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 2rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.eyebrow,
.section-label,
.project-index,
.project-tech,
.footer-meta {
  color: var(--muted);
  font-size: clamp(0.62rem, 1vw, 0.78rem);
  text-transform: uppercase;
}

h1 {
  margin: auto 0;
  font-family: var(--display);
  font-size: clamp(4rem, 13.5vw, 13rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.75;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: max(1px, 0.012em) var(--text);
}

.hero-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  line-height: 1.5;
}

.hero-meta p {
  margin: 0;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.availability span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

.ascii-mark {
  position: absolute;
  top: 15%;
  right: 5%;
  z-index: 0;
  margin: 0;
  color: var(--accent);
  font-size: clamp(0.75rem, 1.5vw, 1.2rem);
  line-height: 1.05;
  opacity: 0.3;
  transform: rotate(6deg);
}

.statement {
  padding: clamp(4rem, 11vw, 10rem) clamp(1.5rem, 7vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.statement p {
  max-width: 1350px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 8vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.statement em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.work {
  padding: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 5vw, 5rem);
}

.section-label {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 2rem 0 clamp(4rem, 8vw, 8rem);
  font-family: var(--display);
  font-size: clamp(3rem, 10vw, 10rem);
  letter-spacing: -0.08em;
  line-height: 0.85;
  text-transform: uppercase;
}

.project {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  transition: padding 180ms ease, background 180ms ease;
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project:hover {
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  background: var(--panel);
}

.project p {
  margin: 0;
}

.project h3 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 4rem);
  letter-spacing: -0.05em;
}

.project div p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.55;
}

.project-tech {
  text-align: right;
}

footer {
  padding: clamp(4rem, 10vw, 9rem) clamp(1.5rem, 5vw, 5rem) 1.5rem;
  background: var(--accent);
  color: var(--accent-ink);
}

footer > p {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

footer > a {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.9;
  text-decoration-thickness: 0.04em;
  text-underline-offset: 0.1em;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(5rem, 12vw, 12rem);
  color: currentColor;
}

.footer-meta div {
  display: flex;
  gap: 1rem;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

@media (max-width: 720px) {
  .clock {
    display: none;
  }

  .hero {
    min-height: 780px;
  }

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

  .project {
    grid-template-columns: 42px 1fr;
    gap: 1rem;
  }

  .project-tech {
    grid-column: 2;
    text-align: left;
  }

  .footer-meta {
    align-items: start;
    flex-direction: column;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
