:root {
  --paper: #f3f0e8;
  --ink: #171713;
  --muted: #69675f;
  --line: rgba(23, 23, 19, 0.18);
  --card: #e7e2d7;
  --accent: #ff5c35;
  --accent-ink: #171713;
  --sans: "Noto Sans SC", sans-serif;
  --mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  transition: background 300ms ease, color 300ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  content: "";
  opacity: 0.14;
  pointer-events: none;
}

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

button {
  color: inherit;
}

.page-shell {
  width: min(1440px, calc(100% - 72px));
  margin: 0 auto;
}

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

.wordmark {
  justify-self: start;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

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

nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
  font-weight: 500;
}

nav a {
  position: relative;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 24px;
  padding: 3px;
  justify-self: end;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.theme-toggle span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 250ms ease;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
  min-height: calc(100vh - 88px);
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-index,
.project-type,
.card-topline,
.card-footer,
footer {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  color: var(--muted);
}

.eyebrow > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent);
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(68px, 9vw, 146px);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.94;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-intro {
  max-width: 600px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 15px 18px;
  font-size: 13px;
  font-weight: 600;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
  transition: transform 200ms ease, background 200ms ease;
}

.button-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.text-link {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero-mark {
  position: relative;
  display: grid;
  width: min(28vw, 390px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
}

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

.orbit::after {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.orbit-one {
  animation: spin 18s linear infinite;
}

.orbit-two {
  inset: 17%;
  animation: spin 12s linear infinite reverse;
}

.orbit-two::after {
  top: 10%;
  background: var(--ink);
}

.core {
  position: relative;
  display: grid;
  width: 37%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  overflow: hidden;
}

.core::before,
.core::after {
  position: absolute;
  border: 1px solid rgba(23, 23, 19, 0.3);
  border-radius: 50%;
  content: "";
}

.core::before {
  inset: 17%;
}

.core::after {
  inset: 34%;
}

.core-axis {
  position: absolute;
  background: var(--accent-ink);
  opacity: 0.75;
}

.axis-x {
  width: 62%;
  height: 1px;
}

.axis-y {
  width: 1px;
  height: 62%;
}

.core-dot {
  position: absolute;
  top: 27%;
  left: 62%;
  width: 11%;
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-ink);
  box-shadow: 0 0 0 5px rgba(23, 23, 19, 0.14);
}

.core > * {
  animation: compass-turn 9s ease-in-out infinite alternate;
}

@keyframes compass-turn {
  to {
    transform: rotate(135deg);
  }
}

.hero-mark p {
  position: absolute;
  right: 5%;
  bottom: 9%;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  writing-mode: vertical-rl;
}

.hero-mark p span {
  color: var(--accent);
}

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

.section {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

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

.section-index {
  margin: 0 0 16px;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 74px);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.section-heading > p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
}

.project-card {
  display: flex;
  min-height: 420px;
  padding: 22px;
  flex-direction: column;
  background: var(--card);
  transition: background 250ms ease, color 250ms ease, transform 250ms ease;
}

.project-card:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-5px);
}

.project-card.featured {
  background: var(--accent);
  color: var(--accent-ink);
}

.project-card.featured:hover {
  background: var(--ink);
  color: var(--paper);
}

.card-topline,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.8s ease-in-out infinite;
}

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

.card-body {
  margin: auto 0;
}

.project-type {
  margin: 0 0 16px;
  opacity: 0.58;
}

.card-body h3 {
  margin: 0 0 18px;
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.card-body > p:last-child {
  max-width: 300px;
  margin: 0;
  opacity: 0.66;
  font-size: 13px;
  line-height: 1.7;
}

.card-footer {
  padding-top: 18px;
  border-top: 1px solid currentColor;
}

.arrow {
  font-size: 18px;
  transition: transform 200ms ease;
}

.project-card:hover .arrow {
  transform: translate(3px, -3px);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 52px;
}

.about-copy {
  max-width: 600px;
}

.about-copy blockquote {
  margin: 0 0 34px;
}

.about-copy blockquote p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.5;
}

.about-copy blockquote cite {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.about-copy > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.availability {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.availability > span {
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--paper);
}

.availability p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
}

.availability strong {
  color: var(--ink);
  font-weight: 500;
}

footer {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

footer a:hover {
  color: var(--accent);
}

body.dark {
  --paper: #161612;
  --ink: #f0ede4;
  --muted: #9a988f;
  --line: rgba(240, 237, 228, 0.18);
  --card: #25251f;
  --accent-ink: #171713;
}

body.dark .theme-toggle span {
  transform: translateX(18px);
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 40px, 720px);
  }

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

  nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 100px 0 80px;
  }

  .hero-mark {
    display: none;
  }

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

  .project-card {
    min-height: 360px;
  }

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

@media (max-width: 600px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 72px;
  }

  .hero {
    padding: 72px 0 64px;
  }

  h1 {
    font-size: clamp(54px, 18vw, 78px);
  }

  .hero-intro {
    margin-top: 28px;
    font-size: 14px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
  }

  .section {
    padding: 80px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .project-card {
    min-height: 330px;
  }

  footer {
    min-height: 140px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  footer p {
    margin: 0;
  }
}

@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;
  }
}
