:root {
  --paper: #fbfbfa;
  --ink: #161616;
  --rule: #e5e5e0;
  --caption: clamp(10px, 0.72vw, 14px);
  --body: clamp(12px, 0.88vw, 16px);
  --mono-sans: "SF Mono", "Roboto Mono", "IBM Plex Mono", "DM Mono", monospace;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

button,
a {
  font: inherit;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

.portfolio-shell {
  min-height: 100svh;
  padding-bottom: 72px;
  color: var(--ink);
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(100% - 1px),
      var(--rule) calc(100% - 1px)
    ),
    linear-gradient(var(--paper), var(--paper));
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 28px;
  left: 9.9vw;
  right: 9.9vw;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  column-gap: 34px;
  align-items: start;
  font-size: var(--caption);
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}

.site-header p,
.site-header a {
  margin: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
}

.site-header a {
  pointer-events: auto;
}

.site-header a:hover,
.index-panel button:hover,
.project-links a:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hero-stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 0 3.25vw;
}

.index-panel {
  align-self: center;
  width: min(360px, 78vw);
  display: grid;
  gap: 31px;
  font-size: var(--body);
  font-weight: 600;
  line-height: 1.12;
}

.index-group {
  display: grid;
  gap: 18px;
}

.index-label {
  margin: 0 0 8px;
  font-weight: bold;
  font-size: clamp(14px, 1.05vw, 19px);
  line-height: 1.05;
  letter-spacing: 0;
}

.index-panel button {
  width: fit-content;
  margin-left: 14px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-size: var(--caption);
  line-height: 1.12;
  font-weight: 400;
  text-align: left;
}

.index-panel button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.project-stage {
  position: absolute;
  left: 32vw;
  top: 27vh;
  width: min(860px, 64vw);
  min-height: 260px;
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.84fr) minmax(180px, 0.72fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  opacity: 1;
  transform: none;
}

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

.project-detail h2 {
  max-width: 24ch;
  margin: 0;
  font-family: var(--mono-sans);
  font-size: clamp(24px, 3vw, 48px);
  line-height: 0.96;
  font-weight: 700;
}

.project-detail dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: min(420px, 100%);
  margin: 22px 0 0;
}

.project-detail dl div {
  display: grid;
  gap: 8px;
}

.project-detail dt,
.project-detail dd {
  margin: 0;
  font-size: var(--caption);
  line-height: 1.22;
  font-style: normal;
}

.project-detail dt {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-detail dd {
  font-size: clamp(11px, 0.78vw, 15px);
  font-weight: 400;
}

[data-project-details] {
  max-width: 54ch;
  margin: 28px 0 0;
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.45;
  font-weight: 400;
}

.project-links {
  margin-top: 28px;
}

.project-links p {
  margin: 0 0 8px;
  font-size: var(--caption);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-links ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-links a {
  color: var(--ink);
  font-size: clamp(12px, 0.9vw, 16px);
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
}

.project-images {
  display: grid;
  gap: 14px;
}

.project-images img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(170px, 18vw) 1fr;
  gap: clamp(28px, 6vw, 120px);
  padding: 92px 3.25vw;
  border-top: 1px solid var(--rule);
}

.section-kicker span,
.section-kicker h2 {
  display: block;
  margin: 0;
  font-size: var(--caption);
  line-height: 1.2;
  font-weight: bold;
}

.section-kicker h2 {
  margin-top: 20px;
}

.about-section p,
.site-footer a {
  font-size: var(--body);
  line-height: 1.25;
  font-style: normal;
  font-weight: 400;
}

.about-section p {
  max-width: 66ch;
  margin: 0;
  font-size: clamp(16px, 1.45vw, 28px);
  line-height: 1.28;
}

.site-footer {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 3.25vw 24px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
    top: 22px;
    left: 20px;
    right: 20px;
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }

  .site-header p:nth-child(2) {
    display: none;
  }

  .hero-stage {
    min-height: 760px;
    padding: 104px 20px 44px;
  }

  .index-panel {
    align-self: start;
    margin-top: 128px;
  }

  .project-stage {
    position: static;
    align-self: end;
    width: 100%;
    margin-top: 88px;
  }

  .project-detail {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-images img {
    max-height: none;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 56px 20px;
  }

  .site-footer {
    padding: 16px 20px 22px;
  }
}
