/* ============================================================
   Home
   One orchestrated moment (the hero entrance and the typed name),
   then nothing moves unless you touch it.
   ============================================================ */

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(7.5rem, 16vh, 10rem);
  padding-bottom: var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.hero-name {
  margin-top: 1.6rem;
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.type-line { display: block; min-height: 1em; }
.type-line + .type-line { margin-top: 0.04em; }

.type-cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.78em;
  margin-left: 0.04em;
  background: var(--accent);
  border-radius: 2px;
  vertical-align: -0.04em;
  opacity: 0;
}
.type-cursor.is-active { animation: cursor-blink 1s steps(1, jump-none) infinite; }
@keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-sub {
  margin-top: 1.5rem;
  max-width: 40ch;
  font-size: var(--fs-body-lg);
  line-height: 1.45;
  color: var(--text-2);
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}

/* ---------- Moments: three real photos ---------- */

.moments {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 0.75rem;
  margin-top: var(--space-3);
}

.moment {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}
.moment.m-wide { aspect-ratio: auto; }
.moment img { width: 100%; height: 100%; object-fit: cover; }
.moment figcaption {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: var(--fs-micro);
  color: #fff;
  background: rgb(0 0 0 / 0.38);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

@media (max-width: 760px) {
  .moments { grid-template-columns: 1fr 1fr; }
  .moment.m-wide { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}

/* ---------- Section titles ---------- */

.section-title { font-size: var(--fs-h2); }
.work .section-lede,
.home-projects .section-lede { margin-top: 0.5rem; }

/* ---------- Selected work tiles (open the detail panels) ---------- */

.tiles {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.t-span2 { grid-column: span 2; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: 1fr; }
  .t-span2 { grid-column: auto; }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s var(--ease-out);
}
.tile:active { transform: scale(0.985); }
.tile:focus-visible { outline-offset: 4px; }

.tile-kicker {
  margin: 0;
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--text-2);
}

.tile h3 {
  margin-top: 0.4rem;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.tile p:not(.tile-kicker) {
  margin: 0.5rem 0 0;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-2);
}

/* text tiles: words only, generous padding */
.tile-text { padding: 1.75rem; min-height: 15rem; }
.tile-text h3 { font-size: clamp(1.3rem, 1.2vw + 1rem, 1.75rem); max-width: 26ch; }
.tile-text .more-link { margin-top: auto; padding-top: 1.25rem; font-size: var(--fs-small); }

/* photo tiles: picture on top, words below */
.tile-media { aspect-ratio: 16 / 10; overflow: hidden; background: rgb(var(--fg) / 0.06); }
.t-span2 .tile-media { aspect-ratio: 21 / 9; }
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.tile-body { padding: 1.25rem 1.5rem 1.5rem; }

@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile-media img { transform: scale(1.03); }
  .tile:hover .more-link { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Things I build at home ---------- */

.mini-tiles {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 900px) { .mini-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mini-tile { display: block; transition: transform 0.16s var(--ease-out); }
.mini-tile:active { transform: scale(0.98); }
.mini-media {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
}
.mini-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.mini-tile p { margin: 0.7rem 0 0; font-size: var(--fs-small); color: var(--text-2); }
.mini-text .mini-media {
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.mini-text .mini-media span {
  font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
@media (hover: hover) and (pointer: fine) {
  .mini-tile:hover .mini-media img { transform: scale(1.04); }
  .mini-tile:hover p { color: var(--text); }
}

.all-link { margin-top: var(--space-3); }

/* ---------- Closing ---------- */

.closing { text-align: center; padding-bottom: var(--space-6); }
.closing h2 { font-size: var(--fs-h1); }
.closing .section-lede { margin-inline: auto; }
