:root {
  --bg: #090a0b;
  --panel: #101214;
  --panel-2: #14171a;
  --text: #f0f1ed;
  --muted: #8f9699;
  --muted-2: #666d71;
  --line: #272b2e;
  --accent: #d7ff39;
  --accent-dim: rgba(215,255,57,.13);
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(var(--max), calc(100% - 56px));
  margin-inline: auto;
}


/* ============================================================
   GRAIN
   ============================================================ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}


/* ============================================================
   CURSOR GLOW
   ============================================================ */

.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    var(--accent-dim),
    transparent 68%
  );
  transform: translate(-50%, -50%);
  opacity: .22;
  filter: blur(5px);
}


/* ============================================================
   NAV
   ============================================================ */

.nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.brand {
  font: 700 15px 'DM Mono', monospace;
  letter-spacing: .02em;
}

.brand-mark {
  color: var(--accent);
  font-size: 22px;
  margin-right: 5px;
}

.nav-center {
  font: 10px 'DM Mono', monospace;
  color: var(--muted-2);
  display: flex;
  gap: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-status i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font: 10px 'DM Mono', monospace;
  border: 1px solid var(--line);
  padding: 9px 11px;
  border-radius: 999px;
  text-transform: uppercase;

  transition:
    border-color .2s ease,
    color .2s ease,
    transform .2s ease;
}

.nav-link:hover {
  border-color: #41474b;
  color: var(--accent);
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: calc(100vh - 84px);
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0,1fr) 210px;
  align-content: center;
  gap: 30px;
  padding-block: 95px 65px;
}

.hero-index {
  font: 10px 'DM Mono', monospace;
  color: var(--muted-2);
  padding-top: 13px;
}

.hero-main {
  max-width: 860px;
}

.eyebrow {
  font: 10px 'DM Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 25px;
}

.hero h1 {
  font-size: clamp(62px,10vw,150px);
  line-height: .88;
  letter-spacing: -.075em;
  margin: 0 0 34px;
  font-weight: 800;
}

.hero h1 span {
  color: var(--accent);
}

.hero-lede {
  max-width: 760px;
  color: #aeb4b6;
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 38px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  padding: 14px 17px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;

  transition:
    transform .2s ease,
    filter .2s ease,
    border-color .2s ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button-solid {
  background: var(--accent);
  color: #111;
}

.button-solid:hover {
  filter: brightness(1.04);
}

.button-quiet {
  border: 1px solid var(--line);
  color: #c5cbcd;
}

.button-quiet:hover {
  border-color: #41474b;
}

.hero-aside {
  align-self: end;
  color: var(--muted);
  font: 11px/1.7 'DM Mono', monospace;
  text-transform: uppercase;
}

.aside-line {
  height: 1px;
  background: var(--line);
  margin-bottom: 18px;
}

.signature {
  margin-top: 50px;
  color: #33383b;
  font: 700 39px/.82 Manrope,sans-serif;
  letter-spacing: -.06em;
}

.hero-bottom {
  grid-column: 2/4;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted-2);
  font: 9px 'DM Mono',monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}


/* ============================================================
   MANIFESTO
   ============================================================ */

.manifesto {
  border-block: 1px solid var(--line);
  background: linear-gradient(
    100deg,
    #0d0f10,
    #0b0c0d
  );
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr);
  gap: 30px;
  padding-block: 120px;
}

.manifesto-label,
.kicker {
  font: 10px 'DM Mono',monospace;
  letter-spacing: .12em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.manifesto-copy {
  max-width: 1040px;
}

.manifesto-big {
  font-size: clamp(39px,5.5vw,75px);
  line-height: 1.03;
  letter-spacing: -.06em;
  margin: 0 0 55px;
  font-weight: 700;
}

.manifesto-big em {
  font-style: normal;
  color: var(--accent);
}

.manifesto-text {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 30px;
  max-width: 1000px;
}

.manifesto-text p {
  color: #979ea1;
  font-size: 14px;
  line-height: 1.9;
  margin: 0;
}


/* ============================================================
   GENERAL SECTIONS
   ============================================================ */

.section-pad {
  padding-block: 120px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(37px,5vw,64px);
  letter-spacing: -.06em;
  line-height: .98;
  margin: 9px 0 0;
}

.text-link {
  font: 10px 'DM Mono',monospace;
  color: #b2b8ba;
  text-transform: uppercase;
  letter-spacing: .08em;

  transition:
    color .2s ease,
    transform .2s ease;
}

.text-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}


/* ============================================================
   PROJECTS
   ============================================================ */

.project-list {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 70px minmax(0,1fr) 65px;
  gap: 24px;
  padding: 42px 0;
  border-bottom: 1px solid var(--line);

  transition:
    padding .25s ease,
    background .25s ease;
}

.project-row:hover {
  padding-left: 17px;
  padding-right: 17px;
  background: rgba(255,255,255,.018);
}

.project-no {
  font: 10px 'DM Mono',monospace;
  color: var(--muted-2);
  padding-top: 8px;
}

.project-type {
  font: 9px 'DM Mono',monospace;
  color: var(--muted-2);
  letter-spacing: .12em;
}

.project-info h3 {
  font-size: clamp(31px,4vw,52px);
  letter-spacing: -.05em;
  line-height: 1;
  margin: 11px 0 15px;
}

.project-info p {
  max-width: 800px;
  margin: 0 0 22px;
  color: #91989b;
  font-size: 14px;
  line-height: 1.8;
}

.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tags span {
  font: 9px 'DM Mono',monospace;
  color: #8d9497;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 999px;

  transition:
    color .2s ease,
    border-color .2s ease;
}

.project-arrow {
  font-size: 26px;
  justify-self: end;
  color: var(--muted);

  transition:
    transform .2s ease,
    color .2s ease;
}

.project-row:hover .project-arrow {
  transform: translate(4px,-4px);
  color: var(--accent);
}

.featured .project-info h3 {
  color: var(--accent);
}


/* ============================================================
   PRINCIPLES
   ============================================================ */

.principles {
  border-top: 1px solid var(--line);
  background: #0d0f10;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-top: 1px solid var(--line);
}

.principle {
  min-height: 245px;
  padding: 25px 23px;
  border-right: 1px solid var(--line);

  transition:
    background .3s ease,
    transform .3s ease;
}

.principle:last-child {
  border-right: 0;
}

.principle:hover {
  background: rgba(255,255,255,.012);
}

.principle span {
  font: 10px 'DM Mono',monospace;
  color: var(--muted-2);
}

.principle h3 {
  font-size: 25px;
  letter-spacing: -.04em;
  margin: 55px 0 10px;
}

.principle p {
  color: #858c90;
  font-size: 12px;
  line-height: 1.75;
  margin: 0;
}


/* ============================================================
   NOW
   ============================================================ */

.now {
  border-bottom: 1px solid var(--line);
}

.now-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font: 10px 'DM Mono',monospace;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.now-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 100px;
  padding-top: 55px;
}

.now-grid h2 {
  font-size: clamp(42px,6vw,76px);
  line-height: .98;
  letter-spacing: -.065em;
  margin: 0;
}

.now-grid h2 span {
  color: var(--muted-2);
}

.now-copy p {
  color: #939a9d;
  font-size: 15px;
  line-height: 1.9;
  margin: 0 0 35px;
}

.now-meter {
  display: grid;
  gap: 13px;
}

.now-meter div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: center;
  font: 9px 'DM Mono',monospace;
  color: var(--muted-2);
}

.now-meter b {
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--accent);
}


/* ============================================================
   CONTACT
   ============================================================ */

.contact {
  background: var(--accent);
  color: #111;
}

.contact-inner {
  padding-block: 115px;
}

.contact .kicker {
  color: #485700;
}

.contact h2 {
  font-size: clamp(54px,9vw,120px);
  line-height: .88;
  letter-spacing: -.075em;
  margin: 12px 0 28px;
}

.contact p {
  margin: 0 0 35px;
  color: #475400;
  font-size: 15px;
}

.contact-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  font: 10px 'DM Mono',monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.contact-links a {
  border-bottom: 1px solid rgba(17,17,17,.25);
  padding-bottom: 5px;

  transition:
    transform .2s ease,
    border-color .2s ease;
}

.contact-links a:hover {
  transform: translateY(-2px);
  border-color: #111;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 25px 32px;
  color: #565d60;
  font: 9px 'DM Mono',monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}


/* ============================================================
   04 / THE DIRECTION
   ============================================================ */

.direction {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      circle at 82% 12%,
      rgba(215,255,57,.045),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #0b0d0e 0%,
      #0d0f10 100%
    );
}

.direction::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(100% - 1px),
      rgba(215,255,57,.035) calc(100% - 1px),
      rgba(215,255,57,.035) 100%
    );
  background-size: 20% 100%;
  opacity: .45;
}

.direction .section-pad {
  position: relative;
  z-index: 1;
}

.direction .section-head {
  align-items: flex-start;
  margin-bottom: 34px;
}

.direction .section-head h2 {
  max-width: 760px;
}

.direction-intro {
  display: grid;
  grid-template-columns: 110px minmax(0,760px);
  gap: 30px;
  margin: 0 0 70px;
}

.direction-intro::before {
  content: "↳";
  font: 20px 'DM Mono',monospace;
  color: var(--accent);
  padding-top: 3px;
}

.direction-intro p {
  margin: 0;
  color: #b0b7b9;
  font-size: 17px;
  line-height: 1.85;
  max-width: 760px;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.direction-item {
  position: relative;
  min-height: 315px;
  padding: 24px 22px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255,255,255,.008);

  transition:
    transform .35s ease,
    background .35s ease,
    border-color .35s ease;
}

.direction-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;

  transition:
    transform .35s ease;
}

.direction-item:hover {
  transform: translateY(-7px);
  background: rgba(215,255,57,.035);
  border-color: #34393b;
}

.direction-item:hover::after {
  transform: scaleX(1);
}

.direction-item > span {
  display: inline-flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 9px 'DM Mono',monospace;
  color: var(--muted-2);

  transition:
    border-color .3s ease,
    color .3s ease,
    background .3s ease,
    transform .3s ease;
}

.direction-item:hover > span {
  border-color: var(--accent);
  color: #111;
  background: var(--accent);
  transform: scale(1.08) rotate(6deg);
}

.direction-item h3 {
  margin: 68px 0 13px;
  font-size: 28px;
  letter-spacing: -.045em;
}

.direction-item p {
  margin: 0;
  color: #818a8e;
  font-size: 12px;
  line-height: 1.8;
}

.direction-item:nth-child(5) {
  background:
    linear-gradient(
      180deg,
      rgba(215,255,57,.03),
      transparent
    );
}

.direction-item:nth-child(5) h3 {
  color: var(--accent);
}


/* ============================================================
   ANIMATION SYSTEM
   ============================================================ */

/*
 * DO NOT PUT opacity: 0 HERE.
 *
 * The JavaScript animation system handles the initial state
 * using the Web Animations API.
 *
 * This keeps the page visible if JavaScript is delayed,
 * prevents permanent invisible sections, and avoids the
 * desktop blinking problem.
 */

.hero-index,
.hero-main,
.hero-aside,
.hero-bottom,
.manifesto-big,
.manifesto-text p,
.section-head,
.project-row,
.principle,
.direction-intro,
.direction-item,
.now-line,
.now-grid h2,
.now-copy,
.contact-inner,
.footer {
  will-change: auto;
}


/* ============================================================
   HOVER PERFORMANCE
   ============================================================ */

.nav-link,
.button,
.project-row,
.project-arrow,
.principle,
.direction-item,
.direction-item > span,
.text-link,
.contact-links a {
  will-change: transform;
}


/* ============================================================
   BLOG — shared bits (homepage "writing" section + blog pages)
   Post rows reuse .project-row, so they stay in sync with it.
   ============================================================ */

.nav-link.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.writing {
  padding-top: 0;
}

.post-row {
  position: relative;
}

.post-row .post-date {
  line-height: 1.7;
  text-transform: uppercase;
}

.post-row .project-type {
  text-transform: uppercase;
}

.post-row h3 a {
  color: inherit;
}

/* Stretched link: the whole row is clickable. */
.post-row h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-row:focus-within {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.post-row h3 a:focus-visible {
  outline: none;
}

.footer a {
  transition: color .2s ease;
}

.footer a:hover {
  color: var(--accent);
}


/* ============================================================
   RESPONSIVE — LARGE TABLET
   ============================================================ */

@media (max-width:1100px) {

  .direction-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .direction-item:nth-child(4) {
    border-right: 1px solid var(--line);
  }

  .direction-item:nth-child(3) {
    border-right: 0;
  }

  .direction-item:nth-child(-n+3) {
    border-bottom: 1px solid var(--line);
  }

  .direction-item:nth-child(4),
  .direction-item:nth-child(5) {
    border-bottom: 0;
  }
}


/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */

@media (max-width:950px) {

  .hero {
    grid-template-columns: 60px minmax(0,1fr);
    gap: 22px;
  }

  .hero-aside {
    display: none;
  }

  .hero-bottom {
    grid-column: 2;
  }

  .manifesto-grid {
    grid-template-columns: 60px 1fr;
    gap: 22px;
  }

  .manifesto-text {
    grid-template-columns: 1fr;
  }

  .principle-grid {
    grid-template-columns: 1fr 1fr;
  }

  .principle:nth-child(2) {
    border-right: 0;
  }

  .principle:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .now-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .nav-center {
    display: none;
  }

  .direction-intro {
    grid-template-columns: 60px 1fr;
    gap: 22px;
  }

  .direction-grid {
    grid-template-columns: 1fr 1fr;
  }

  .direction-item {
    min-height: 280px;
  }

  .direction-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .direction-item:nth-child(4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .direction-item:nth-child(5) {
    grid-column: 1/-1;
    border-right: 0;
  }
}


/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width:650px) {

  .shell {
    width: min(
      var(--max),
      calc(100% - 30px)
    );
  }

  .nav {
    height: 70px;
  }

  .brand {
    font-size: 13px;
  }

  .nav-link {
    padding: 8px 9px;
  }

  .nav-socials {
    gap: 6px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 85px 55px;
  }

  .hero-index {
    display: none;
  }

  .hero h1 {
    font-size: clamp(
      54px,
      17vw,
      86px
    );
  }

  .hero-lede {
    font-size: 15px;
  }

  .hero-bottom {
    grid-column: auto;
    display: grid;
    gap: 9px;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
    padding-block: 85px;
  }

  .manifesto-label {
    margin-bottom: 30px;
  }

  .manifesto-big {
    font-size: 40px;
  }

  .section-pad {
    padding-block: 88px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    margin-bottom: 35px;
  }

  .project-row {
    grid-template-columns: 35px minmax(0,1fr) 35px;
    gap: 10px;
    padding: 30px 0;
  }

  .project-row:hover {
    padding-left: 8px;
    padding-right: 8px;
  }

  .project-info p {
    font-size: 13px;
  }

  .writing {
    padding-top: 0;
  }

  /* Post rows: date sits on its own line above the text on phones. */
  .post-row {
    grid-template-columns: minmax(0,1fr) 28px;
    gap: 10px 10px;
  }

  .post-row .post-date {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .post-row .post-date br {
    display: none;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }

  .principle:last-child {
    border-bottom: 0;
  }

  .contact-inner {
    padding-block: 90px;
  }

  .contact h2 {
    font-size: 58px;
  }

  .footer {
    font-size: 8px;
  }

  .direction-intro {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 48px;
  }

  .direction-intro::before {
    display: none;
  }

  .direction-intro p {
    font-size: 15px;
    line-height: 1.75;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .direction-item,
  .direction-item:nth-child(3),
  .direction-item:nth-child(4),
  .direction-item:nth-child(5) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 240px;
  }

  .direction-item:last-child {
    border-bottom: 0;
  }

  .direction-item h3 {
    margin-top: 48px;
  }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .cursor-glow {
    display: none;
  }
} 