/* Daytime is the default. "My secret life" turns the lights off. */
:root {
  --bg: #dcebf8;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #46557a;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --line: #b5cde5;
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1180px;
}
body.night {
  --bg: #1b1033;
  --surface: #2a1b4a;
  --ink: #fbeff6;
  --muted: #cbb8df;
  --accent: #ffb35c;
  --accent-ink: #24123a;
  --line: #4a3670;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  transition: background-color .7s ease, color .7s ease;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); line-height: .9; font-weight: 800; font-variation-settings: "wdth" 78; letter-spacing: -.015em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.05; font-weight: 700; font-variation-settings: "wdth" 85; margin-bottom: 1rem; }
p { margin: 0 0 1rem; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
main:focus { outline: none; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .6rem 1rem; z-index: 10; }

/* Header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem;
  max-width: var(--max); margin: 0 auto; padding: 1.25rem var(--gutter);
}
.brand { font: 800 1.5rem/1 var(--display); font-variation-settings: "wdth" 80; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: .5rem .95rem; border-radius: 999px; }
/* Every tab looks like a button; the open one is filled */
nav a { background: var(--surface); }
nav a:hover { filter: brightness(.96); }
nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.secret-tab { display: inline-flex; align-items: center; gap: .5rem; background: #1b1033; color: #fbeff6; }
.secret-tab:hover, .secret-tab[aria-current="page"] { background: #1b1033; color: #fbeff6; }
.night .secret-tab { background: var(--surface); }
.lamp { width: .6rem; height: .6rem; border-radius: 50%; background: #6d5a93; transition: background .3s, box-shadow .3s; }
.secret-tab:hover .lamp, .night .lamp { background: #ffb35c; box-shadow: 0 0 10px 3px rgba(255,179,92,.75); }

/* Panels: all visible without JavaScript, one at a time with it */
.panel { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 4rem; }
.js .panel:not(.active) { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding-top: 1rem; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 280px 280px 14px 14px; }
.hero-photo figcaption { font-size: .9rem; color: var(--muted); padding-top: .6rem; text-align: right; }
.hook { font: 600 clamp(1.5rem, 2.8vw, 2.1rem)/1.2 var(--display); color: var(--accent); margin: 1.5rem 0 .75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid var(--accent);
}
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }

/* About */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(1.5rem, 6vw, 6rem); align-items: center; margin-top: clamp(4rem, 9vw, 8rem); }
.split > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; border-radius: 14px; }
.ai-note { font-size: .94rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 1rem; margin-top: 1.5rem; }
.block { margin-top: clamp(4rem, 8vw, 7rem); }

.stories { border-top: 2px solid var(--ink); }
.stories details { border-bottom: 1px solid var(--line); }
.stories summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  font: 600 clamp(1.25rem, 2.4vw, 1.7rem)/1.25 var(--display); padding: 1.2rem 0;
}
.stories summary::-webkit-details-marker { display: none; }
.stories summary::after { content: "+"; color: var(--accent); font-size: 2rem; line-height: 1; }
.stories details[open] summary::after { content: "\2212"; }
.stories details p:last-child { padding-bottom: 1.2rem; font-weight: 600; }

.people { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem 2.5rem; }
.people dt { font: 700 1.5rem/1.2 var(--display); color: var(--accent); }
.people dd { margin: .3rem 0 0; }

/* Photos */
.page-head { padding: 1.5rem 0 2rem; }
.page-head h1 { margin-bottom: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.filters button, .viewer-controls button {
  font: 500 .95rem var(--body); cursor: pointer; color: var(--ink);
  background: transparent; border: 1.5px solid var(--ink); border-radius: 999px; padding: .5rem 1.1rem;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.gallery { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 1rem; }
.gallery li { break-inside: avoid; margin-bottom: 1rem; }
.gallery li[hidden] { display: none; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--surface); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; }

dialog { border: 0; padding: 1rem; background: #0d0820; color: #fbeff6; border-radius: 16px; max-width: min(94vw, 760px); text-align: center; }
dialog::backdrop { background: rgba(10, 6, 25, .86); }
dialog img { max-height: 72vh; width: auto; margin: 0 auto; border-radius: 8px; }
dialog p { margin: .75rem auto; font-size: .95rem; }
.viewer-controls { display: flex; justify-content: center; gap: .5rem; }
.viewer-controls button { color: #fbeff6; border-color: #fbeff6; }

/* Apartment, room by room */
.apartment { margin-top: clamp(3rem, 7vw, 6rem); }
.room { margin-top: 2rem; }
.room[hidden], .apartment[hidden] { display: none; }
h3 { font: 700 1.4rem/1.2 var(--display); margin: 0 0 .75rem; }
.gallery.shots { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.4rem, 1.5vw, 1rem); max-width: 900px; }
.gallery.shots li { margin: 0; }
.gallery.shots img { aspect-ratio: 9 / 16; object-fit: cover; }

.home-first { display: flex; flex-direction: column; }
.home-first .apartment { margin-top: 0; }
.home-first > .gallery { order: 1; margin-top: 3rem; }

/* Hobbies */
.hobby { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 6vw, 6rem); align-items: center; margin-bottom: clamp(3rem, 7vw, 6rem); }
.hobby img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; border-radius: 14px; }
.hobby.flip img { order: 2; }
/* Tall phone photos: keep the face inside the crop */
.hobby img[src*="yoga-tree"], .hobby img[src*="kitchen"] { object-position: center 12%; }
.hobby img[src*="gym"] { object-position: center 28%; }
.hobby p { font-size: 1.15rem; max-width: 44ch; }

/* Secret life */
.secret-hero .hero-photo img { border-radius: 14px; box-shadow: 0 0 90px -10px rgba(255,179,92,.45); }
.secret-hero h1 { font-size: clamp(3rem, 7vw, 6rem); }
.peek { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 720px; margin: clamp(3rem, 7vw, 6rem) auto 0; }
.peek img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 25%; border-radius: 14px; }
.peek img + img { margin-top: 3rem; }

footer { max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 3rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
footer p { margin-bottom: .25rem; }

@media (max-width: 760px) {
  .hero, .split, .hobby { grid-template-columns: 1fr; }
  .hero-photo img { border-radius: 200px 200px 14px 14px; }
  .secret-hero .hero-photo img { border-radius: 14px; }
  .hobby.flip img { order: 0; }
  .split > img { max-width: 420px; justify-self: center; }
  nav { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: .15rem; }
  nav a { padding: .45rem .55rem; font-size: .88rem; white-space: nowrap; }
  .secret-tab { gap: .35rem; }
  .secret-hero .hero-text { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, body { transition: none !important; }
}
