:root {
  --red: #8f1d2c;
  --red-deep: #5c1018;
  --red-ink: #3a0c12;
  --flag: #c4161c;
  --cream: #f6f0e7;
  --paper: #fbf7f2;
  --card: #fffdfb;
  --line: #e4d5c6;
  --ink: #241816;
  --muted: #6f5d56;
  --gold: #9a7848;
  --header: 78px;
  --shadow: 0 18px 50px rgba(58, 12, 18, 0.08);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--card);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(1160px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 247, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(58, 12, 18, 0.05);
}
.header-bar {
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.logo-mark { width: 44px; height: 44px; display: block; flex: 0 0 auto; border-radius: 50%; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-lock { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-sub {
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.logo-rule {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex: 0 0 auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.05rem;
  margin-left: 0.2rem;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.header-cta { margin-left: auto; }
.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  font-size: 0.95rem;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--red); color: #fff8f4; }
.btn-primary:hover { background: var(--red-deep); }
.btn-ghost {
  background: transparent;
  color: #f6efe8;
  border-color: rgba(246, 239, 232, 0.45);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-line {
  background: transparent;
  color: var(--red);
  border-color: #e7c9c6;
}
.btn-line:hover { border-color: var(--red); }

.hero {
  position: relative;
  color: #f8f1ea;
  background:
    linear-gradient(180deg, #3a1016 0%, #1c070c 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.72fr);
  gap: 3rem;
  align-items: center;
  padding: 1.6rem 0 5.2rem;
}
.hero-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0 auto;
  padding: 0.85rem;
  background: #f6efe6;
  overflow: visible;
  box-shadow:
    0 0 0 1px rgba(154, 120, 72, 0.45),
    0 22px 48px rgba(12, 4, 6, 0.34);
}
.hero-person {
  display: block;
  width: auto;
  height: auto;
  max-width: min(460px, 100%);
  max-height: calc(100dvh - var(--header) - 10.5rem);
  object-fit: contain;
  object-position: center center;
}
.hero-frame figcaption {
  margin-top: 0.7rem;
  color: #6e2430;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
.medal-note { padding-top: 3.4rem; padding-bottom: 1.2rem; }
.medal-layout {
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 1fr);
  column-gap: 3rem;
  align-items: center;
}
.medal-note .prose { max-width: none; margin-top: 1rem; }
.medal-sketch {
  margin: 0;
  width: min(100%, 380px);
  justify-self: center;
}
.medal-sketch img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
@media (max-width: 920px) {
  .medal-layout { grid-template-columns: 1fr; row-gap: 1.2rem; }
  .medal-sketch { justify-self: start; width: min(100%, 300px); }
}
.portrait.is-wide img {
  aspect-ratio: 4 / 3;
  object-position: center center;
}
.gallery button.is-wide {
  grid-column: span 2;
}
.gallery button.is-wide img {
  aspect-ratio: 16 / 10;
  object-position: center center;
}
.life-frame {
  margin: 2.4rem 0 0;
}
.life-frame img {
  width: 100%;
  max-height: 720px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
}
.life-frame figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  color: #f0c9c4;
  margin-bottom: 1rem;
}
.eyebrow .dot { color: var(--flag); margin: 0 0.35rem; }
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  background: var(--flag);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.hero h1 span {
  display: block;
  width: 7.5rem;
  height: 4px;
  margin-top: 0.85rem;
  background: var(--flag);
}
.lede {
  margin-top: 1.4rem;
  max-width: 38rem;
  font-size: 1.12rem;
  font-weight: 300;
  color: #f3e4da;
}
.poem-lede {
  max-width: 26rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.lede-by {
  margin-top: 0.7rem;
  color: #e7b7b1;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }

.stats-wrap { position: relative; z-index: 2; margin-top: 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 252, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.stats div { padding: 1.35rem 1rem 1.25rem; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stat-icon { width: 30px; height: 30px; display: block; margin: 0 auto 0.45rem; color: var(--red); }
.stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--red-deep);
}
.stats strong.is-place {
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.stats span { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }

.section { padding: 5.5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2.2rem; }
.band .section-head { margin-inline: auto; text-align: center; }
.kicker {
  color: var(--red);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}
.section h2, .page-title h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.section-head p, .page-title p { margin-top: 0.8rem; color: var(--muted); }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: center; }
.portrait {
  position: relative;
  margin: 0;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
}
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center center;
}
.prose p + p { margin-top: 0.9rem; }
.prose { color: #3a2c28; }
.about-actions { margin-top: 1.5rem; }
.party { background: #3a1016; color: #f6efe8; }
.party h2, .party .prose { color: #f6efe8; }
.party .kicker { color: #f0c9c4; }
.logo-on-dark .logo-sub { color: #f0c9c4; }

.areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.area {
  position: relative;
  flex: 0 0 calc(25% - 0.7rem);
  width: calc(25% - 0.7rem);
  background: #fffdfb;
  border: 1px solid rgba(154, 120, 72, 0.32);
  border-radius: 16px;
  padding: 1.45rem 1.2rem 1.35rem;
  box-shadow: 0 10px 28px rgba(58, 12, 18, 0.04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.15rem;
  right: 1.15rem;
  height: 2px;
  background: var(--red);
}
.area:hover {
  border-color: #d7b4ae;
  box-shadow: 0 16px 34px rgba(58, 12, 18, 0.08);
  transform: translateY(-2px);
}
.area-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.95rem;
  border-radius: 50%;
  color: var(--red);
  background: #f6ebe4;
  border: 1px solid rgba(143, 29, 44, 0.14);
}
.area-icon svg { width: 22px; height: 22px; }
.area h3 {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.area p { color: #4a3834; font-size: 0.96rem; line-height: 1.55; }
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem 1.4rem; margin-top: 1.6rem; }
.cert { border-top: 2px solid var(--red); padding-top: 0.75rem; }
.cert b {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--red-deep);
}
.cert p { color: var(--muted); margin-top: 0.35rem; font-size: 0.98rem; }
#sertifikalar { scroll-margin-top: calc(var(--header) + 0.8rem); }
.article-video { margin-top: 1.1rem; }

.timeline { display: grid; gap: 0; }
.project {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}
.project time {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--red);
}
.project h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; }
.project .meta { color: var(--gold); font-size: 0.92rem; margin: 0.2rem 0 0.45rem; }
.project p { color: var(--muted); }

.home-writes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.15rem;
  align-items: start;
}
.writes-head {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.writes-head > div { max-width: 38rem; }
.writes-head .btn { flex: 0 0 auto; margin-bottom: 0.2rem; }
.home-writes .cards { grid-template-columns: 1fr 1fr; height: auto; align-items: start; }
.home-writes .card { border-top: 2px solid var(--red); min-height: 0; }
.home-writes .card h3 { min-height: 0; }
.home-writes .card p {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  color: var(--ink);
}
.home-writes .card .more { margin-top: 0.85rem; }
.rail {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.15rem 1.15rem 0.35rem;
}
.rail-block { padding: 0.95rem 0 0.85rem; }
.rail-block + .rail-block { border-top: 1px solid var(--line); }
.rail-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.rail h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.rail-list { list-style: none; margin: 0.45rem 0 0; padding: 0; }
.rail-list a {
  display: block;
  text-decoration: none;
  padding: 0.5rem 0;
}
.rail-list li + li { border-top: 1px solid var(--line); }
.rail-list time {
  display: block;
  color: var(--gold);
  font-size: 0.76rem;
}
.rail-list strong {
  display: block;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0.1rem;
}
.rail-empty { color: var(--muted); font-size: 0.92rem; line-height: 1.45; margin: 0.55rem 0 0; }
.rail-more {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 0.82rem;
  text-decoration: none;
}
.rail-more:hover { text-decoration: underline; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1.25rem 1.15rem;
  text-decoration: none;
  min-height: 100%;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  border-color: #d7b4ae;
  box-shadow: 0 12px 30px rgba(58, 12, 18, 0.06);
  transform: translateY(-2px);
}
.article-kicker { color: var(--muted); font-size: 0.86rem; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-height: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.card .meta time { color: var(--gold); }
.card .meta time + span:not(.card-tag)::before {
  content: "·";
  margin-right: 0.45rem;
  color: #c8b5a6;
}
.card-tag {
  color: var(--red);
  border: 1px solid #e7c9c6;
  border-radius: 99px;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0.7rem 0 0;
  min-height: calc(1.25em * 2);
}
.card p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.card .more {
  margin-top: auto;
  padding-top: 1.15rem;
  color: var(--red);
  font-size: 0.92rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .22s ease;
}
.card:hover .more { background-size: 100% 1px; }

.quote {
  position: relative;
  color: #f6efe8;
  display: flex;
  align-items: center;
  background: var(--red-ink);
}
.quote .wrap { container-type: inline-size; }
.quote blockquote {
  position: relative;
  margin: 0;
  padding: 4.5rem 0;
  max-width: none;
}
.quote p {
  font-family: var(--serif);
  font-size: min(2.55rem, 4.7cqi);
  line-height: 1.25;
  font-weight: 500;
  white-space: nowrap;
}
.quote footer { margin-top: 1rem; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; color: #f0c9c4; }

.page-hero { padding: 3.2rem 0 1rem; }
.band { background: var(--cream); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem 1rem;
}
.gallery-4 { grid-template-columns: repeat(4, 1fr); }
.gallery button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: center 40%;
  background: var(--paper);
  border-radius: 12px;
  transition: transform .45s ease;
}
@media (hover: hover) {
  .gallery button:hover img { transform: scale(1.03); }
}
.gallery span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3rem; }
.contact-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.contact-list li { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.contact-list span { display: block; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-list a { text-decoration: none; }
form { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-size: 0.92rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 2px;
  padding: 0.75rem 0.8rem;
  font-size: 1rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: #c9a59a;
  box-shadow: 0 0 0 3px rgba(143, 29, 44, 0.1);
}
textarea { min-height: 160px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }
.form-error { color: var(--red); font-size: 0.92rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0 1.4rem; }
.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.filters a.is-active, .filters a:hover { color: var(--red); border-color: #e3b8b4; background: #fff; }

.article { width: min(740px, calc(100% - 2.4rem)); margin: 0 auto 4rem; }
.article.has-pdf { width: min(980px, calc(100% - 2.4rem)); }
.article header { margin-bottom: 1.6rem; }
.pdf-view {
  margin-top: 1.6rem;
  padding: 0.8rem;
  background: #2c2422;
  border: 1px solid var(--line);
}
.pdf-view canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 0.8rem;
  background: #fff;
}
.pdf-view canvas:last-child { margin-bottom: 0; }
.admin-pdf-view { max-height: 70vh; overflow: auto; margin-top: 0.4rem; }
.article h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 0.6rem;
}
.article .body p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.4rem;
  line-height: 0.8;
  padding: 0.18rem 0.45rem 0 0;
  color: var(--red);
}
.article .body p { font-size: 1.12rem; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 1rem; color: var(--red); text-decoration: none; }

.timeline-edu { display: grid; gap: 1rem; margin-top: 1rem; }
.step { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.step b { color: var(--red); font-weight: 500; }

.site-footer { background: var(--red-ink); color: #f3e4da; padding-top: 3rem; padding-bottom: 7.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer p, .site-footer a { color: #f3e4da; }
.site-footer ul { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.site-footer li { margin: 0.25rem 0; }
.site-footer a { text-decoration: none; transition: color .18s ease; }
.site-footer a:hover { color: white; }
.footer-label { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; color: #e7b7b1 !important; }
.social { display: flex; gap: 1rem; margin-top: 0.8rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(243, 228, 218, 0.15);
  font-size: 0.9rem;
}
.site-sign {
  margin: 0;
  padding: 0.15rem 1.2rem 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.site-sign a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: #e7b7b1 !important;
}
.site-sign a:hover { color: #fff !important; }
.logo-on-dark .logo-name { color: #f6efe8; }

.flash {
  width: min(1160px, calc(100% - 2.4rem));
  margin: 0.8rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: #f3f7ef;
}
.flash-err { background: #fbf1ef; border-color: #efd0cb; }

.auth-main {
  min-height: calc(100vh - 2rem);
  display: grid;
  place-items: center;
  padding: 2rem 0 3rem;
}
.auth-card {
  width: min(440px, calc(100% - 2.4rem));
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.6rem;
}
.auth-card h1 { font-family: var(--serif); font-size: 2.2rem; margin: 0.6rem 0 1rem; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); }
.admin-table th, .admin-table td { text-align: left; padding: 0.8rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.row-actions { display: flex; gap: 0.7rem; align-items: center; }
.row-actions form { display: inline; }
.row-actions button { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
.badge { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); }

dialog {
  border: 0;
  padding: 0.6rem 1rem 1.2rem;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: rgba(18, 8, 10, 0.94);
  color: #f6efe8;
}
dialog::backdrop { background: rgba(18, 8, 10, 0.94); }
dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: veil .22s ease;
}
@keyframes veil {
  from { opacity: 0; }
  to { opacity: 1; }
}
dialog img {
  width: auto;
  max-width: min(920px, 100%);
  max-height: calc(100dvh - 8rem);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
dialog p { color: #f6efe8; text-align: center; margin-top: 0.7rem; }
dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 0.6rem;
  padding: 0.4rem 0.7rem;
  background: transparent;
  border: 0;
  color: #f6efe8;
  cursor: pointer;
}
.table-scroll { overflow-x: auto; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; padding: 1.4rem 0 4.2rem; }
  .hero-frame { order: -1; width: fit-content; max-width: 100%; margin: 0 auto; }
  .hero-person { max-width: min(100%, 420px); max-height: min(78dvh, 760px); object-position: center center; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 1.2rem 1rem;
    gap: 0.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    box-shadow: 0 18px 40px rgba(58, 12, 18, 0.12);
  }
  .site-nav a { display: flex; align-items: center; width: 100%; min-height: 44px; }
  .stats div:nth-child(2n + 1) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .admin-nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; background: transparent; }
  .split, .areas, .cards, .contact-grid, .footer-grid, .stats, .pair, .certs { grid-template-columns: 1fr 1fr; }
  .home-writes { grid-template-columns: 1fr; }
  .areas { gap: 0.75rem; }
  .area { flex-basis: calc(50% - 0.4rem); width: calc(50% - 0.4rem); }
  .gallery, .gallery-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .stats, .split, .cards, .contact-grid, .footer-grid, .project, .step, .pair, .certs, .home-writes .cards { grid-template-columns: 1fr; }
  .area { flex-basis: 100%; width: 100%; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .hero-grid { padding-bottom: 2.2rem; }
  .writes-head { flex-direction: column; align-items: flex-start; }
  .stats-wrap { margin-top: 0; }
  .band .section-head { text-align: left; margin-left: 0; }
  .section { padding: 3.4rem 0; }
  .footer-bottom { flex-direction: column; }
  .logo-rule { display: none; }
  .card h3 { min-height: 0; }
  .article .body p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    color: inherit;
  }
  .site-footer li a,
  .footer-bottom a,
  .contact-list a,
  .social a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    overflow-wrap: anywhere;
  }
  .social a,
  .contact-list a {
    justify-content: center;
    min-width: 44px;
  }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.3rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.55s ease both; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.18s; }
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .4s ease, transform .4s ease;
  }
  .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--red);
  transition: opacity .34s ease, visibility .34s ease;
}
.page-veil .logo-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  box-shadow: 0 0 0 7px #f3e6dc;
  animation: veil-mark .42s ease both;
}
.page-veil.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}
.page-veil.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: none;
}
@keyframes veil-mark {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .page-veil { display: none !important; }
}

input[type="checkbox"] { width: auto; }
.hint { color: var(--muted); font-size: 0.92rem; }

.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  background: var(--red-ink);
  color: #f6efe8;
  padding: 1rem 0.7rem 1.4rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.admin-side .logo { margin: 0.2rem 0.45rem 0.9rem; color: #f6efe8; }
.admin-side .logo-name { color: #f6efe8; }
.nav-group { display: contents; }
.admin-side nav form { display: contents; }
.admin-side nav a,
.admin-side nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #f6efe8;
  text-decoration: none;
  min-height: 44px;
  padding: 0.42rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-side nav a:hover,
.admin-side nav button:hover,
.admin-side nav a.is-active { background: rgba(255, 255, 255, 0.12); }
.nav-label {
  margin: 0.9rem 0.7rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e7b7b1;
}
.count {
  background: #f6efe8;
  color: var(--red-ink);
  border-radius: 99px;
  min-width: 1.2rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.3;
}
.admin-main { padding: 1.3rem 1.4rem 2.6rem; background: var(--cream); }
.admin-main .flash { width: auto; margin: 0 0 1rem; }
.admin-page h1 { font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.admin-actions, .check-row, .row-actions { display: flex; flex-wrap: wrap; gap: 0.55rem 0.8rem; align-items: center; }
.metric-grid, .admin-split, .form-grid { display: grid; gap: 0.8rem; }
.metric-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 0.8rem; }
.admin-split, .form-grid { grid-template-columns: 1fr 1fr; }
.metric, .panel, .list-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem;
}
.metric strong { display: block; font-family: var(--serif); font-size: 2rem; color: var(--red); line-height: 1; }
.metric span, .panel h2 { display: block; }
.panel h2, .panel h3 { font-family: var(--serif); font-weight: 600; }
.panel h2 { font-size: 1.35rem; margin-bottom: 0.65rem; }
.panel h3 { font-size: 1.05rem; margin: 0.9rem 0 0.45rem; }
.panel-top, .message-card header, .journey header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.panel-top a, .jump a, .row-actions a { color: var(--red); text-decoration: none; }
.stack { display: grid; gap: 0.75rem; margin-top: 0.8rem; }
.plain-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.plain-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.plain-list a { min-width: 0; }
.bars { display: grid; gap: 0.35rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.9fr) 1fr auto;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.92rem;
}
.bar { display: block; height: 8px; background: #f0e4d8; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); }
.list-card { display: flex; justify-content: space-between; gap: 1rem; }
.list-card p { margin-top: 0.2rem; }
.gallery-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.4rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.8rem;
}
.gallery-card img { width: 150px; height: 190px; object-fit: cover; object-position: center 20%; }
.gallery-tools { grid-column: 2; }
textarea.short { min-height: 88px; }
.admin-form label.check { display: flex; align-items: center; gap: 0.45rem; }
.jump { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0.8rem; }
.admin-savebar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--cream);
  padding: 0.35rem 0;
}
.visit-list { display: grid; gap: 0.65rem; }
.visit-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem 0.95rem 0.95rem;
}
.visit-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
}
.visit-card header span,
.visit-when { color: var(--muted); font-size: 0.88rem; }
.visit-when { margin-top: 0.15rem; }
.visit-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
}
.visit-path li { display: flex; align-items: center; gap: 0.35rem; }
.visit-path li + li::before { content: "→"; color: var(--gold); }
.visit-path span {
  background: var(--cream);
  border-radius: 99px;
  padding: 0.22rem 0.65rem;
  font-size: 0.9rem;
}
.visit-path .is-form { background: #f8e8e6; color: var(--red); }
.activity { list-style: none; margin: 0.2rem 0 0; padding: 0; }
.activity li {
  display: grid;
  grid-template-columns: 8.2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}
.activity time { color: var(--muted); font-size: 0.88rem; }
.message-card.is-new { border-color: #e3b8b4; }
.pill { background: #f8e8e6; color: var(--red); border-radius: 99px; padding: 0.05rem 0.45rem; font-size: 0.75rem; }
.text-danger { background: none; border: 0; color: var(--red); cursor: pointer; padding: 0.4rem 0; }
.admin-table a, .admin-table button {
  background: none;
  border: 0;
  color: var(--red);
  cursor: pointer;
  text-decoration: none;
}
.row-actions form { display: inline-flex; }
.row-actions a:not(.btn), .row-actions button:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border: 1px solid #e7c9c6;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.row-actions a:not(.btn):hover, .row-actions button:not(.btn):hover { border-color: var(--red); }

@media (max-width: 980px) {
  .admin-shell { display: block; }
  .admin-side { position: sticky; top: 0; height: auto; z-index: 6; padding: 0.75rem 0.85rem 0.85rem; }
  .admin-side .logo { margin: 0 0.15rem 0.7rem; }
  .admin-side nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .nav-label { display: none; }
  .admin-side nav a,
  .admin-side nav button {
    justify-content: center;
    gap: 0.35rem;
    min-height: 42px;
    padding: 0.4rem 0.45rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    text-align: center;
    line-height: 1.2;
    font-size: 0.92rem;
  }
  .admin-side nav a:hover,
  .admin-side nav button:hover { background: rgba(255, 255, 255, 0.14); }
  .admin-side nav a.is-active {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .gallery-card { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .admin-side nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-split, .form-grid, .metric-grid { grid-template-columns: 1fr; }
  .admin-head, .list-card { flex-direction: column; align-items: flex-start; }
  .gallery-card { grid-template-columns: 1fr; }
  .gallery-card img { width: 100%; height: 220px; }
  .gallery-tools { grid-column: 1; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar { display: none; }
  .admin-main { padding: 1rem 0.9rem 2.4rem; }
  .admin-page h1, .admin-form h2 { overflow-wrap: anywhere; }
  .table-scroll { overflow: visible; }
  .admin-table { min-width: 0; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table tr {
    margin: 0 0 0.7rem;
    padding: 0.75rem 0.85rem;
    background: var(--card);
    border: 1px solid var(--line);
  }
  .admin-table td { border: 0; padding: 0.2rem 0; }
  .admin-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

.poem {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 28;
  width: min(216px, calc(100vw - 1.4rem));
}
.poem-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0.58rem 0.46rem;
}
.poem-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 0;
}
.poem .kicker { margin: 0; font-size: 0.62rem; letter-spacing: 0.12em; }
.poem-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 0.08rem;
}
.poem-by { color: var(--muted); font-size: 0.74rem; margin-top: 0.08rem; }
.poem-actions { display: flex; gap: 0.28rem; flex: 0 0 auto; }
.poem-min {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e7c9c6;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-size: 0.74rem;
}
.poem-min:hover { border-color: var(--red); }
.poem-frame {
  position: absolute;
  width: 200px;
  height: 113px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  pointer-events: none;
}
.poem-frame iframe { width: 200px; height: 113px; border: 0; }
.poem-start {
  display: none;
  min-height: 30px;
  padding: 0.15rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff8f4;
  cursor: pointer;
  font-size: 0.74rem;
}
.poem.needs-start .poem-start { display: inline-flex; align-items: center; }
.poem-peek {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  min-height: 42px;
  padding: 0.35rem 0.8rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--ink);
}
.poem-peek span {
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 600;
}
.poem-peek strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}
.poem.is-shut { width: auto; }
.poem.is-shut .poem-card { display: none; }
.poem.is-shut .poem-peek { display: inline-flex; }
