:root {
  --ivory: #f7f1df;
  --paper: #fffaf0;
  --ink: #28180d;
  --coffee: #6f3d12;
  --gold: #c8953f;
  --deep-green: #1d3d32;
  --muted-green: #496b55;
  --button-bg: #3a2415;
  --button-bg-hover: #4b2d19;
  --shadow: rgba(40, 24, 13, 0.2);
  --soft-shadow: rgba(40, 24, 13, 0.12);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 20% 8%, rgba(200, 149, 63, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(29, 61, 50, 0.1), transparent 26rem),
    linear-gradient(180deg, #f6f0df 0%, #fff9ed 42%, #f3ead7 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  z-index: -1;
}

button {
  font: inherit;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
  color: var(--paper);
  background:
    linear-gradient(rgba(43, 26, 16, 0.78), rgba(43, 26, 16, 0.84)),
    url("../images/ornament-band.png") bottom center / min(760px, 112vw) auto no-repeat,
    var(--ink);
  transition: opacity 600ms ease, visibility 600ms ease;
}

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

.intro-mark {
  width: min(180px, 42vw);
  aspect-ratio: 1;
  border: 1px solid rgba(247, 241, 223, 0.32);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(200, 149, 63, 0.28), transparent 58%),
    url("../images/ornament-border.png") center / contain no-repeat;
  filter: sepia(0.22) saturate(1.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.intro-kicker,
.eyebrow,
.info-label,
.supervisor span {
  margin: 0;
  color: var(--gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.72rem, 1.2vw, 0.84rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-overlay h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-name {
  margin: 0;
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.open-button,
.music-button {
  border: 1px solid rgba(200, 149, 63, 0.68);
  color: var(--paper);
  background: var(--button-bg);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.open-button:hover,
.music-button:hover {
  border-color: rgba(247, 210, 140, 0.84);
  background: var(--button-bg-hover);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.open-button:focus-visible,
.music-button:focus-visible {
  outline: 2px solid rgba(247, 210, 140, 0.9);
  outline-offset: 4px;
}

.open-button:active,
.music-button:active {
  transform: translateY(1px);
}

.open-button {
  min-width: 190px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-button {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.music-button.is-playing .music-icon {
  color: #f9d28c;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

.side-ornament {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(270px, 24vw);
  pointer-events: none;
  opacity: 0.38;
  background: none;
  filter: sepia(0.18) saturate(1.05);
  z-index: 0;
}

.side-ornament::before,
.side-ornament::after {
  content: "";
  position: absolute;
  width: min(270px, 24vw);
  aspect-ratio: 1;
  background: url("../images/ornament-border.png") center / contain no-repeat;
}

.side-ornament::before {
  top: clamp(76px, 11vh, 138px);
}

.side-ornament::after {
  bottom: clamp(40px, 8vh, 104px);
}

.side-left {
  left: clamp(-96px, -7vw, -46px);
}

.side-left::before,
.side-left::after {
  left: 0;
}

.side-left::after {
  transform: scaleY(-1);
  transform-origin: center;
}

.side-right {
  right: clamp(-96px, -7vw, -46px);
}

.side-right::before,
.side-right::after {
  right: 0;
}

.side-right::before {
  transform: scaleX(-1);
  transform-origin: center;
}

.side-right::after {
  transform: scale(-1, -1);
  transform-origin: center;
}

.section-panel {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  min-height: 100vh;
  padding: clamp(84px, 12vh, 132px) clamp(20px, 5vw, 72px) clamp(64px, 8vh, 96px);
}

.hero-content,
.section-inner {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: clamp(28px, 6vw, 76px);
}

.hero-copy {
  padding-bottom: clamp(8px, 5vh, 54px);
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 20px;
  color: var(--ink);
  font-size: clamp(2.55rem, 7vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-lead {
  max-width: 590px;
  margin: 0;
  color: rgba(40, 24, 13, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-details span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(111, 61, 18, 0.22);
  border-radius: 999px;
  color: var(--deep-green);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(255, 250, 240, 0.7);
  box-shadow: 0 8px 22px var(--soft-shadow);
}

.portrait-wrap {
  position: relative;
  justify-self: center;
  width: min(340px, 78vw);
  margin: 0;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 12% 7% 4%;
  border-radius: 999px 999px 42px 42px;
  background: linear-gradient(180deg, rgba(200, 149, 63, 0.34), rgba(29, 61, 50, 0.22));
  filter: blur(18px);
  transform: translateY(18px);
  z-index: -1;
}

.portrait-wrap img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 28px rgba(40, 24, 13, 0.26));
}

.ornament-band {
  position: absolute;
  left: 50%;
  width: min(1180px, 116vw);
  height: clamp(120px, 20vw, 230px);
  pointer-events: none;
  background: url("../images/ornament-band.png") center bottom / contain no-repeat;
  opacity: 0.74;
  transform: translateX(-50%);
  z-index: -1;
}

.ornament-top {
  top: -28px;
  transform: translateX(-50%) rotate(180deg);
}

.ornament-bottom {
  bottom: -10px;
}

.identity,
.schedule,
.location,
.supervisors,
.closing {
  padding: clamp(68px, 12vh, 120px) clamp(20px, 5vw, 72px);
}

.section-inner {
  position: relative;
  padding-inline: clamp(0px, 3vw, 36px);
}

.identity .section-inner {
  max-width: 900px;
  text-align: center;
}

.identity h2 {
  margin: 14px 0 4px;
  color: var(--deep-green);
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.student-id {
  margin: 0 0 28px;
  color: var(--coffee);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topic {
  max-width: 880px;
  margin: 0 auto;
  color: rgba(40, 24, 13, 0.86);
  font-size: clamp(1.25rem, 2.9vw, 2.18rem);
  line-height: 1.45;
  text-wrap: balance;
}

.info-grid,
.supervisor-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.info-item,
.supervisor {
  min-height: 150px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(111, 61, 18, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.86), rgba(247, 241, 223, 0.72)),
    rgba(255, 250, 240, 0.8);
  box-shadow: 0 18px 42px var(--soft-shadow);
}

.info-item strong,
.supervisor strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.supervisor-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.location .section-inner {
  max-width: 980px;
}

.location-title {
  max-width: 780px;
  margin: 14px 0 10px;
  color: var(--deep-green);
  font-size: clamp(1.9rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.location-copy {
  max-width: 560px;
  margin: 0 0 24px;
  color: rgba(40, 24, 13, 0.78);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(111, 61, 18, 0.24);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 18px 42px var(--soft-shadow);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid rgba(111, 61, 18, 0.28);
  border-radius: 999px;
  color: var(--deep-green);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  background: rgba(255, 250, 240, 0.74);
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.map-link:hover,
.map-link:focus-visible {
  border-color: rgba(200, 149, 63, 0.7);
  color: var(--coffee);
  background: rgba(255, 250, 240, 0.92);
}

.closing {
  min-height: 72vh;
  display: grid;
  align-items: center;
  padding-bottom: clamp(150px, 23vw, 260px);
  text-align: center;
}

.closing-text {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(40, 24, 13, 0.84);
  font-size: clamp(1.32rem, 3vw, 2.2rem);
  line-height: 1.48;
  text-wrap: balance;
}

.signature {
  margin: 32px 0 0;
  color: var(--deep-green);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
}

.reveal {
  will-change: transform, opacity;
}

@media (max-width: 840px) {
  .hero {
    min-height: auto;
    padding-top: 104px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: center;
    text-align: center;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-details {
    justify-content: center;
  }

  .portrait-wrap {
    order: -1;
    width: min(250px, 68vw);
  }

  .side-ornament {
    width: 150px;
    opacity: 0.22;
  }

  .side-ornament::before,
  .side-ornament::after {
    width: 150px;
  }

  .side-left {
    left: -82px;
  }

  .side-right {
    right: -82px;
  }

  .info-grid,
  .supervisor-list {
    grid-template-columns: 1fr;
  }

  .info-item,
  .supervisor {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .intro-overlay {
    gap: 14px;
    padding: 22px;
  }

  .music-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .music-button {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .hero-details span {
    width: 100%;
    justify-content: center;
    border-radius: 8px;
  }

  .identity,
  .schedule,
  .location,
  .supervisors,
  .closing {
    padding-inline: 18px;
  }

  .map-frame {
    aspect-ratio: 4 / 3;
  }

  .ornament-band {
    width: 116vw;
    opacity: 0.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
