:root {
  color-scheme: light;
  --bg: #f8f8f5;
  --bg-soft: #eeefe9;
  --ink: #12120f;
  --muted: #626158;
  --line: #d9d9cf;
  --surface: #ffffff;
  --surface-warm: #fbfbf7;
  --accent: #165fdd;
  --accent-ink: #083373;
  --green: #12805c;
  --amber: #b95f0b;
  --shadow: 0 18px 55px rgba(26, 28, 24, 0.1);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(18, 18, 15, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 18, 15, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(118deg, rgba(22, 95, 221, 0.07), transparent 34%),
    linear-gradient(244deg, rgba(18, 128, 92, 0.055), transparent 36%),
    linear-gradient(180deg, rgba(248, 248, 245, 0.2), var(--bg) 68%);
}

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

img,
svg {
  display: block;
}

button {
  font: inherit;
}

.section-shell {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin-inline: auto;
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions,
.project-meta,
.card-link,
.more-toggle,
.footer-inner,
.footer-inner div,
.hero-visual figcaption,
.preview-grid {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(18, 18, 15, 0.16);
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.nav-links {
  gap: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-links a {
  padding-block: 12px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.footer a:hover,
.footer a:focus-visible,
.more-list a:hover,
.more-list a:focus-visible {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: 18px 0 32px;
}

.hero-copy {
  max-width: 720px;
}

.hero h1,
.section-heading h2,
.about-grid h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.96;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(4rem, 9vw, 8.4rem);
  font-weight: 800;
}

.tagline {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.65vw, 2.25rem);
  font-weight: 700;
  line-height: 1.08;
}

.intro {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(18, 18, 15, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(18, 18, 15, 0.05);
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(18, 18, 15, 0.12);
}

.button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 18, 15, 0.12);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  position: absolute;
  inset: 12px;
  z-index: 1;
  border: 1px solid rgba(18, 18, 15, 0.1);
  border-radius: 6px;
  pointer-events: none;
  content: "";
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-visual figcaption span,
.project-meta span,
.preview-grid span {
  border: 1px solid rgba(18, 18, 15, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.hero-visual figcaption span {
  padding: 8px 10px;
}

.work-preview {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.preview-grid {
  width: min(var(--max), calc(100% - 40px));
  min-height: 76px;
  margin-inline: auto;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-grid span {
  padding: 8px 11px;
  background: var(--surface);
}

.work-section {
  padding: 76px 0 96px;
}

.method-section {
  padding: 88px 0 18px;
}

.method-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 0.52fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 18px;
}

.method-heading h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 4.7rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.method-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(18, 18, 15, 0.12);
  border-radius: var(--radius);
  background: rgba(18, 18, 15, 0.1);
}

.method-grid article {
  min-height: 240px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.75);
}

.method-grid span {
  display: inline-flex;
  margin-bottom: 44px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.method-grid h3 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.method-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 0.58fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
}

.section-heading h2,
.about-grid h2 {
  font-size: clamp(2.3rem, 5vw, 5.2rem);
  font-weight: 800;
}

.section-heading p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 384px;
  grid-column: span 2;
  padding: 22px;
  border: 1px solid rgba(18, 18, 15, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 28px rgba(18, 18, 15, 0.045);
}

.project-card-large {
  min-height: 430px;
  grid-column: span 3;
  background:
    linear-gradient(135deg, rgba(22, 95, 221, 0.1), transparent 45%),
    var(--surface);
}

.project-card:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(18, 128, 92, 0.1), transparent 45%),
    var(--surface);
}

.project-meta {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.project-meta span {
  padding: 7px 9px;
}

.project-card h3,
.more-list h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.project-card p,
.project-note,
.more-list p,
.about-copy p {
  margin: 14px 0 0;
  color: var(--muted);
}

.project-card .project-note {
  padding-top: 14px;
  border-top: 1px solid rgba(18, 18, 15, 0.1);
  color: #3f403a;
  font-size: 0.9rem;
}

.card-link {
  gap: 8px;
  align-self: flex-start;
  margin-top: 28px;
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.card-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.more-work {
  margin-top: 16px;
  border: 1px solid rgba(18, 18, 15, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.more-toggle {
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 800;
}

.more-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.more-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.more-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(18, 18, 15, 0.1);
  background: rgba(18, 18, 15, 0.1);
}

.more-list[hidden] {
  display: none;
}

.more-list article {
  min-height: 210px;
  padding: 20px;
  background: var(--surface-warm);
}

.more-list h3 {
  font-size: 1.1rem;
}

.more-list p {
  font-size: 0.95rem;
}

.more-list a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent-ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.about-section {
  padding: 96px 0;
  background: var(--ink);
  color: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 0.45fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}

.about-copy {
  padding-top: 10px;
}

.about-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
}

.about-copy p:first-child {
  margin-top: 0;
}

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.74);
}

.footer-inner {
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer p {
  margin: 0;
  font-size: 0.92rem;
}

.footer-inner div {
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .project-card,
  .card-link {
    transition:
      transform 180ms ease,
      box-shadow 180ms ease,
      color 180ms ease;
  }

  .project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(18, 18, 15, 0.09);
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-visual img {
    aspect-ratio: 16 / 10;
  }

  .section-heading,
  .method-heading,
  .about-grid {
    grid-template-columns: 1fr;
  }

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

  .method-grid article {
    min-height: auto;
  }

  .method-grid span {
    margin-bottom: 24px;
  }

  .project-card,
  .project-card-large {
    grid-column: span 3;
  }

  .more-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section-shell,
  .site-header,
  .preview-grid {
    width: min(100% - 28px, var(--max));
  }

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

  .brand span:last-child {
    display: none;
  }

  .nav-links {
    gap: 16px;
    font-size: 0.84rem;
  }

  .hero {
    gap: 30px;
    padding: 28px 0 54px;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 18vw, 5rem);
  }

  .tagline {
    font-size: clamp(1.32rem, 7vw, 2rem);
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    flex: 1 1 145px;
  }

  .hero-visual figcaption {
    left: 18px;
    right: 18px;
  }

  .work-section,
  .method-section,
  .about-section {
    padding: 68px 0;
  }

  .method-section {
    padding-bottom: 0;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2,
  .about-grid h2 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

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

  .project-card,
  .project-card-large {
    min-height: 270px;
    grid-column: span 1;
    padding: 19px;
  }

  .project-meta {
    margin-bottom: 28px;
  }

  .more-list {
    grid-template-columns: 1fr;
  }

  .more-list article {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}
