/* ============================================================
   Premium Energy Holdings, LLC — Design System
   Warm monochrome, editorial typography, flat surfaces.
   ============================================================ */

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-alt: #F9F9F8;
  --ink: #111111;
  --ink-soft: #2F3437;
  --muted: #787774;
  --line: #EAEAEA;
  --line-soft: rgba(0, 0, 0, 0.06);

  --pastel-red-bg: #FDEBEC;   --pastel-red-tx: #9F2F2D;
  --pastel-blue-bg: #E1F3FE;  --pastel-blue-tx: #1F6C9F;
  --pastel-green-bg: #EDF3EC; --pastel-green-tx: #346538;
  --pastel-yellow-bg: #FBF3DB;--pastel-yellow-tx: #956400;

  --serif: 'Newsreader', 'Georgia', serif;
  --sans: 'Geist', 'Helvetica Neue', 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'SF Mono', 'JetBrains Mono', monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 72rem;
  --maxw-text: 46rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--pastel-yellow-bg); color: var(--ink); }

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

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: block;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: var(--maxw-text);
}

.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; }

p + p { margin-top: 1em; }

/* ------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 7rem 0; }
.section--tight { padding: 5rem 0; }
.section--line { border-top: 1px solid var(--line); }

.section-head { max-width: var(--maxw-text); margin-bottom: 3.5rem; }
.section-head p { margin-top: 1.2rem; color: var(--muted); }

/* ------------------------------------------------------------
   Header / Nav
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; }

.brand-logo { height: 32px; width: auto; flex-shrink: 0; }

.site-footer .brand-logo { height: 36px; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 1.9rem; }

.nav a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 180ms var(--ease-out);
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.nav-group { position: relative; }

.nav-group > button {
  font: inherit;
  font-size: 0.88rem;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 180ms var(--ease-out);
}

.nav-group > button:hover { color: var(--ink); }

.nav-group > button svg { width: 10px; height: 10px; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem;
  min-width: 15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  color: var(--ink-soft);
}

.nav-dropdown a:hover { background: var(--surface-alt); }

.nav-dropdown .drop-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.1rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.5rem 1.2rem;
  }
  .nav.open { display: flex; }
  .nav a, .nav-group > button { padding: 0.7rem 0; font-size: 1rem; }
  .nav-group .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1rem;
    min-width: 0;
  }
  .nav-toggle { display: block; }
}

/* ------------------------------------------------------------
   Hero (video)
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #F5F3EF;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 16, 14, 0.78) 0%,
    rgba(17, 16, 14, 0.38) 45%,
    rgba(17, 16, 14, 0.28) 100%
  );
}

.hero .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 4.5rem;
  padding-top: 9rem;
}

.hero .eyebrow { color: rgba(245, 243, 239, 0.72); }

.hero h1 { color: #FBFAF8; max-width: 17ch; }

.hero .lede {
  color: rgba(245, 243, 239, 0.82);
  margin-top: 1.6rem;
  max-width: 38rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

.hero-meta {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(245, 243, 239, 0.22);
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.66);
}

/* Page hero (interior pages) */
.page-hero {
  padding: 6.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60rem 24rem at 85% -10%, rgba(212, 200, 170, 0.14), transparent 70%),
    var(--bg);
}

.page-hero h1 { max-width: 20ch; }
.page-hero .lede { margin-top: 1.4rem; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.72rem 1.35rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.btn:active { transform: scale(0.98); }

.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #333333; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.hero .btn-ghost {
  color: #F5F3EF;
  border-color: rgba(245, 243, 239, 0.4);
}
.hero .btn-ghost:hover { border-color: #F5F3EF; }

.hero .btn-light { background: #FBFAF8; color: var(--ink); }
.hero .btn-light:hover { background: #EFEDE8; }

/* ------------------------------------------------------------
   Tags
   ------------------------------------------------------------ */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.tag-blue   { background: var(--pastel-blue-bg);   color: var(--pastel-blue-tx); }
.tag-green  { background: var(--pastel-green-bg);  color: var(--pastel-green-tx); }
.tag-yellow { background: var(--pastel-yellow-bg); color: var(--pastel-yellow-tx); }
.tag-red    { background: var(--pastel-red-bg);    color: var(--pastel-red-tx); }
.tag-plain  { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--line); }

/* ------------------------------------------------------------
   Bento / cards
   ------------------------------------------------------------ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }

a.card { display: block; }

.card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.card h3 { margin-bottom: 0.4rem; }

.card .meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card p { color: var(--muted); font-size: 0.94rem; }

.card-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }

.stat-number {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.stat-label { color: var(--muted); font-size: 0.9rem; }

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .span-3, .span-4 { grid-column: span 6; }
  .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}

@media (max-width: 620px) {
  .span-3, .span-4 { grid-column: span 12; }
}

/* ------------------------------------------------------------
   Project detail blocks
   ------------------------------------------------------------ */
.project-block {
  border-top: 1px solid var(--line);
  padding: 4.5rem 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3.5rem;
}

.project-block:first-of-type { border-top: 0; }

.project-side { position: sticky; top: 6.5rem; align-self: start; }

.project-side .tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 1.6rem; }

.project-side dl { border-top: 1px solid var(--line); }

.project-side dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.project-side dt { color: var(--muted); }
.project-side dd { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); text-align: right; }

.project-body h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 2.2rem 0 0.9rem;
}

.project-body h4:first-child { margin-top: 0; }

.project-body p { color: var(--ink-soft); }

.project-body ul { list-style: none; margin-top: 0.4rem; }

.project-body ul li {
  padding: 0.65rem 0 0.65rem 1.4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.95rem;
}

.project-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--pastel-green-tx);
  opacity: 0.55;
}

@media (max-width: 900px) {
  .project-block { grid-template-columns: 1fr; gap: 2rem; }
  .project-side { position: static; }
}

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 30rem;
}

caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 1rem 1.25rem 0.4rem;
}

th, td { text-align: left; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--line); }

th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

tr:last-child td { border-bottom: 0; }

td { color: var(--ink-soft); }

/* ------------------------------------------------------------
   FAQ accordion
   ------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
  transition: color 160ms var(--ease-out);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary .faq-icon {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
}

.faq details[open] summary .faq-icon::before { content: "\2212"; }
.faq details:not([open]) summary .faq-icon::before { content: "+"; }

.faq .faq-body { padding: 0 0 1.6rem; max-width: var(--maxw-text); color: var(--muted); font-size: 0.96rem; }
.faq .faq-body a { color: var(--pastel-blue-tx); border-bottom: 1px solid currentColor; }

/* ------------------------------------------------------------
   Documents list
   ------------------------------------------------------------ */
.doc-list { border-top: 1px solid var(--line); }

.doc-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 0.2rem;
  border-bottom: 1px solid var(--line);
  transition: background 160ms var(--ease-out);
}

.doc-list a:hover { background: var(--surface-alt); }

.doc-list .doc-name { color: var(--ink); font-size: 0.98rem; }

.doc-list .doc-kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Team roster
   ------------------------------------------------------------ */
.roster { border-top: 1px solid var(--line); }

.roster div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.roster dt { color: var(--muted); }
.roster dd { color: var(--ink); }

/* Staff cards */
.person-card { display: flex; flex-direction: column; gap: 0.5rem; }

.person-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.9rem;
}

.person-card .name { font-weight: 500; color: var(--ink); font-size: 1.02rem; }
.person-card .role {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */
.contact-line {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  flex-wrap: wrap;
}

.contact-line .k { color: var(--muted); }
.contact-line .v { color: var(--ink); font-family: var(--mono); font-size: 0.85rem; }

.form-grid { display: grid; gap: 1rem; }

.form-grid label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.45rem;
}

.form-grid input, .form-grid textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  transition: border-color 160ms var(--ease-out);
}

.form-grid input:focus, .form-grid textarea:focus {
  outline: none;
  border-color: var(--ink);
}

/* ------------------------------------------------------------
   Quote band
   ------------------------------------------------------------ */
.quote-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(50rem 20rem at 12% 120%, rgba(212, 200, 170, 0.16), transparent 70%),
    var(--surface);
  padding: 6rem 0;
}

.quote-band blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 54rem;
}

.quote-band cite {
  display: block;
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Video embed
   ------------------------------------------------------------ */
.embed-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.embed-chrome {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.embed-chrome span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #E3E2DE;
}

.embed-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 4.5rem 0 2.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-grid h5 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-grid ul { list-style: none; }

.footer-grid li { margin-bottom: 0.55rem; font-size: 0.9rem; }

.footer-grid a { color: var(--ink-soft); }
.footer-grid a:hover { color: var(--ink); }

.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 22rem; margin-top: 0.8rem; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-bottom .mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------
   Image gallery + lightbox
   ------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }

.gallery figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 200ms var(--ease-out);
}

.gallery figure:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }

.gallery a { display: block; cursor: zoom-in; }

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.gallery figcaption {
  padding: 0.9rem 1.25rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.gallery .cap-title { font-size: 0.92rem; color: var(--ink); }

.gallery .cap-kind {
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  flex-shrink: 0;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem 1.5rem;
  background: rgba(17, 16, 14, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
  cursor: zoom-out;
}

.lightbox-overlay.open { opacity: 1; pointer-events: auto; }

.lightbox-overlay img {
  max-width: min(96vw, 78rem);
  max-height: 82vh;
  width: auto;
  border-radius: var(--radius);
  background: #FFFFFF;
}

.lightbox-overlay .lightbox-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.75);
  text-align: center;
}

.lightbox-overlay .lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.75);
  background: none;
  border: 1px solid rgba(245, 243, 239, 0.3);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.lightbox-overlay .lightbox-close:hover { color: #F5F3EF; border-color: #F5F3EF; }

/* Standalone figure with lightbox */
.figure-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.figure-frame a { display: block; cursor: zoom-in; }

.figure-frame img { width: 100%; object-fit: cover; }

.figure-frame figcaption {
  padding: 0.9rem 1.25rem 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.figure-frame .cap-title { font-size: 0.92rem; color: var(--ink); }

.figure-frame .cap-kind {
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Vertical timeline (graphical)
   ------------------------------------------------------------ */
.vtimeline { position: relative; max-width: 56rem; margin: 0 auto; }

.vtimeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.vt-item { position: relative; width: 50%; padding: 0 2.6rem 2.4rem; }

.vt-item:last-child { padding-bottom: 0; }

.vt-item:nth-child(odd) { left: 0; text-align: right; }

.vt-item:nth-child(even) { left: 50%; text-align: left; }

.vt-item::before {
  content: "";
  position: absolute;
  top: 0.32rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--pastel-blue-tx);
  z-index: 1;
}

.vt-item:nth-child(odd)::before { right: -0.42rem; }

.vt-item:nth-child(even)::before { left: -0.42rem; }

.vt-year {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--pastel-blue-tx);
  margin-bottom: 0.5rem;
}

.vt-card {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 680px) {
  .vtimeline::before { left: 0.35rem; transform: none; }
  .vt-item,
  .vt-item:nth-child(odd),
  .vt-item:nth-child(even) {
    left: 0;
    width: 100%;
    text-align: left;
    padding: 0 0 1.8rem 2rem;
  }
  .vt-item:nth-child(odd)::before,
  .vt-item:nth-child(even)::before { left: 0; right: auto; }
}

/* ------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: calc(var(--index, 0) * 80ms);
}

.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
