:root {
  color-scheme: light;
  --bg: #f8f6ef;
  --surface: #fffdf7;
  --ink: #111111;
  --muted: #66645f;
  --line: #d9d3c6;
  --line-strong: #111111;
  --gold: #dbb316;
  --teal: #0d8f82;
  --shadow: 0 18px 46px rgba(17, 17, 17, 0.08);
  --max: 1120px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111213;
  --surface: #181a1b;
  --ink: #f4f0e7;
  --muted: #b7b0a5;
  --line: #333536;
  --line-strong: #f4f0e7;
  --gold: #dbb316;
  --teal: #33c6b6;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(219, 179, 22, 0.08), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

main {
  padding-top: 79px;
}

.nav {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr auto auto;
  margin: 0 auto;
  max-width: var(--max);
  padding: 18px 22px;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  gap: 12px;
  letter-spacing: -0.02em;
}

.brand-logo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 42px;
  object-fit: contain;
  padding: 5px;
  width: 42px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.nav-links a,
.theme-toggle,
.button {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.nav-links a {
  padding: 11px 13px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--line-strong);
  color: var(--ink);
}

.theme-toggle {
  align-items: center;
  background: var(--surface);
  border-color: var(--line);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-self: end;
  min-height: 38px;
  padding: 9px 11px;
  width: 92px;
}

.theme-toggle::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  display: block;
  height: 13px;
  width: 13px;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.section {
  margin: 0 auto;
  max-width: var(--max);
  padding: 82px 22px;
}

.hero {
  display: grid;
  gap: 52px;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 650px;
  padding-top: 96px;
}

.hero-copy {
  align-self: center;
  min-width: 0;
}

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

h1 {
  font-size: clamp(54px, 9vw, 118px);
  letter-spacing: -0.07em;
  line-height: 0.88;
  margin-bottom: 30px;
  max-width: 880px;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(34px, 5vw, 68px);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin-bottom: 18px;
}

h3 {
  font-size: 24px;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 10px;
}

.lead {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  max-width: 670px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  align-items: center;
  border-color: var(--line-strong);
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 13px 17px;
}

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

.button.secondary {
  background: transparent;
}

.button:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.hero-mark {
  align-self: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.hero-mark img {
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] .hero-mark img,
:root[data-theme="dark"] .brand-logo {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}

.section-head {
  align-items: end;
  border-top: 1px solid var(--line-strong);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-top: 24px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 520px;
}

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

.project-card {
  background: transparent;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 22px;
  grid-template-columns: 76px 1fr;
  min-height: 230px;
  padding: 28px 24px 30px 0;
  transition: background 180ms ease, padding 180ms ease;
}

.project-card:nth-child(odd) {
  border-right: 1px solid var(--line);
  padding-right: 30px;
}

.project-card:nth-child(even) {
  padding-left: 30px;
}

.project-card:hover {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  padding-left: 22px;
}

.project-card img {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  width: 76px;
}

.project-card-body {
  display: flex;
  flex-direction: column;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.band {
  background: var(--ink);
  color: var(--bg);
}

.band .section {
  display: grid;
  gap: 34px;
  grid-template-columns: 0.8fr 1.2fr;
}

.band p {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

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

.principle {
  border-left: 1px solid color-mix(in srgb, var(--bg) 24%, transparent);
  padding: 6px 22px;
}

.split {
  display: grid;
  gap: 42px;
  grid-template-columns: 0.78fr 1.22fr;
}

.text-block {
  color: var(--muted);
  font-size: 19px;
}

.page-hero {
  padding-bottom: 38px;
}

.page-hero h1 {
  max-width: 940px;
}

.detail-layout {
  display: grid;
  gap: 44px;
  grid-template-columns: 280px 1fr;
}

.meta-list {
  border-top: 1px solid var(--line-strong);
  margin: 0;
  padding-top: 18px;
}

.meta-list dt {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 0 0 20px;
}

.detail-layout > div > img {
  border: 1px solid var(--line);
  border-radius: 22px;
  margin-bottom: 36px;
  width: 100%;
}

.feature-list {
  display: grid;
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.contact-panel {
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: 8px;
  padding-top: 22px;
}

.contact-panel a {
  color: var(--teal);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  align-items: center;
  display: flex;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  padding: 28px 22px;
}

@media (max-width: 900px) {
  main {
    padding-top: 200px;
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .theme-toggle {
    justify-self: start;
  }

  .hero,
  .band .section,
  .split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 62px;
  }

  .hero-mark {
    max-width: 330px;
  }
}

@media (max-width: 680px) {
  .section {
    max-width: 100vw;
    padding: 58px 18px;
    width: 100vw;
  }

  h1 {
    font-size: 32px;
    letter-spacing: -0.055em;
    line-height: 1.05;
  }

  h2 {
    font-size: 38px;
  }

  .lead {
    font-size: 16px;
    max-width: calc(100vw - 36px);
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    max-width: 100%;
    width: 340px;
  }

  .page-hero,
  .detail-layout,
  .split {
    max-width: 100%;
    width: 340px;
  }

  .hero-copy,
  .hero-mark {
    max-width: 100%;
    width: 340px;
  }

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

  .project-card,
  .project-card:nth-child(odd),
  .project-card:nth-child(even) {
    border-right: 0;
    grid-template-columns: 60px 1fr;
    min-height: auto;
    padding: 22px 0;
  }

  .project-card:hover {
    padding-left: 0;
  }

  .project-card img {
    width: 60px;
  }

  .principle {
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--bg) 24%, transparent);
    padding: 18px 0;
  }

  .actions,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
