/* George's Studio — portfolio / visual storytelling */

:root {
  --ink: #142033;
  --ink-soft: #3a465c;
  --paper: #eef2f6;
  --paper-deep: #dbe3ec;
  --surface: #f8fafc;
  --accent: #3d6b8a;
  --accent-warm: #c08a3e;
  --line: rgba(20, 32, 51, 0.12);
  --shadow: 0 18px 50px rgba(20, 32, 51, 0.12);
  --radius: 1.25rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 107, 138, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(192, 138, 62, 0.14), transparent 50%),
    linear-gradient(180deg, #e8eef4 0%, var(--paper) 40%, #e6ebe8 100%);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(238, 242, 246, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  object-fit: cover;
  border-radius: 0.45rem;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(61, 107, 138, 0.18);
  flex-shrink: 0;
}

.brand--mark-only .brand__mark {
  width: 2.65rem;
  height: 2.65rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.site-nav a,
.site-nav .nav-dropdown__toggle {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  line-height: inherit;
  color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav .nav-dropdown__toggle:hover,
.site-nav__admin {
  color: var(--ink);
}

.nav-dropdown {
  position: relative;
}

.site-nav .nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.nav-dropdown__caret {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s var(--ease);
}

.nav-dropdown.is-open .nav-dropdown__caret {
  transform: rotate(225deg) translateY(-1px);
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  min-width: 11rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.98);
  box-shadow: var(--shadow);
  display: none;
  gap: 0.15rem;
  z-index: 50;
}

.nav-dropdown.is-open .nav-dropdown__menu {
  display: grid;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  white-space: nowrap;
}

.nav-dropdown__menu a:hover {
  background: rgba(61, 107, 138, 0.1);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

/* Hero — full-bleed visual plane */
.hero {
  position: relative;
  min-height: min(92vh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7fafc;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    var(--hero-image) center / cover no-repeat;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__media--fallback {
  background:
    linear-gradient(135deg, #2a4058 0%, #4d6a7e 45%, #8a6b3f 100%);
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 18, 30, 0.18) 0%, rgba(10, 18, 30, 0.72) 78%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
}

.hero__brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.95rem;
  font-size: clamp(2.85rem, 8vw, 5.25rem);
  animation: rise 0.9s var(--ease) both;
}

.hero__logo {
  display: block;
  height: 1em;
  width: 1em;
  object-fit: cover;
  border-radius: 0.18em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  background: #fff;
  flex-shrink: 0;
}

.hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero__headline {
  margin: 0 0 0.85rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 500;
  line-height: 1.15;
  animation: rise 0.9s var(--ease) 0.08s both;
}

.hero__lede {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  font-size: 1.05rem;
  color: rgba(247, 250, 252, 0.88);
  animation: rise 0.9s var(--ease) 0.16s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s var(--ease) 0.24s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  color: inherit;
}

.btn--primary {
  background: #f4f7fa;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: #f4f7fa;
  border-color: rgba(244, 247, 250, 0.45);
}

.page-intro .btn--ghost,
.auth-panel .btn--ghost {
  color: var(--ink);
  border-color: var(--line);
}

/* Sections */
.section,
.page-intro,
.article,
.work-detail,
.media-detail,
.auth-panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section--tight {
  padding-top: 2.25rem;
}

.section--muted {
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line);
  max-width: none;
  padding-inline: max(1.25rem, calc((100% - var(--max)) / 2 + 1.25rem));
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section__head h2,
.page-intro h1,
.article__header h1,
.media-detail h1,
.auth-panel h1,
.timeline-year__label {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.page-intro h1,
.article__header h1,
.media-detail h1,
.auth-panel h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.65rem;
}

.page-intro p,
.lede {
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.page-intro--narrow {
  max-width: 42rem;
}

.about-logo {
  margin: 1.75rem 0 1.5rem;
  max-width: 22rem;
}

.about-logo img {
  width: 100%;
  height: auto;
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  background: #fff;
}

.about-logo figcaption {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--accent, #3d6b8a);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.empty-note {
  color: var(--ink-soft);
}

/* Rails / grids — image-forward, minimal chrome */
.post-rail,
.post-grid,
.mosaic,
.work-grid {
  display: grid;
  gap: 1.1rem;
}

.post-rail {
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.post-grid {
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.mosaic {
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.mosaic--compact {
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}

.work-grid {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.post-rail__item a,
.post-teaser a,
.mosaic__cell,
.work-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-rail__item img,
.post-teaser img,
.mosaic__cell img,
.work-tile img,
.media-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.25rem);
  background: linear-gradient(145deg, var(--paper-deep), #cfd8e3);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.media-placeholder--wide,
.post-teaser img {
  aspect-ratio: 16 / 11;
}

.post-rail__item a:hover img,
.mosaic__cell:hover img,
.work-tile:hover img,
.post-teaser a:hover img {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow);
}

.post-rail__item h3,
.post-teaser h2,
.work-tile h2,
.mosaic__label {
  margin: 0.7rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.post-rail__item time,
.post-teaser time,
.work-tile p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.post-teaser__body {
  padding-top: 0.15rem;
}

.post-teaser p {
  margin: 0.35rem 0;
  color: var(--ink-soft);
}

.mosaic__label {
  display: block;
  font-size: 1rem;
}

/* Article / detail */
.article__header {
  margin-bottom: 1.5rem;
}

.article__meta {
  display: flex;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.article__figure {
  margin: 0 0 1.75rem;
}

.article__figure-link {
  display: inline-block;
  max-width: min(100%, 26rem);
  text-decoration: none;
  color: inherit;
}

.article__figure-link:hover img {
  opacity: 0.92;
}

.article__figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.article__figure figcaption,
.prose {
  color: var(--ink-soft);
}

.article__body,
.prose {
  max-width: 42rem;
  font-size: 1.08rem;
}

.article__body p,
.prose p {
  margin: 0 0 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 1.5rem 0 0;
  margin: 0;
}

.tag-list a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.5);
}

.related-note {
  max-width: var(--max);
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}

/* Media detail (legacy two-column; lightbox used for image pages) */
.media-detail {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 860px) {
  .media-detail {
    grid-template-columns: 1.35fr 0.9fr;
    align-items: start;
  }
}

.media-detail__figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Full-screen gallery lightbox — book-like browsing */
body.has-lightbox {
  overflow: hidden;
}

body.has-lightbox .site-header,
body.has-lightbox .site-footer {
  display: none;
}

body.has-lightbox #main {
  margin: 0;
  padding: 0;
  max-width: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(61, 107, 138, 0.22), transparent 55%),
    #101820;
  color: #eef3f7;
  animation: lightbox-in 0.35s var(--ease) both;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox__close {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.1);
  border: 1px solid rgba(248, 250, 252, 0.22);
  color: #f4f7fa;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.lightbox__close span[aria-hidden="true"] {
  font-size: 1.25rem;
  line-height: 1;
}

.lightbox__close:hover {
  background: rgba(248, 250, 252, 0.18);
  color: #fff;
}

.lightbox__stage {
  margin: 0;
  min-height: 52vh;
  display: grid;
  place-items: center;
  padding: 4.25rem 1rem 1rem;
  perspective: 1600px;
  overflow: hidden;
}

.lightbox__image {
  display: block;
  max-width: min(100%, 56rem);
  max-height: min(78vh, 52rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.65rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform-origin: left center;
  transform-style: preserve-3d;
  animation: lightbox-image-in 0.55s var(--ease) both;
  will-change: transform, opacity;
}

@keyframes lightbox-image-in {
  from {
    opacity: 0;
    transform: translateX(1.5rem) rotateY(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox.is-enter-next .lightbox__image {
  transform-origin: right center;
  animation: lightbox-enter-next 0.42s var(--ease) both;
}

.lightbox.is-enter-prev .lightbox__image {
  transform-origin: left center;
  animation: lightbox-enter-prev 0.42s var(--ease) both;
}

@keyframes lightbox-enter-next {
  from {
    opacity: 0;
    transform: translateX(14%) rotateY(-22deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lightbox-enter-prev {
  from {
    opacity: 0;
    transform: translateX(-14%) rotateY(22deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox.is-turning {
  pointer-events: none;
}

.lightbox.is-turning-next .lightbox__image {
  transform-origin: left center;
  animation: lightbox-turn-next 0.42s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.lightbox.is-turning-prev .lightbox__image {
  transform-origin: right center;
  animation: lightbox-turn-prev 0.42s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.lightbox.is-turning .lightbox__rail {
  animation: lightbox-rail-out 0.3s ease forwards;
}

@keyframes lightbox-turn-next {
  0% {
    opacity: 1;
    transform: rotateY(0deg) translateX(0);
    filter: brightness(1);
  }
  55% {
    opacity: 0.85;
    filter: brightness(0.92);
  }
  100% {
    opacity: 0;
    transform: rotateY(-72deg) translateX(-8%);
    filter: brightness(0.75);
  }
}

@keyframes lightbox-turn-prev {
  0% {
    opacity: 1;
    transform: rotateY(0deg) translateX(0);
    filter: brightness(1);
  }
  55% {
    opacity: 0.85;
    filter: brightness(0.92);
  }
  100% {
    opacity: 0;
    transform: rotateY(72deg) translateX(8%);
    filter: brightness(0.75);
  }
}

@keyframes lightbox-rail-out {
  to {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

.lightbox__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(18vw, 7rem);
  z-index: 3;
  text-decoration: none;
  cursor: pointer;
}

.lightbox__edge--prev {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent);
}

.lightbox__edge--next {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.22), transparent);
}

.lightbox__edge:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.lightbox__edge--prev::after,
.lightbox__edge--next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-top: 2px solid rgba(244, 247, 250, 0.85);
  border-right: 2px solid rgba(244, 247, 250, 0.85);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.lightbox__edge--prev::after {
  left: 1.1rem;
  transform: translateY(-50%) rotate(-135deg);
}

.lightbox__edge--next::after {
  right: 1.1rem;
}

.lightbox__edge:hover::after {
  opacity: 1;
}

.lightbox__rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 1.35rem;
  background: rgba(248, 250, 252, 0.97);
  color: var(--ink);
  border-top: 1px solid var(--line);
  max-height: 42vh;
  overflow: auto;
}

.lightbox__title {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lightbox__desc {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.lightbox__meta {
  margin-top: 0.85rem;
}

.lightbox__rail .eyebrow {
  color: var(--accent);
}

.lightbox__rail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.35rem;
}

.lightbox__rail-nav .btn--primary {
  background: var(--ink);
  color: #f7fafc;
}

.lightbox__rail-nav .btn--ghost {
  color: var(--ink);
  border-color: var(--line);
}

@media (min-width: 960px) {
  .lightbox {
    grid-template-columns: minmax(0, 1fr) min(22rem, 32vw);
  }

  .lightbox__stage {
    min-height: 100vh;
    padding: 3.5rem 5.5rem 2rem 2rem;
  }

  .lightbox__image {
    max-height: min(88vh, 56rem);
  }

  .lightbox__edge--next {
    right: min(22rem, 32vw);
  }

  .lightbox__rail {
    max-height: none;
    height: 100vh;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 2rem 1.5rem 1.5rem;
  }

  .lightbox__close-label {
    display: inline;
  }
}

@media (max-width: 959px) {
  .lightbox__edge {
    width: 3.25rem;
    bottom: 42vh;
  }

  .lightbox__close-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

.meta-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.meta-list div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
}

.meta-list dt {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.meta-list dd {
  margin: 0;
}

/* Timeline */
.timeline-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.timeline-preview li {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.timeline-preview time {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-year {
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.timeline-year.is-visible {
  opacity: 1;
  transform: none;
}

.timeline-year__toggle,
.timeline-month__toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.timeline-year__toggle:focus-visible,
.timeline-month__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.timeline-year__label {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.timeline-month {
  margin-top: 1.15rem;
}

.timeline-month__label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.timeline-year__chevron,
.timeline-month__chevron {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
  margin-top: -0.15rem;
}

.timeline-month__chevron {
  width: 0.45rem;
  height: 0.45rem;
}

.timeline-year.is-open > .timeline-year__toggle .timeline-year__chevron,
.timeline-month.is-open > .timeline-month__toggle .timeline-month__chevron {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}

.timeline-fold__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s var(--ease), opacity 0.25s var(--ease);
  opacity: 1;
}

.timeline-year:not(.is-open) > .timeline-fold__panel,
.timeline-month:not(.is-open) > .timeline-fold__panel {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.timeline-fold__inner {
  overflow: hidden;
  min-height: 0;
}

.timeline {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.timeline__item {
  display: grid;
  gap: 0.75rem 1.25rem;
  padding: 0 0 1.75rem 1.25rem;
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 107, 138, 0.15);
}

@media (min-width: 720px) {
  .timeline__item {
    grid-template-columns: 5.5rem 1fr 8rem;
    align-items: start;
  }
}

.timeline__when time {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.timeline__body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.timeline__body p {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
}

.timeline__links {
  display: flex;
  gap: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline__thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* Search / filters */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 1rem;
}

.search-form input,
.auth-form input {
  flex: 1 1 14rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.45);
}

.filter-chip.is-active {
  background: var(--ink);
  color: #f7fafc;
  border-color: var(--ink);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Auth */
.auth-panel {
  max-width: 28rem;
}

.auth-form {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.auth-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.auth-form .btn {
  margin-top: 0.75rem;
  width: fit-content;
}

.form-errors {
  color: #8b2e2e;
  background: rgba(139, 46, 46, 0.08);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
}

.auth-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Likes */
.like-form {
  display: inline-block;
  margin: 0;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.like-btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.like-btn.is-liked,
.like-btn.is-liked:hover {
  color: #b44a4a;
  border-color: rgba(180, 74, 74, 0.35);
  background: rgba(180, 74, 74, 0.08);
}

.like-btn__icon {
  font-size: 1rem;
  line-height: 1;
}

.article__actions,
.media-detail__actions {
  margin-top: 0.75rem;
}

.media-detail__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.media-detail__nav .btn--primary {
  background: var(--ink);
  color: #f7fafc;
}

.media-detail__nav .btn--ghost {
  color: var(--ink);
  border-color: var(--line);
}

.post-teaser {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-teaser__like,
.mosaic__like {
  padding: 0 0.15rem;
}

.mosaic__item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Comments */
.section--comments {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.text-muted {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.comment-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.comment {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.comment__author {
  margin: 0 0 0.35rem;
  font-weight: 650;
  font-family: var(--font-display);
}

.comment__body {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
}

.comment__time {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.comment-form-wrap {
  max-width: 36rem;
}

.comment-form-wrap h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
}

.form-hint {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.comment-form {
  display: grid;
  gap: 0.45rem;
}

.comment-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.comment-form input,
.comment-form textarea {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
  width: 100%;
}

.comment-form .btn {
  margin-top: 0.5rem;
  width: fit-content;
}

.flash-stack {
  max-width: var(--max);
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
}

.flash {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
}

/* Footer — quiet colophon; body font to contrast with header/hero branding */
.site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  background: rgba(20, 32, 51, 0.92);
  color: #e8eef4;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 1.35rem;
  text-align: right;
}

.site-footer__tag {
  margin: 0 0 0 auto;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(232, 238, 244, 0.82);
  max-width: 36rem;
}

.site-footer__copy {
  margin: 0.3rem 0 0 auto;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(232, 238, 244, 0.58);
  max-width: 36rem;
}

.site-footer a {
  color: #f4f7fa;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown__menu {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    box-shadow: none;
  }
}
