:root {
  color-scheme: dark;
  --bg: #141413;
  --paper: #23211e;
  --ink: #f4efe5;
  --muted: #c0b7aa;
  --line: #49443d;
  --accent: #f07d62;
  --accent-2: #83d5bd;
  --accent-3: #e0bd72;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

.text-link {
  color: var(--accent-2);
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(244, 239, 229, 0.14);
  background: rgba(20, 20, 19, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.94rem;
}

.top-nav a:hover {
  color: var(--ink);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  min-height: 520px;
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.12rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.quick-card dl {
  margin: 0;
}

.quick-card div {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.quick-card div:last-child {
  border-bottom: 0;
}

.quick-card dt {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-card dd {
  margin: 4px 0 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
}

.filter-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.section-heading h2,
.about h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

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

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

.project-card {
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card[hidden] {
  display: none;
}

.project-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.project-card a {
  display: block;
  min-height: 100%;
  padding: 12px;
  text-decoration: none;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(244, 239, 229, 0.18);
  object-fit: cover;
}

.project-meta {
  display: block;
  margin-top: 14px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 4px 0 6px;
  font-size: 1.3rem;
}

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

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.archive-list a {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
}

.archive-list a > * {
  position: relative;
  z-index: 1;
}

.archive-image-link {
  align-items: flex-end;
  min-height: 150px;
  background-position: center;
  background-size: cover;
}

.archive-image-link::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.82), rgba(10, 10, 10, 0.46));
}

.archive-pyramid-vr {
  background-image: url("assets/images/pyramidvr.png");
}

.archive-pyramid-2016 {
  background-image: url("assets/images/2016.webp");
}

.archive-jurrassic-escape {
  background-image: url("assets/images/escape.jpg");
}

.archive-notso-fast {
  background-image: url("assets/images/notsofast.webp");
}

.archive-list a:hover {
  border-color: var(--accent-3);
}

.archive-list span {
  color: var(--muted);
  text-align: right;
}

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  border-top: 1px solid var(--line);
}

.about p {
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-stack {
  display: grid;
  gap: 22px;
}

.detail-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px;
}

.detail-panel img {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 22px;
  border: 1px solid rgba(244, 239, 229, 0.18);
  object-fit: cover;
}

.detail-panel p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 840px) {
  .site-header,
  .intro,
  .about {
    display: block;
  }

  .top-nav {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .quick-card {
    margin-top: 30px;
  }

  .project-grid,
  .project-grid.compact,
  .archive-list {
    grid-template-columns: 1fr;
  }

  .archive-list a {
    display: block;
  }

  .archive-list span {
    display: block;
    margin-top: 4px;
    text-align: left;
  }
}

/* Project/detail pages */
main.section.about {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  display: block;
}

main.section.about > div:first-child {
  max-width: 900px;
  margin: 0 auto 28px;
}

main.section.about .detail-stack {
  width: min(900px, 100%);
  margin: 0 auto;
}

.detail-panel {
  width: 100%;
}

.detail-panel img {
  max-height: 440px;
  object-fit: cover;
}