:root {
  --ink: #0b0a09;
  --ink-soft: #11100e;
  --surface: #171512;
  --surface-2: #1d1a16;
  --paper: #f3ead8;
  --paper-deep: #ddd0b7;
  --text: #f3eee5;
  --muted: #aba294;
  --gold: #cdb176;
  --gold-bright: #ead6a1;
  --gold-deep: #8f7442;
  --wine: #873344;
  --wine-bright: #b34d5d;
  --line: rgba(225, 206, 163, 0.17);
  --line-strong: rgba(225, 206, 163, 0.35);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 1180px;
  --section-space: clamp(5.5rem, 10vw, 9.5rem);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold-deep) var(--ink);
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 15% 10%, rgba(135, 51, 68, 0.08), transparent 28rem),
    radial-gradient(circle at 82% 38%, rgba(205, 177, 118, 0.05), transparent 32rem),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.04) 0 0.5px, transparent 0.8px);
  background-size: auto, 5px 5px;
}

body.intro-lock {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  margin: 0;
  color: inherit;
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  cursor: pointer;
}

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

p,
h1,
h2,
h3,
h4,
dl,
dd,
blockquote,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

section,
header {
  scroll-margin-top: 90px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(calc(100% - 48px), var(--page));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-space);
}

.section-label {
  margin-bottom: 0.8rem;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.14;
}

h2 > span {
  display: block;
  margin-top: 0.35rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.26em;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(2.4rem, 6vw, 4.8rem);
}

.section-heading > p {
  padding-bottom: 0.7rem;
  color: var(--muted);
  font-size: 1rem;
}

.section-heading--center {
  display: block;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.section-heading--center > p {
  max-width: 520px;
  margin: 1.25rem auto 0;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: transform 0.35s var(--ease), background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.button span,
.button i {
  transition: transform 0.35s var(--ease);
}

.button--primary {
  background: var(--gold-bright);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(205, 177, 118, 0.12);
}

.button--primary:hover,
.button--primary:focus-visible {
  transform: translateY(-3px);
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(205, 177, 118, 0.2);
}

.button:hover span:last-child,
.button:hover i,
.button:focus-visible span:last-child,
.button:focus-visible i {
  transform: translate(2px, -2px);
}

/* Opening animation */
.site-intro {
  display: none;
}

.js .site-intro {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, #1c1813 0, #0b0a09 55%, #050505 100%);
  opacity: 1;
  visibility: visible;
  animation: introFailsafe 0.01s step-end 5s forwards;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.site-intro::before,
.site-intro::after {
  position: absolute;
  border: 1px solid rgba(205, 177, 118, 0.15);
  border-radius: 50%;
  content: "";
}

.site-intro::before {
  width: min(82vw, 700px);
  aspect-ratio: 1;
}

.site-intro::after {
  width: min(62vw, 520px);
  aspect-ratio: 1;
}

.site-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-skip {
  position: absolute;
  z-index: 2;
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  min-height: 44px;
  padding: 0 0.8rem;
  border: 0;
  border-bottom: 1px solid rgba(243, 234, 216, 0.35);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.intro-skip:hover {
  color: var(--paper);
}

.intro-stage {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(78vw, 420px);
}

.intro-paper {
  position: relative;
  width: min(44vw, 240px);
  aspect-ratio: 1;
  overflow: hidden;
  transform: scale(0.72) rotate(-5deg);
  border: 1px solid rgba(205, 177, 118, 0.65);
  border-radius: 50%;
  background: rgba(243, 234, 216, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  opacity: 0;
}

.intro-paper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  filter: contrast(1.12);
}

.intro-ink {
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 25%, rgba(205, 177, 118, 0.34) 48%, rgba(255, 255, 255, 0.7) 50%, transparent 72%);
  mix-blend-mode: multiply;
}

.intro-wordmark {
  margin-top: 1.45rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  opacity: 0;
  transform: translateY(14px);
}

.intro-kicker {
  margin-top: 0.45rem;
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  opacity: 0;
}

.intro-line {
  width: 0;
  height: 1px;
  margin-block: 1.2rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-intro.is-running .intro-paper {
  animation: introPaper 0.9s var(--ease) 0.15s forwards;
}

.site-intro.is-running .intro-ink {
  animation: inkSweep 1s var(--ease) 0.75s forwards;
}

.site-intro.is-running .intro-wordmark {
  animation: introText 0.7s var(--ease) 0.75s forwards;
}

.site-intro.is-running .intro-kicker {
  animation: introFade 0.7s ease 1.05s forwards;
}

.site-intro.is-running .intro-line {
  animation: introLine 0.8s var(--ease) 0.9s forwards;
}

@keyframes introPaper {
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes inkSweep {
  to { transform: translateX(120%); }
}

@keyframes introText {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introFade {
  to { opacity: 1; }
}

@keyframes introLine {
  to { width: 100%; }
}

@keyframes introFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Navigation and hero */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(205, 177, 118, 0.05) 50%, transparent 50.1%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 45%);
}

.site-nav {
  position: fixed;
  z-index: 100;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  width: min(calc(100% - 32px), 1180px);
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem 0.55rem 0.8rem;
  transform: translateX(-50%);
  border: 1px solid rgba(225, 206, 163, 0.16);
  border-radius: 5px;
  background: rgba(12, 11, 9, 0.76);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.nav-brand small {
  display: block;
  margin-top: 0.25rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.48rem;
  letter-spacing: 0.22em;
}

.nav-brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(205, 177, 118, 0.42);
  border-radius: 50%;
  background: transparent;
}

.nav-brand__mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 1.4vw, 1.25rem);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 0.55rem;
  color: #c8c0b4;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.nav-links a:not(.nav-cta)::after {
  position: absolute;
  right: 0.55rem;
  bottom: 7px;
  left: 0.55rem;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--gold);
  content: "";
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links .nav-cta {
  min-width: 104px;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--gold-bright);
}

.nav-links .nav-cta:hover {
  background: var(--gold-bright);
  color: var(--ink);
}

.nav-toggle {
  display: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  padding-block: 9rem 6rem;
}

.hero-glow {
  position: absolute;
  top: 8%;
  right: -15%;
  width: min(70vw, 900px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(135, 51, 68, 0.18), rgba(205, 177, 118, 0.055) 34%, transparent 68%);
  filter: blur(12px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow span {
  width: 36px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6.2vw, 6.65rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.14;
}

.hero h1 > small {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.5;
}

.hero h1 em,
.contact-heading h2 em {
  color: var(--gold-bright);
  font-style: normal;
}

.hero-lead {
  max-width: 630px;
  margin-top: 1.8rem;
  color: #bdb4a6;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-top: 2.3rem;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(205, 177, 118, 0.3);
  color: var(--paper-deep);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.text-link:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.hero-facts {
  display: flex;
  margin-top: clamp(2.8rem, 7vh, 5rem);
  border-top: 1px solid var(--line);
}

.hero-facts div {
  min-width: 140px;
  padding: 1.15rem 2rem 0 0;
}

.hero-facts div + div {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.hero-facts dt {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 800;
}

.hero-facts dd {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: clamp(0.84rem, 1vw, 0.94rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.hero-paper {
  position: relative;
  z-index: 2;
  width: min(76%, 430px);
  padding: 1.3rem 1.3rem 1rem;
  transform: rotate(2.5deg);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 0.8s var(--ease);
}

.hero-art:hover .hero-paper {
  transform: rotate(-1deg) translateY(-8px);
}

.hero-paper::before,
.hero-paper::after {
  position: absolute;
  width: 52px;
  height: 72px;
  border: 1px solid rgba(11, 10, 9, 0.25);
  content: "";
}

.hero-paper::before {
  top: 14px;
  left: 14px;
  border-right: 0;
  border-bottom: 0;
}

.hero-paper::after {
  right: 14px;
  bottom: 14px;
  border-top: 0;
  border-left: 0;
}

.hero-paper img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.paper-label,
.paper-signature {
  display: block;
  text-align: center;
}

.paper-label {
  margin-bottom: 0.4rem;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.33em;
}

.paper-signature {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: 0.68rem;
  font-style: italic;
  letter-spacing: 0.08em;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(205, 177, 118, 0.22);
  border-radius: 50%;
}

.orbit--one {
  width: 94%;
  aspect-ratio: 1;
  animation: orbitSpin 24s linear infinite;
}

.orbit--one::after {
  position: absolute;
  top: 14%;
  left: 4%;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
  content: "";
}

.orbit--two {
  width: 72%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.45;
  animation: orbitSpin 32s linear infinite reverse;
}

.spark {
  position: absolute;
  z-index: 3;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(234, 214, 161, 0.6);
  animation: sparkFloat 3s ease-in-out infinite;
}

.spark--one { top: 16%; right: 4%; font-size: 2rem; }
.spark--two { bottom: 18%; left: 0; font-size: 1.25rem; animation-delay: -1.2s; }

@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes sparkFloat { 50% { transform: translateY(-10px) rotate(8deg); opacity: 0.65; } }

.scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  color: #8d8579;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.scroll-cue i {
  width: 52px;
  height: 1px;
  overflow: hidden;
  background: rgba(205, 177, 118, 0.2);
}

.scroll-cue i::after {
  display: block;
  width: 50%;
  height: 100%;
  transform: translateX(-110%);
  background: var(--gold);
  content: "";
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine { 55%, 100% { transform: translateX(220%); } }

/* Reveals */
.js .reveal.reveal-ready {
  opacity: 0;
  transform: translateY(38px);
}

.js .reveal.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.js [data-stagger-group].reveal-ready .stagger-item {
  opacity: 0;
  transform: translateX(-22px);
}

.js [data-stagger-group].is-visible .stagger-item {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.55s var(--ease) var(--stagger-delay, 0ms), transform 0.55s var(--ease) var(--stagger-delay, 0ms);
}

/* About */
.about-section {
  overflow: hidden;
  background: var(--paper);
  color: #191713;
}

.about-section::before {
  position: absolute;
  top: -20%;
  right: -8%;
  width: 42vw;
  aspect-ratio: 1;
  border: 1px solid rgba(11, 10, 9, 0.08);
  border-radius: 50%;
  content: "";
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.logo-frame {
  position: relative;
  max-width: 440px;
  margin: auto;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border: 1px solid rgba(11, 10, 9, 0.22);
  background: #fffaf0;
  box-shadow: 22px 26px 0 rgba(11, 10, 9, 0.08), 0 30px 70px rgba(20, 15, 8, 0.16);
}

.logo-frame::before {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(11, 10, 9, 0.11);
  content: "";
  pointer-events: none;
}

.logo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: contain;
}

.logo-frame p {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
}

.logo-frame__number {
  position: absolute;
  z-index: 2;
  top: -16px;
  right: -14px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.about-copy .section-label {
  color: var(--wine);
}

.about-copy h2 > span {
  color: var(--wine);
}

.about-copy > p {
  max-width: 670px;
  margin-top: 1.35rem;
  color: #5e574d;
}

.about-copy .about-intro {
  margin-top: 2rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.6;
}

.about-copy blockquote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 2rem;
  padding: 1.25rem 1.45rem;
  border-left: 3px solid var(--wine);
  background: rgba(135, 51, 68, 0.055);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.profile-list {
  list-style: none;
  border-top: 1px solid rgba(11, 10, 9, 0.15);
}

.profile-list li {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 1.3rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid rgba(11, 10, 9, 0.15);
}

.profile-list span {
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile-list strong {
  font-size: 0.92rem;
  font-weight: 600;
}

/* Resume */
.resume-section {
  background:
    radial-gradient(circle at 10% 30%, rgba(135, 51, 68, 0.12), transparent 30rem),
    var(--ink-soft);
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.resume-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.resume-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  content: "";
}

.resume-card header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.resume-index {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.resume-card header p {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
}

.resume-card h3 {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.timeline-list,
.teaching-list,
.specialty-list {
  list-style: none;
}

.timeline-list li {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 1rem;
  padding: 0.62rem 0 0.62rem 1.25rem;
  color: #cdc5b8;
  font-size: 0.82rem;
  line-height: 1.55;
}

.timeline-list li::before {
  position: absolute;
  top: 1.03rem;
  left: 1px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  content: "";
}

.timeline-list li:not(:last-child)::after {
  position: absolute;
  top: 1.42rem;
  bottom: -0.6rem;
  left: 3.5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-list time {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.teaching-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 1.2rem;
}

.teaching-list li {
  position: relative;
  padding: 0.58rem 0 0.58rem 1rem;
  border-bottom: 1px solid rgba(225, 206, 163, 0.08);
  color: #c9c1b4;
  font-size: 0.79rem;
  line-height: 1.5;
}

.teaching-list li::before {
  position: absolute;
  top: 1rem;
  left: 0;
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: var(--gold-deep);
  content: "";
}

.resume-card--specialties {
  grid-column: 1 / -1;
}

.specialty-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.specialty-list li {
  display: flex;
  min-height: 120px;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  border-left: 1px solid var(--line);
}

.specialty-list li:first-child {
  border-left: 0;
}

.specialty-list li > span {
  color: var(--gold);
}

.specialty-list strong,
.specialty-list small {
  display: block;
}

.specialty-list strong {
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: 1rem;
}

.specialty-list small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

/* Video */
.video-section {
  overflow: hidden;
  background:
    linear-gradient(rgba(243, 234, 216, 0.97), rgba(243, 234, 216, 0.97)),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(11, 10, 9, 0.05) 10px 11px);
  color: var(--ink);
}

.video-section .section-label,
.video-section h2 > span {
  color: var(--wine);
}

.video-section .section-heading > p {
  color: #625a4f;
}

.video-rail-shell {
  width: 100%;
}

.video-rail {
  width: min(100%, 820px);
  margin-inline: auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  perspective: 1200px;
  perspective-origin: center 42%;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--video-side-padding, 0px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.video-rail::-webkit-scrollbar {
  display: none;
}

.video-track {
  --video-gap: clamp(1rem, 2vw, 1.5rem);
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: stretch;
  gap: var(--video-gap);
  padding-block: 0.65rem 1.55rem;
  transform-style: preserve-3d;
}

.video-track::before,
.video-track::after {
  display: block;
  flex: 0 0 max(0px, calc(var(--video-side-padding, 0px) - var(--video-gap)));
  content: "";
}

.video-track.is-single {
  justify-content: center;
}

.video-track.is-single::before,
.video-track.is-single::after {
  display: none;
}

.video-feature {
  position: relative;
  flex: 0 0 clamp(290px, 36vw, 420px);
  max-width: none;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.video-feature__surface {
  position: relative;
  height: 100%;
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition: transform 0.42s var(--ease), opacity 0.3s ease;
}

.video-rail.is-scrolling .video-feature__surface {
  transition: none;
}

.video-feature:not(.is-current) .video-feature__surface::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  border-radius: 4px;
  content: "";
  cursor: pointer;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(11, 10, 9, 0.28);
  border-radius: 4px;
  background: #12100e;
  box-shadow: 0 34px 80px rgba(37, 28, 17, 0.24);
  transition: border-color 0.35s ease, box-shadow 0.45s var(--ease);
}

.video-feature.is-current .video-frame {
  border-color: rgba(135, 51, 68, 0.48);
  box-shadow: 0 36px 90px rgba(37, 28, 17, 0.32), 0 0 0 1px rgba(135, 51, 68, 0.1);
}

.video-frame::before,
.video-frame::after {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-color: rgba(234, 214, 161, 0.55);
  border-style: solid;
  content: "";
  pointer-events: none;
}

.video-frame::before {
  top: 13px;
  left: 13px;
  border-width: 1px 0 0 1px;
}

.video-frame::after {
  right: 13px;
  bottom: 13px;
  border-width: 0 1px 1px 0;
}

.video-frame iframe,
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  overflow: hidden;
  padding: 0;
  background-color: #191511;
  background-position: center;
  background-size: cover;
  color: #fff;
}

.video-poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.72));
  content: "";
}

.video-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent, rgba(8, 7, 6, 0.55));
  transition: background 0.5s ease;
}

.video-poster:hover .video-shade {
  background: radial-gradient(circle at center, rgba(205, 177, 118, 0.06), rgba(8, 7, 6, 0.52));
}

.play-button {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(58px, 6vw, 72px);
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.45);
  backdrop-filter: blur(8px);
  transition: transform 0.5s var(--ease), background 0.35s ease, border-color 0.35s ease;
}

.play-button::before {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(205, 177, 118, 0.35);
  border-radius: inherit;
  content: "";
}

.play-button i {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

.video-poster:hover .play-button {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--gold-bright);
  background: rgba(135, 51, 68, 0.82);
}

.video-poster__copy {
  position: absolute;
  z-index: 4;
  right: 1.25rem;
  bottom: clamp(1.1rem, 2.5vw, 1.7rem);
  left: clamp(1.1rem, 2.5vw, 1.7rem);
  text-align: left;
}

.video-poster__copy small,
.video-poster__copy strong {
  display: block;
}

.video-poster__copy small {
  margin-bottom: 0.4rem;
  color: var(--gold-bright);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.video-poster__copy strong {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.35;
}

.video-feature footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.2rem 0;
  color: #655c50;
  font-size: 0.78rem;
}

.video-feature footer a {
  color: var(--wine);
  font-weight: 700;
}

.video-rail-controls {
  display: grid;
  max-width: 820px;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin: 1rem auto 0;
  color: #655c50;
}

.video-rail-controls > p {
  min-width: 72px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.video-rail-controls > p strong {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 1.08rem;
}

.video-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(11, 10, 9, 0.14);
}

.video-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--wine);
}

.video-arrows {
  display: flex;
  gap: 0.55rem;
}

.video-arrows button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(11, 10, 9, 0.24);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.25s ease, background 0.25s ease;
}

.video-arrows button:hover:not(:disabled),
.video-arrows button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--wine);
  background: rgba(135, 51, 68, 0.08);
}

.video-arrows button:disabled {
  cursor: default;
  opacity: 0.28;
}

.showcase-loading,
.showcase-message {
  display: grid;
  min-height: 260px;
  flex: 0 0 min(82vw, 440px);
  place-content: center;
  justify-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(11, 10, 9, 0.15);
  color: #655c50;
  font-size: 0.82rem;
  text-align: center;
}

.showcase-loading span {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(135, 51, 68, 0.18);
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: buttonSpin 0.8s linear infinite;
}

.showcase-loading--dark,
.showcase-message--dark {
  min-height: 100%;
  border-color: var(--line);
  color: var(--muted);
}

.showcase-loading--dark span {
  border-color: rgba(205, 177, 118, 0.18);
  border-top-color: var(--gold);
}

/* Certificates scrollytelling */
.certificates-section {
  position: relative;
  min-height: 100svh;
  background:
    radial-gradient(circle at 60% 30%, rgba(135, 51, 68, 0.12), transparent 35rem),
    #0d0c0a;
}

.certificates-sticky {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding-top: clamp(6.2rem, 10vh, 8rem);
}

.certificates-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.certificates-heading h2 {
  font-size: clamp(2rem, 3.8vw, 3.8rem);
}

.certificates-guide {
  display: flex;
  width: min(32vw, 300px);
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: right;
}

.certificates-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(205, 177, 118, 0.15);
}

.certificates-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gold);
  will-change: transform;
}

.certificates-viewport {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.certificates-viewport:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: -3px;
}

.certificates-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: stretch;
  gap: clamp(1rem, 2.2vw, 2rem);
  padding: 0.25rem max(24px, calc((100vw - var(--page)) / 2)) 2.2rem;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.certificate-card {
  position: relative;
  flex: 0 0 clamp(300px, 34vw, 455px);
  min-height: 0;
}

.certificate-open {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.5s var(--ease), border-color 0.35s ease, box-shadow 0.5s ease;
}

.certificate-open::after {
  position: absolute;
  inset: 0;
  transform: translateX(-120%) skewX(-15deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
  content: "";
  pointer-events: none;
  transition: transform 0.8s var(--ease);
}

.certificate-open:hover,
.certificate-open:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(234, 214, 161, 0.52);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.certificate-open:hover::after,
.certificate-open:focus-visible::after {
  transform: translateX(120%) skewX(-15deg);
}

.certificate-number {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(11, 10, 9, 0.25);
  border-radius: 50%;
  background: rgba(243, 234, 216, 0.9);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.certificate-image {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 1.8rem);
  background:
    linear-gradient(rgba(243, 234, 216, 0.98), rgba(243, 234, 216, 0.98)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(11, 10, 9, 0.04) 8px 9px);
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.88) contrast(1.04);
  transition: transform 0.65s var(--ease), filter 0.4s ease;
}

.certificate-open:hover .certificate-image img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.02);
}

.certificate-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 1.05rem 1.2rem 1.15rem;
  border-top: 1px solid var(--line);
}

.certificate-meta small {
  grid-column: 1 / -1;
  color: var(--gold);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.certificate-meta strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-meta em {
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
}

.certificate-end {
  display: grid;
  flex: 0 0 clamp(250px, 27vw, 360px);
  place-content: center;
  border: 1px dashed rgba(205, 177, 118, 0.3);
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-align: center;
}

.certificate-end i {
  margin-top: 1.2rem;
  color: var(--wine-bright);
  font-size: 1.2rem;
  font-style: normal;
}

/* Events */
.events-section {
  background: var(--paper);
  color: var(--ink);
}

.events-section .section-label,
.events-section h2 > span {
  color: var(--wine);
}

.events-section .section-heading > p {
  color: #645c51;
}

.events-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(11, 10, 9, 0.2);
}

.events-toolbar p {
  color: #645c51;
  font-size: 0.82rem;
}

.filter-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(11, 10, 9, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #332e27;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
  border-color: var(--wine);
  background: var(--wine);
  color: #fff;
}

.filter-button span {
  font-size: 1rem;
  transition: transform 0.35s var(--ease);
}

.filter-button[aria-pressed="true"] span {
  transform: rotate(45deg);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.events-loading,
.events-empty,
.events-error {
  display: flex;
  min-height: 260px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px dashed rgba(11, 10, 9, 0.2);
  color: #6e6559;
  text-align: center;
}

.events-loading span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wine);
  animation: loadingDot 1s ease-in-out infinite alternate;
}

.events-loading span:nth-child(2) { animation-delay: 0.15s; }
.events-loading span:nth-child(3) { animation-delay: 0.3s; }
.events-loading p { margin-left: 0.5rem; font-size: 0.8rem; }

@keyframes loadingDot { to { transform: translateY(-7px); opacity: 0.35; } }

.event-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid rgba(11, 10, 9, 0.2);
  border-radius: 4px;
  background: #fbf5e9;
  box-shadow: 0 14px 34px rgba(43, 32, 18, 0.08);
  transform: perspective(900px) rotateX(0) rotateY(0) translateY(0);
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s ease;
}

.event-card--enter {
  opacity: 0;
}

.event-card--enter.is-entered {
  opacity: 1;
  transition: opacity 0.65s var(--ease) var(--event-delay, 0ms), transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s ease;
}

.event-card::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 20%), rgba(205, 177, 118, 0.2), transparent 36%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.event-card:hover,
.event-card:focus-within {
  border-color: rgba(135, 51, 68, 0.42);
  box-shadow: 0 28px 70px rgba(43, 32, 18, 0.18);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-7px);
}

.event-card:hover::before,
.event-card:focus-within::before {
  opacity: 1;
}

.event-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #211d18;
}

.event-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 10, 9, 0.48));
  content: "";
}

.event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease), filter 0.4s ease;
}

.event-card:hover .event-media img,
.event-card:focus-within .event-media img {
  transform: scale(1.055);
}

.event-status {
  position: absolute;
  z-index: 2;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(11, 10, 9, 0.72);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  backdrop-filter: blur(8px);
}

.event-card.is-past .event-media img {
  filter: grayscale(0.7) brightness(0.75);
}

.event-card.is-past .event-status {
  color: #c9c1b4;
}

.event-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem;
}

.event-heading-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
}

.event-date-badge {
  display: flex;
  height: 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(135, 51, 68, 0.24);
  background: rgba(135, 51, 68, 0.055);
  color: var(--wine);
  line-height: 1;
}

.event-month {
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.event-day {
  margin-block: 0.28rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 900;
}

.event-year {
  color: #867b6d;
  font-size: 0.53rem;
}

.event-copy h3 {
  color: #1c1915;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.5;
}

.event-title-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.event-title-button:hover,
.event-title-button:focus-visible {
  color: var(--wine);
  text-decoration-color: currentColor;
}

.event-place {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: var(--wine);
  font-size: 0.7rem;
  font-weight: 700;
}

.event-description {
  margin-top: 1rem;
  color: #6a6155;
  font-size: 0.78rem;
  line-height: 1.75;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.event-time {
  color: #50483e;
  font-size: 0.68rem;
  font-weight: 700;
}

.event-action-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.event-detail-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--wine);
  font-family: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  transition: background 0.25s ease, color 0.25s ease;
}

.event-detail-link:hover,
.event-detail-link:focus-visible {
  background: rgba(135, 51, 68, 0.09);
}

.calendar-menu {
  position: relative;
}

.calendar-menu summary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(11, 10, 9, 0.22);
  border-radius: 999px;
  color: #2a251f;
  font-size: 0.67rem;
  font-weight: 700;
  list-style: none;
  transition: background 0.25s ease, color 0.25s ease;
}

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

.calendar-menu summary:hover,
.calendar-menu[open] summary {
  background: var(--ink);
  color: var(--paper);
}

.calendar-options {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  width: 180px;
  overflow: hidden;
  border: 1px solid rgba(11, 10, 9, 0.18);
  border-radius: 3px;
  background: #fffaf0;
  box-shadow: 0 18px 42px rgba(43, 32, 18, 0.2);
}

.calendar-options a,
.calendar-options button {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-bottom: 1px solid rgba(11, 10, 9, 0.1);
  background: transparent;
  color: #29241e;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: left;
}

.calendar-options > :last-child { border-bottom: 0; }
.calendar-options a:hover,
.calendar-options button:hover { background: #eee2cc; }

.events-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  color: #665d51;
  font-family: var(--serif);
}

.events-footer .button {
  min-height: 48px;
  background: var(--ink);
  color: var(--paper);
}

/* Contact */
.contact-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 55%, rgba(135, 51, 68, 0.15), transparent 32rem),
    var(--ink-soft);
}

.contact-section::before {
  position: absolute;
  top: -200px;
  left: -200px;
  width: 520px;
  aspect-ratio: 1;
  border: 1px solid rgba(205, 177, 118, 0.08);
  border-radius: 50%;
  content: "";
}

.contact-heading {
  max-width: 820px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.contact-heading h2 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.8vw, 5.8rem);
  line-height: 1.23;
}

.contact-heading > p {
  max-width: 610px;
  margin-top: 1.4rem;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.contact-form {
  position: relative;
  padding: clamp(1.4rem, 3.2vw, 2.7rem);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.form-field > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  color: var(--paper-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.form-field > label span {
  color: #81786d;
  font-size: 0.58rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select,
.custom-select-trigger,
.date-trigger {
  width: 100%;
  border: 1px solid rgba(225, 206, 163, 0.2);
  border-radius: 2px;
  outline: 0;
  background: rgba(7, 7, 6, 0.52);
  color: var(--text);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.form-field input,
.form-field select,
.custom-select-trigger,
.date-trigger {
  min-height: 54px;
  padding: 0.75rem 0.9rem;
}

.form-field textarea {
  min-height: 150px;
  padding: 0.9rem;
  line-height: 1.7;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #777065;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.custom-select-trigger:focus,
.select-wrap.is-open .custom-select-trigger,
.date-trigger:focus,
.date-trigger[aria-expanded="true"] {
  border-color: var(--gold);
  background: rgba(205, 177, 118, 0.045);
  box-shadow: 0 0 0 3px rgba(205, 177, 118, 0.08);
}

.contact-form.was-validated input:invalid,
.contact-form.was-validated textarea:invalid {
  border-color: var(--wine-bright);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  padding-right: 2.5rem;
  appearance: none;
}

.select-wrap select option,
.calendar-selects select option {
  background: #171512;
  color: #f3eee5;
}

.select-wrap > span {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-55%);
  color: var(--gold);
  pointer-events: none;
}

.select-wrap.is-enhanced > select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  text-align: left;
}

.custom-select-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger > i {
  color: var(--gold);
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.select-wrap.is-open .custom-select-trigger > i {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(330px, 52vh);
  padding: 0.45rem;
  overflow-y: auto;
  transform: translateY(-9px) scale(0.975);
  transform-origin: top right;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #1a1713;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0.2s ease;
}

.select-wrap.is-open .custom-select-menu {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.custom-select-option {
  display: grid;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  transform: translateY(-5px);
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #f3eee5;
  font-size: 0.82rem;
  text-align: left;
  opacity: 0;
  transition: color 0.2s ease, background 0.2s ease, transform 0.28s var(--ease), opacity 0.22s ease;
  transition-delay: 0s, 0s, calc(var(--option-index, 0) * 28ms), calc(var(--option-index, 0) * 28ms);
}

.select-wrap.is-open .custom-select-option {
  transform: translateY(0);
  opacity: 1;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: rgba(205, 177, 118, 0.13);
  color: #fffaf0;
  outline-offset: -2px;
}

.custom-select-option[aria-selected="true"] {
  background: var(--gold-bright);
  color: var(--ink);
  font-weight: 700;
}

.custom-select-option i {
  font-style: normal;
  opacity: 0;
}

.custom-select-option[aria-selected="true"] i {
  opacity: 1;
}

.date-trigger {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  text-align: left;
}

.date-trigger > i {
  color: var(--gold);
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.date-trigger[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.date-icon {
  position: relative;
  width: 17px;
  height: 16px;
  border: 1px solid var(--gold);
  border-radius: 2px;
}

.date-icon::before {
  position: absolute;
  top: 3px;
  right: -1px;
  left: -1px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.date-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% - 0.85rem);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #1a1713;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.975);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0.2s ease;
}

.date-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.calendar-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.calendar-header > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.calendar-header > button:hover {
  border-color: var(--gold);
  background: rgba(205, 177, 118, 0.08);
}

.calendar-header > button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.calendar-selects {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.calendar-selects select {
  min-height: 38px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #11100e;
  color: var(--paper);
  font-size: 0.75rem;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-weekdays {
  margin-bottom: 0.3rem;
  color: #8d8579;
  font-size: 0.62rem;
  text-align: center;
}

.calendar-grid > span,
.calendar-day {
  aspect-ratio: 1;
}

.calendar-day {
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--paper-deep);
  font-size: 0.72rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.date-popover.is-open .calendar-day {
  animation: calendarDayIn 0.34s var(--ease) both;
  animation-delay: calc(var(--day-index, 0) * 9ms);
}

@keyframes calendarDayIn {
  from { opacity: 0; transform: translateY(5px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.calendar-day:hover:not(:disabled),
.calendar-day:focus-visible {
  border-color: var(--gold);
  background: rgba(205, 177, 118, 0.1);
}

.calendar-day.is-today {
  border-color: rgba(205, 177, 118, 0.42);
}

.calendar-day[aria-selected="true"] {
  background: var(--gold-bright);
  color: var(--ink);
  font-weight: 800;
}

.calendar-day:disabled {
  cursor: not-allowed;
  color: #575149;
  opacity: 0.6;
}

.calendar-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.calendar-actions button {
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
}

.calendar-actions button:hover { color: var(--paper); }

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

.form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
}

.form-submit > p {
  max-width: 430px;
  color: var(--muted);
  font-size: clamp(0.82rem, 1vw, 0.9rem);
  line-height: 1.7;
}

.submit-button {
  min-width: 148px;
}

.submit-button.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.submit-button.is-loading i {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(11, 10, 9, 0.28);
  border-top-color: var(--ink);
  border-radius: 50%;
  font-size: 0;
  animation: buttonSpin 0.8s linear infinite;
}

@keyframes buttonSpin { to { transform: rotate(360deg); } }

.direct-contact {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(205, 177, 118, 0.07), rgba(255, 255, 255, 0.015));
}

.direct-contact__head > span {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.direct-contact__head h3 {
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 1.8rem;
}

.direct-contact__head p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.contact-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.contact-action {
  position: relative;
  display: grid;
  min-height: 94px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(7, 7, 6, 0.36);
  transition: transform 0.4s var(--ease), border-color 0.3s ease, background 0.3s ease;
}

.contact-action::before {
  position: absolute;
  inset: 0;
  transform: translateX(-102%);
  background: linear-gradient(90deg, rgba(205, 177, 118, 0.11), transparent);
  content: "";
  transition: transform 0.55s var(--ease);
}

.contact-action:hover,
.contact-action:focus-visible {
  transform: translateX(5px);
  border-color: rgba(234, 214, 161, 0.48);
  background: rgba(205, 177, 118, 0.05);
}

.contact-action:hover::before,
.contact-action:focus-visible::before {
  transform: translateX(0);
}

.contact-action > * {
  position: relative;
  z-index: 1;
}

.contact-action__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 900;
}

.contact-action__icon--phone {
  font-family: var(--sans);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
}

.contact-action small,
.contact-action strong,
.contact-action em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-action small {
  color: var(--gold);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.contact-action strong {
  margin-top: 0.12rem;
  font-family: var(--serif);
  font-size: 0.88rem;
}

.contact-action em {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-style: normal;
}

.contact-action > i {
  color: var(--gold);
  font-style: normal;
  transition: transform 0.35s var(--ease);
}

.contact-action:hover > i { transform: translate(3px, -3px); }

.social-block {
  margin-top: 1.7rem;
}

.social-block > p {
  margin-bottom: 0.65rem;
  color: #80786d;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-deep);
  font-size: 0.62rem;
  font-weight: 600;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.social-links a span {
  color: var(--gold);
  font-size: 0.54rem;
  font-weight: 800;
}

.social-links a i { color: var(--gold); font-style: normal; }

.social-links a:hover {
  border-color: var(--gold);
  background: var(--gold-bright);
  color: var(--ink);
}

.social-links a:hover span,
.social-links a:hover i { color: var(--wine); }

.spotify-card {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.spotify-card > p {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.spotify-card > p span { color: var(--gold); }

.spotify-card iframe {
  display: block;
  border: 0;
  border-radius: 10px;
}

/* Dialogs */
dialog {
  color: inherit;
}

dialog::backdrop {
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(8px);
}

body.dialog-lock {
  overflow: hidden;
}

.event-dialog {
  width: min(calc(100% - 24px), 960px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #141210;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
  color: var(--text);
}

.event-dialog[open] {
  animation: dialogFadeIn 0.3s ease;
}

.event-dialog[open] .event-dialog__panel {
  animation: dialogIn 0.42s var(--ease);
}

.event-dialog.is-fallback-open {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  width: 100%;
  max-height: none;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(5, 5, 5, 0.9);
}

.event-dialog.is-fallback-open .event-dialog__panel {
  width: min(100%, 960px);
}

.event-dialog > .dialog-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  background: rgba(11, 10, 9, 0.72);
}

.event-dialog__panel {
  display: grid;
  max-height: calc(100dvh - 26px);
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(205, 177, 118, 0.07), transparent 34%),
    #171512;
}

.event-dialog__media {
  position: relative;
  min-height: min(520px, calc(100dvh - 26px));
  overflow: hidden;
  background: #0b0a09;
}

.event-dialog__media::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 55%, rgba(0, 0, 0, 0.5)),
    linear-gradient(90deg, transparent 80%, rgba(20, 18, 16, 0.32));
}

.event-dialog__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-dialog__status {
  position: absolute;
  z-index: 1;
  bottom: 1rem;
  left: 1rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(11, 10, 9, 0.76);
  color: var(--paper);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.event-dialog__body {
  padding: clamp(2rem, 4.6vw, 3.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.event-dialog__eyebrow {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.event-dialog__body h2 {
  margin-top: 0.35rem;
  padding-right: 2.5rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.3;
}

.event-dialog__description {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
  white-space: pre-line;
}

.event-dialog__facts {
  display: grid;
  margin-top: 1.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.event-dialog__facts > div {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.event-dialog__facts dt {
  color: var(--gold);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.event-dialog__facts dd {
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 0.74rem;
  line-height: 1.55;
}

.event-dialog__facts a[href] {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-color: rgba(234, 214, 161, 0.45);
  text-underline-offset: 0.2em;
}

.event-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.event-dialog__actions .button {
  min-height: 46px;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  font-size: 0.74rem;
}

.event-dialog__offer,
.event-dialog__dismiss {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--paper);
}

.event-dialog__offer:hover,
.event-dialog__offer:focus-visible,
.event-dialog__dismiss:hover,
.event-dialog__dismiss:focus-visible {
  border-color: var(--gold);
  background: rgba(205, 177, 118, 0.08);
}

.event-dialog__offer[hidden] {
  display: none;
}

.image-dialog {
  width: min(94vw, 920px);
  max-width: none;
  max-height: 92dvh;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.image-dialog[open] { animation: dialogFadeIn 0.35s ease; }

.image-dialog[open] .image-dialog__inner {
  animation: dialogIn 0.45s var(--ease);
}

.image-dialog__inner {
  display: grid;
  max-height: 90dvh;
  place-items: center;
  gap: 0.75rem;
}

.image-dialog img {
  max-width: 100%;
  max-height: calc(90dvh - 60px);
  object-fit: contain;
  border: clamp(6px, 1vw, 12px) solid var(--paper);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.image-dialog p {
  color: var(--paper-deep);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.dialog-close {
  position: fixed;
  z-index: 2;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s var(--ease), background 0.3s ease;
}

.dialog-close:hover {
  transform: rotate(90deg);
  background: var(--wine);
}

.feedback-dialog {
  width: min(calc(100% - 32px), 470px);
  padding: clamp(1.8rem, 5vw, 3rem);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #171512;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.62);
  color: var(--text);
  text-align: center;
}

.feedback-dialog[open] {
  animation: dialogIn 0.4s var(--ease);
}

.feedback-dialog__icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 1.2rem;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-bright);
  font-size: 1.4rem;
}

.feedback-dialog.is-error .feedback-dialog__icon {
  border-color: var(--wine-bright);
  color: var(--wine-bright);
}

.feedback-dialog__eyebrow {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.feedback-dialog h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
}

.feedback-dialog > p:not(.feedback-dialog__eyebrow) {
  margin: 0.8rem auto 1.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080807;
}

.footer-inner {
  display: grid;
  min-height: 120px;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  color: #776f65;
  font-size: 0.64rem;
}

.footer-inner > p:last-child { text-align: right; }

.footer-brand {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.footer-brand small {
  margin-left: 0.4rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.48rem;
  letter-spacing: 0.15em;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    gap: 2.5rem;
  }

  .hero-art { min-height: 500px; }
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-layout { grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); }
}

@media (max-width: 900px) {
  :root { --section-space: clamp(4.5rem, 11vw, 7rem); }

  .site-nav { top: max(10px, env(safe-area-inset-top)); }

  .nav-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    width: 46px;
    height: 46px;
    place-content: center;
    gap: 7px;
    border: 0;
    background: transparent;
  }

  .nav-toggle > span:not(.sr-only) {
    display: block;
    width: 23px;
    height: 1px;
    background: var(--paper);
    transition: transform 0.3s var(--ease);
  }

  .nav-toggle[aria-expanded="true"] > span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    z-index: 1;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(310px, calc(100vw - 32px));
    padding: 0.7rem;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(12, 11, 9, 0.97);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0.25s ease;
  }

  .nav-links.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a { padding-inline: 0.9rem; }
  .nav-links a:not(.nav-cta)::after { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 9rem;
    text-align: center;
  }

  .eyebrow,
  .hero-actions,
  .hero-facts { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero-art { min-height: 480px; }
  .hero-paper { width: min(64vw, 390px); }
  .scroll-cue { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about-visual { max-width: 470px; margin-inline: auto; }
  .resume-grid { grid-template-columns: 1fr; }
  .resume-card--specialties { grid-column: auto; }
  .specialty-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specialty-list li:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .specialty-list li:nth-child(4) { border-top: 1px solid var(--line); }

  .contact-layout { grid-template-columns: 1fr; }
  .direct-contact { max-width: none; }
}

@media (max-width: 767px) {
  .certificates-section {
    height: auto !important;
    min-height: 0;
    padding-block: var(--section-space);
  }

  .certificates-sticky {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-top: 0;
  }

  .certificates-heading {
    display: block;
    margin-bottom: 2rem;
  }

  .certificates-guide {
    width: auto;
    margin-top: 1rem;
    text-align: left;
  }

  .certificates-guide [data-certificate-hint]::after { content: ""; }
  .certificates-progress { width: 120px; }

  .certificates-viewport {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .certificates-viewport::-webkit-scrollbar { display: none; }

  .certificates-track {
    height: clamp(520px, 75svh, 660px);
    gap: 1rem;
    padding-inline: 24px;
    transform: none !important;
  }

  .certificates-track::after {
    flex: 0 0 max(18vw, calc((100vw - 300px) / 2));
    content: "";
  }

  .certificate-card {
    flex-basis: min(84vw, 390px);
    scroll-snap-align: center;
  }

  .certificate-end {
    flex-basis: min(64vw, 300px);
    scroll-snap-align: center;
  }
}

@media (max-width: 680px) {
  .page-shell { width: min(calc(100% - 32px), var(--page)); }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 1rem; }

  .hero-grid { padding-bottom: 4.5rem; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.5rem); }
  .hero-actions { flex-direction: column; gap: 0.8rem; }
  .hero-actions .button { width: min(100%, 310px); }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-facts div { min-width: 0; padding: 1rem 0.6rem 0; }
  .hero-facts div + div { padding-left: 0.6rem; }
  .hero-facts dt { font-size: 0.9rem; }
  .hero-facts dd { font-size: 0.82rem; }
  .hero-art { min-height: 400px; }
  .hero-paper { width: min(72vw, 330px); }
  .orbit--one { width: min(96vw, 470px); }

  .about-copy blockquote { align-items: flex-start; flex-direction: column; }
  .profile-list li { grid-template-columns: 80px 1fr; gap: 0.8rem; }
  .profile-list strong { font-size: 0.82rem; }

  .teaching-list { grid-template-columns: 1fr; }
  .specialty-list { grid-template-columns: 1fr; }
  .specialty-list li { min-height: 0; border-top: 1px solid var(--line); border-left: 0; }
  .specialty-list li:first-child { border-top: 0; }

  .video-feature { flex-basis: min(72vw, 330px); }
  .video-frame { border-radius: 3px; }
  .video-frame::before,
  .video-frame::after { width: 40px; height: 40px; }
  .video-poster__copy { bottom: 1.2rem; left: 1.2rem; }
  .video-feature footer { flex-direction: column; gap: 0.3rem; }
  .video-rail-controls {
    grid-template-columns: auto minmax(60px, 1fr) auto;
    gap: 0.8rem;
  }

  .events-toolbar { align-items: flex-start; flex-direction: column; }
  .events-grid { grid-template-columns: 1fr; }
  .event-card:hover,
  .event-card:focus-within { transform: translateY(-4px); }
  .events-footer { align-items: stretch; flex-direction: column; text-align: center; }

  .event-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .event-dialog__panel {
    display: block;
    max-height: calc(100dvh - 22px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .event-dialog__media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .event-dialog__body {
    padding: 1.35rem;
    overflow: visible;
  }

  .event-dialog__facts {
    grid-template-columns: 1fr;
  }

  .event-dialog__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .event-dialog__actions .button {
    width: 100%;
  }

  .contact-heading h2 { font-size: clamp(2.2rem, 11vw, 3.6rem); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-submit { align-items: stretch; flex-direction: column; }
  .form-submit .button { width: 100%; }
  .date-popover { right: auto; left: 0; transform-origin: top left; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-block: 2rem;
    text-align: center;
  }
  .footer-inner > p:last-child { text-align: center; }
}

@media (max-width: 767px) and (max-height: 599px) {
  .certificates-track {
    height: 430px;
  }
}

@media (min-width: 768px) and (max-height: 599px) {
  .certificates-sticky { padding-top: 1.4rem; }
  .certificates-heading { margin-bottom: 0.7rem; }
  .certificates-heading h2 { font-size: clamp(1.65rem, 4.8vh, 2.5rem); }
  .certificates-guide { gap: 0.35rem; padding-bottom: 0; }
  .certificates-track { padding-bottom: 1rem; }
  .certificate-meta { padding: 0.7rem 0.9rem 0.8rem; }
}

@media (max-width: 420px) {
  .nav-brand__mark { width: 38px; height: 38px; }
  .nav-brand { font-size: 0.82rem; }
  .intro-wordmark { letter-spacing: 0.2em; }
  .hero-facts { margin-top: 2.5rem; }
  .certificate-meta { grid-template-columns: 1fr; }
  .certificate-meta em { display: none; }
  .certificates-track { height: 570px; }
  .contact-form,
  .direct-contact { padding: 1.15rem; }
  .contact-action { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 0.75rem; }
  .contact-action__icon { width: 40px; height: 40px; }
  .calendar-grid { gap: 0.12rem; }
  .event-dialog__body { padding: 1.1rem; }
  .event-dialog__facts > div { padding: 0.8rem; }
}

@media (hover: none) {
  .event-card:active,
  .certificate-open:active,
  .contact-action:active {
    transform: scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal.reveal-ready,
  .js [data-stagger-group].reveal-ready .stagger-item {
    opacity: 1;
    transform: none;
  }

  .site-intro { display: none !important; }
}
