/* Palette: Black #000000, Light Yellow #F6FEDB, Grey Olive #829191 */
:root {
  --black: #000000;
  --cream: #f6fedb;
  --olive: #829191;
  --bg: var(--black);
  --text: var(--cream);
  --muted: var(--olive);
  --line: #2a3030;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; }

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
  background: var(--bg);
}

.logo {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

nav a {
  margin-left: 24px;
  color: var(--muted);
  text-decoration: none;
}
nav a:hover { color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.hero { padding: 104px 0 88px; }
.eyebrow {
  color: var(--olive);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 24px;
  max-width: 900px;
}
.lede { font-size: 1.15rem; color: var(--olive); max-width: 620px; }

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

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--black);
  border: 1px solid var(--cream);
  text-decoration: none;
  font-weight: 500;
}
.button-ghost { background: transparent; color: var(--cream); }
.button:hover { opacity: 0.85; }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 32px; font-size: 2rem; }

/* Work: jump buttons + one block per project */
.jumpbar {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  margin: -12px 0 24px;
  background: var(--bg);
}
.jumpbar .jump {
  margin-left: 0;
  border: 1px solid var(--olive);
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.jumpbar .jump:hover, .jumpbar .jump:focus-visible { background: var(--cream); color: var(--black); border-color: var(--cream); }

.project { padding: 48px 0; scroll-margin-top: 140px; }
.project + .project { border-top: 1px solid var(--line); }
.project-head { max-width: 680px; margin-bottom: 28px; }
.project-head h3 { margin: 4px 0 10px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; }
.project-head p { margin: 0; color: var(--olive); }
.tag {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery { columns: 3 260px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #111;
}
.gallery .contain img { background: var(--cream); padding: 24px; }
.gallery a.zoom { display: block; cursor: zoom-in; }
.gallery a.zoom:hover img { opacity: 0.85; }
.gallery figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--olive); }

/* Cloud Case: film on top, even grid below */
.film { margin-top: 24px; }
.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #111;
}
.tidy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tidy-grid figure { margin: 0; display: flex; flex-direction: column; }
.tidy-grid .wide { grid-column: span 2; }
.tidy-grid a.zoom { display: block; cursor: zoom-in; }
.tidy-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
}
.tidy-grid .wide a.zoom { flex: 1; min-height: 0; position: relative; }
.tidy-grid .wide img { aspect-ratio: auto; position: absolute; inset: 0; height: 100%; }
.tidy-grid a.zoom:hover img { opacity: 0.85; }
.tidy-grid figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--olive); }

#lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
}
#lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
#lightbox img { display: block; max-width: 94vw; max-height: 86vh; margin: 0 auto; border-radius: 4px; }
#lightbox .caption { color: var(--cream); text-align: center; margin: 10px 0 0; }
#lightbox .close {
  position: fixed;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.about {
  background: var(--cream);
  color: var(--black);
  margin: 0 -24px;
  padding: 72px 24px;
  border-top: none;
}
main > .about:first-child { margin-top: 24px; }
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}
.about p { margin-top: 0; font-size: 1.1rem; }
.about h3 { margin-top: 0; }

.skills { list-style: none; padding: 0; margin: 0; }
.skills li {
  padding: 10px 0;
  border-bottom: 1px solid var(--olive);
}

.contact { text-align: left; }
.email {
  display: inline-block;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 700;
  text-decoration-color: var(--olive);
  text-underline-offset: 8px;
  word-break: break-all;
}
.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.links a { color: var(--olive); text-decoration: none; }
.links a:hover { color: var(--cream); }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  color: var(--olive);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .tidy-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tidy-grid .tile:first-child, .tidy-grid .tile:last-child { grid-column: span 2; }
  .tidy-grid .wide a.zoom { position: static; }
  .tidy-grid .wide img { position: static; aspect-ratio: 2 / 1; }
}

@media (max-width: 560px) {
  .site-header { padding: 16px; }
  .logo { font-size: 1.35rem; }
  nav a { margin-left: 14px; }
  main { padding: 0 16px; }
  .about { margin: 0 -16px; padding: 56px 16px; }
  .hero { padding: 64px 0 56px; }
  .jumpbar { top: 56px; flex-wrap: nowrap; overflow-x: auto; }
}
