/* ---- Reset ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #000;
}

body {
  background: #000;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* ---- Layout tokens ---- */
:root {
  --gutter: 20px;
  --gap: 20px;
}

@media (min-width: 900px) {
  :root {
    --gutter: 120px;
    --gap: 60px;
  }
}

.site-header,
.intro,
.section-header,
.gallery {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---- Header ---- */
.site-header {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  padding-top: 30px;
  padding-bottom: 16px;
}

.site-header::after {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 4px;
  background: #fff;
}

.wordmark {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.625rem);
  line-height: 0.85;
  white-space: nowrap;
}

.say-hello {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.625rem);
  line-height: 0.85;
  letter-spacing: -0.5px;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 0.1em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.say-hello:hover,
.say-hello:focus-visible {
  background-color: #fff;
  color: #000;
}

/* ---- Intro ---- */
.intro {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.intro .photo {
  position: relative;
}

.intro .photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

@media (hover: hover) {
  .intro .photo:hover .photo-color,
  .intro .photo:focus-within .photo-color {
    opacity: 1;
  }
}

.bio {
  font-size: 1rem;
  line-height: 1.5;
}

.bio a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bio a:hover,
.bio a:focus-visible {
  background-color: #fff;
  color: #000;
}

@media (min-width: 900px) {
  .site-header {
    padding-top: 70px;
  }

  .intro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    gap: var(--gap);
    padding-top: 60px;
    padding-bottom: 100px;
  }

  .intro .photo {
    grid-column: 4 / 5;
    grid-row: 1;
  }

  .bio {
    grid-column: 1 / 4;
    grid-row: 1;
    font-size: 1.25rem;
  }

  .bio-columns {
    column-width: 320px;
    column-count: 2;
    column-gap: var(--gap);
    column-fill: balance;
  }
}

/* ---- Section header ---- */
.section-header {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  padding-bottom: 16px;
}

.section-header::after {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 4px;
  background: #fff;
}

.section-header h2 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.625rem);
  line-height: 0.85;
  white-space: nowrap;
}

.section-header .year {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.625rem);
  line-height: 0.85;
}

/* ---- Gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  padding-top: var(--gap);
  padding-bottom: var(--gutter);
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #4d4d4d;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hover overlay — only the large feature tiles have this */
.overlay {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1rem, 3vw, 60px);
  opacity: 0;
  overflow-y: auto;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.overlay h3 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.625rem);
  line-height: 0.85;
  margin-bottom: 0.5em;
  flex-shrink: 0;
}

.overlay p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.6875rem, 1vw, 1.375rem);
  line-height: 1.5;
}

.overlay-detect { background: rgba(255, 200, 4, 0.9); color: #000; }
.overlay-identifeye { background: rgba(135, 74, 246, 0.9); color: #fff; }
.overlay-lifewallet { background: rgba(0, 135, 184, 0.9); color: #fff; }
.overlay-pano { background: rgba(207, 89, 0, 0.9); color: #fff; }

@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 2.3vw, 60px);
  }

  .tile-big {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (min-width: 900px) and (hover: hover) {
  .tile-big:hover .overlay,
  .tile-big:focus-within .overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.tile-big.tap-active .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Load-in animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .site-header .wordmark,
  .site-header .say-hello,
  .intro .photo,
  .intro .bio {
    opacity: 0;
    transform: translateY(14px);
    animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .site-header .say-hello { animation-delay: 0.08s; }
  .intro .photo { animation-delay: 0.16s; }
  .intro .bio { animation-delay: 0.22s; }

  @keyframes fade-up {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* ---- Scroll-reveal (gallery tiles + section header) ---- */
  .section-header.reveal-up,
  .tile.reveal {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .section-header.reveal-up {
    transform: translateY(20px);
  }

  .tile.reveal {
    transform: scale(0.97);
  }

  .section-header.in-view {
    opacity: 1;
    transform: translate(0, 0);
  }

  .tile.in-view {
    opacity: 1;
    transform: scale(1);
  }
}
