:root {
  --paper: #f3ead7;
  --paper-2: #e7dcc4;
  --ink: #142018;
  --ink-soft: #3c4a40;
  --deep: #0c1f16;
  --forest: #1b5a36;
  --moss: #2f7a4a;
  --gold: #d4a017;
  --gold-2: #f0d36a;
  --merah: #c81e24;
  --biru: #1d6cb5;
  --kuning: #e3bc14;
  --hijau: #2b8a3c;
  --cream: #fff8ea;
  --line: rgba(20, 32, 24, 0.12);
  --shadow: 0 18px 50px rgba(12, 31, 22, 0.18);
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Lexend", "Segoe UI", sans-serif;
  --radius: 22px;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(4.6rem + env(safe-area-inset-top, 0px));
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(227, 188, 20, 0.14), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(29, 108, 181, 0.08), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-weight: 420;
  line-height: 1.55;
  letter-spacing: -0.011em;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--gold);
  color: var(--deep);
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.page-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid transparent;
  color: var(--cream);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body.is-scrolled .site-header {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
  color: var(--ink);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 44px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

body.is-scrolled .brand img {
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45))
    drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.brand-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 560;
}

body.is-scrolled .brand-kicker {
  color: var(--ink-soft);
}

.brand-name {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.header-nav {
  display: flex;
  gap: 1.15rem;
  margin-left: auto;
}

.header-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 560;
  color: rgba(255, 248, 234, 0.82);
  position: relative;
}

body.is-scrolled .header-nav a {
  color: var(--ink-soft);
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  background: linear-gradient(90deg, var(--merah), var(--biru), var(--kuning), var(--hijau));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

.header-date {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 248, 234, 0.8);
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 248, 234, 0.22);
  background: rgba(12, 31, 22, 0.28);
}

body.is-scrolled .header-date {
  color: var(--ink-soft);
  border-color: var(--line);
  background: color-mix(in srgb, var(--cream) 70%, transparent);
}

/* Hero */

.hero {
  position: relative;
  min-height: 100dvh;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8, 18, 12, 0.62) 0%, transparent 22%),
    linear-gradient(105deg, rgba(8, 20, 14, 0.88) 8%, rgba(8, 20, 14, 0.55) 48%, rgba(12, 31, 22, 0.35) 100%),
    linear-gradient(to top, rgba(8, 18, 12, 0.7), transparent 38%);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 7.6rem 1.25rem 5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 560;
  color: var(--gold-2);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(212, 160, 23, 0.2);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.6rem, 6vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(90deg, var(--gold-2), #fff3c2 45%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 40rem;
  margin: 1.15rem 0 1.6rem;
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--cream) 82%, #9ad0a8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(180deg, #f3d56a, var(--gold));
  color: var(--deep);
  box-shadow: 0 10px 24px rgba(212, 160, 23, 0.28);
}

.btn-ghost {
  border-color: rgba(255, 248, 234, 0.35);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 2.2rem 0 0;
}

.hero-meta div {
  border-top: 1px solid rgba(255, 248, 234, 0.18);
  padding-top: 0.7rem;
}

.hero-meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 248, 234, 0.55);
}

.hero-meta dd {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 650;
}

.hero-crest {
  justify-self: center;
  text-align: center;
}

.crest-ring {
  width: min(340px, 78vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(12, 22, 16, 0.2), rgba(12, 22, 16, 0.55) 62%),
    conic-gradient(
      from 200deg,
      var(--merah) 0 90deg,
      var(--biru) 90deg 180deg,
      var(--kuning) 180deg 270deg,
      var(--hijau) 270deg 360deg
    );
  padding: 11px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.crest-ring img {
  width: 74%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
}

.crest-caption {
  margin: 0.85rem 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 248, 234, 0.7);
}

.house-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  height: 10px;
  z-index: 1;
}

.house.merah { background: var(--merah); }
.house.biru { background: var(--biru); }
.house.kuning { background: var(--kuning); }
.house.hijau { background: var(--hijau); }

.role-section,
.directory,
.campus-band,
.site-footer {
  scroll-margin-top: calc(4.6rem + env(safe-area-inset-top, 0px));
}

/* Sections */

.role-section,
.directory {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.2rem 1.25rem 1.5rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.8rem;
}

.section-head.tight {
  margin-bottom: 0;
}

.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 700;
}

.section-head h2,
.site-footer h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-head p {
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.role-card {
  appearance: none;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.05rem 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--forest) 35%, var(--line));
}

.role-card.is-active {
  background: var(--deep);
  color: var(--cream);
  border-color: var(--deep);
  box-shadow: var(--shadow);
}

.role-icon {
  width: 38px;
  height: 38px;
  color: var(--forest);
}

.role-card.is-active .role-icon {
  color: var(--gold-2);
}

.role-name {
  font-weight: 700;
  font-size: 1rem;
}

.role-hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.role-card.is-active .role-hint {
  color: rgba(255, 248, 234, 0.62);
}

/* Toolbar */

.directory-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.3rem;
}

.search-form {
  width: min(420px, 100%);
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
  flex: none;
}

.search-shell input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 1rem;
}

.search-kbd {
  font-family: var(--sans);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  color: var(--ink-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 560;
}

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

/* Cards */

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

.door {
  --accent: var(--forest);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 28px rgba(20, 32, 24, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.door:hover {
  transform: translateY(-7px);
  border-color: var(--accent);
  box-shadow: 0 22px 44px rgba(20, 32, 24, 0.16);
}

.door.featured {
  grid-column: span 2;
  min-height: 320px;
  color: var(--cream);
  background: var(--deep);
  border-color: transparent;
}

.door-photo {
  position: absolute;
  inset: 0;
  background: url("../assets/kampus.jpg") center/cover;
  transform: scale(1.02);
  transition: transform 0.7s ease;
}

.door.featured:hover .door-photo {
  transform: scale(1.08);
}

.door-lintel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.48rem 0.85rem 0.48rem 1rem;
  background: var(--accent);
  color: #fff8ea;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.door.featured .door-lintel {
  background: rgba(8, 16, 12, 0.72);
  color: var(--gold-2);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.door-kicker {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.door-lintel-end {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

.door-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.door-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.door-icon.is-plain {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  width: 34px;
  height: 34px;
}

.door.featured .door-icon.is-plain {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.door-index {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.door-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.15rem 1.05rem 1.2rem;
  box-shadow: inset 4px 0 0 var(--accent);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 31px,
    rgba(29, 108, 181, 0.04) 31px 32px
  );
}

.door.featured .door-body {
  justify-content: flex-end;
  box-shadow: none;
  background-image: linear-gradient(
    to top,
    rgba(8, 16, 12, 0.88) 0%,
    rgba(8, 16, 12, 0.45) 48%,
    transparent 100%
  );
  padding-top: 3.5rem;
}

.door h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.62rem;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.door:not(.featured) h3 {
  background: var(--cream);
  box-shadow: -6px 0 0 var(--cream), 10px 0 0 var(--cream);
  width: fit-content;
  max-width: 100%;
}

.door-desc {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.door.featured .door-desc {
  color: rgba(255, 248, 234, 0.88);
  max-width: 36rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.95rem;
}

.door:not(.featured) .tag-row {
  margin-top: auto;
  padding-top: 1.1rem;
}

.tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.door.featured .tag {
  border-color: rgba(255, 248, 234, 0.28);
  color: var(--cream);
  background: rgba(255, 248, 234, 0.08);
}

.door-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.75rem;
  padding-top: 0;
}

.domain {
  min-width: 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.door.featured .domain {
  color: rgba(255, 248, 234, 0.7);
}

.open-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8ea;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.open-label svg {
  width: 14px;
  height: 14px;
}

.door.featured .open-label {
  background: var(--gold);
  color: var(--deep);
}

.door:hover .open-label {
  transform: translateX(3px);
}

.empty-state {
  text-align: center;
  padding: 2.4rem 1rem;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  border: 1px dashed color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--cream) 55%, transparent);
}

/* Campus band */

.campus-band {
  position: relative;
  margin-top: 3.5rem;
  height: 280px;
  overflow: hidden;
}

.campus-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: saturate(1.05);
}

.campus-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.4rem 1.25rem 1.1rem;
  color: white;
  background: linear-gradient(to top, rgba(8, 16, 12, 0.72), transparent);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.campus-caption p {
  margin: 0;
}

.campus-caption p:first-child {
  font-family: var(--display);
  font-size: 1.35rem;
}

.campus-caption p:last-child {
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Footer */

.site-footer {
  background: var(--deep);
  color: var(--cream);
  padding: 3rem 1.25rem 1.4rem;
  padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

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

.footer-brand img {
  width: 72px;
  height: auto;
}

.footer-kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold-2);
}

.footer-name {
  margin: 0.15rem 0;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.95;
}

.footer-motto {
  margin: 0;
  color: rgba(255, 248, 234, 0.7);
}

.site-footer h2 {
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  color: rgba(255, 248, 234, 0.78);
  font-size: 0.92rem;
}

.footer-list a {
  color: var(--gold-2);
}

.footer-base {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 248, 234, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 248, 234, 0.55);
}

.footer-base a {
  color: var(--gold-2);
}

.noscript {
  padding: 1rem;
  background: var(--kuning);
  color: var(--deep);
  font-weight: 560;
}

/* Motion */

.door,
.role-card {
  animation: rise 0.55s ease both;
}

.door:nth-child(1) { animation-delay: 0.02s; }
.door:nth-child(2) { animation-delay: 0.06s; }
.door:nth-child(3) { animation-delay: 0.1s; }
.door:nth-child(4) { animation-delay: 0.14s; }
.door:nth-child(5) { animation-delay: 0.18s; }
.door:nth-child(6) { animation-delay: 0.22s; }
.door:nth-child(7) { animation-delay: 0.26s; }
.door:nth-child(8) { animation-delay: 0.3s; }
.door:nth-child(9) { animation-delay: 0.34s; }

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Responsive */

@media (max-width: 980px) {
  .hero-inner,
  .footer-inner,
  .card-grid,
  .role-grid {
    grid-template-columns: 1fr 1fr;
  }

  .door.featured {
    grid-column: span 2;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr;
  }

  .header-nav {
    display: none;
  }

  .directory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding: 0.5rem 1rem;
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
    gap: 0.7rem;
  }

  .brand img {
    width: 36px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-kicker {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .header-date {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .card-grid,
  .footer-inner,
  .footer-base {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: calc(4.6rem + env(safe-area-inset-top, 0px)) 1rem 1.6rem;
    gap: 1.1rem;
  }

  .eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    max-width: 100%;
    white-space: normal;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.55rem);
  }

  .lede {
    margin: 0.85rem 0 1.15rem;
    font-size: 0.92rem;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.55rem;
  }

  .hero-actions .btn {
    flex: 1;
    width: auto;
    min-height: 44px;
    padding: 0.65rem 0.5rem;
    font-size: 0.78rem;
    text-align: center;
    white-space: nowrap;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 1.3rem;
  }

  .hero-meta dd {
    font-size: 0.95rem;
  }

  .crest-ring {
    width: min(148px, 42vw);
    padding: 7px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  .crest-caption {
    margin-top: 0.5rem;
    font-size: 0.62rem;
  }

  .role-section,
  .directory {
    padding: 2.4rem 1rem 1.2rem;
  }

  .section-head h2 {
    font-size: 1.7rem;
  }

  .role-grid {
    grid-template-columns: 1fr 1fr;
  }

  .role-grid .role-card:first-child {
    grid-column: span 2;
  }

  .role-card {
    min-height: 96px;
    padding: 0.85rem 0.75rem 0.8rem;
  }

  .chip {
    min-height: 40px;
  }

  .door.featured {
    grid-column: span 1;
    min-height: 0;
  }

  .door h3 {
    font-size: 1.32rem;
  }

  .door-lintel {
    gap: 0.45rem;
    padding: 0.42rem 0.7rem;
  }

  .door-kicker {
    letter-spacing: 0.08em;
    font-size: 0.6rem;
  }

  .door-icon {
    width: 28px;
    height: 28px;
  }

  .door-icon.is-plain {
    width: 30px;
    height: 30px;
  }

  .door-body {
    padding: 1rem 0.95rem 0.95rem;
  }

  .open-label {
    min-height: 36px;
  }

  .campus-band {
    height: 180px;
  }

  .search-kbd {
    display: none;
  }

  .campus-caption p:first-child {
    font-size: 1.05rem;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-brand img {
    width: 56px;
  }

  .footer-name {
    font-size: 1.55rem;
  }

  .footer-base {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (max-width: 680px) and (max-height: 740px) {
  .hero-crest {
    display: none;
  }
}

@media (max-width: 400px) {
  .hero-meta {
    gap: 0.55rem;
  }

  .hero-actions .btn {
    font-size: 0.72rem;
    padding: 0.6rem 0.35rem;
  }

  .role-hint {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .door,
  .role-card {
    animation: none !important;
  }
  .btn:hover,
  .door:hover,
  .role-card:hover {
    transform: none;
  }
}
