* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
}

body[data-menu-open="true"] {
  overflow: hidden;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: var(--sky);
}

body::-webkit-scrollbar-thumb {
  border: 2px solid var(--sky);
  border-radius: 999px;
  background: var(--ink);
}

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

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -0.03em;
}

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

h1[tabindex="-1"]:focus {
  outline: 0;
}

.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;
}

.app-shell {
  min-height: 100vh;
  overflow: clip;
}

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

.narrow-container {
  width: min(calc(100% - 48px), 980px);
}

.section {
  padding-block: 112px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

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

.button-dark {
  color: var(--white);
  background: var(--ink);
}

.button-dark:hover {
  background: #0a243e;
}

.button-light {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.68);
}

.button-light:hover {
  background: var(--white);
}

.button-yellow {
  color: var(--ink);
  background: var(--yellow);
}

.button-yellow:hover {
  background: #ffe570;
}

.button-outline {
  color: var(--ink);
  border-color: var(--line-strong);
  background: transparent;
}

.button-outline:hover {
  background: var(--yellow-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.text-link svg {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.text-link:hover {
  text-decoration: underline;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.dark-link {
  color: var(--ink);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: transparent;
}

.header-inner {
  display: flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  margin: 12px auto 0;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 5px 8px rgba(21, 50, 81, 0.14);
}

.brand {
  display: none;
  width: fit-content;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--yellow);
}

.brand strong {
  display: block;
  line-height: 1.1;
  font-size: 1.02rem;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--sky-soft);
}

.nav-link.active {
  color: var(--ink);
  background: var(--sky);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.header-auth {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.header-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-auth:hover,
.header-auth.active {
  color: var(--ink);
  background: var(--yellow);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
}

.menu-toggle:hover {
  background: var(--yellow-soft);
}

.mobile-nav {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: max(760px, 94svh);
  overflow: hidden;
  padding-top: var(--header-height);
  background: var(--sky);
  isolation: isolate;
}

.hero-frame {
  position: relative;
  z-index: 5;
  min-height: calc(max(760px, 94svh) - var(--header-height));
}

.hero-word {
  position: absolute;
  z-index: 1;
  top: 15.5%;
  left: 50%;
  width: 100%;
  color: rgba(255, 250, 240, 0.96);
  font-family: var(--font-body);
  font-size: clamp(8.5rem, 18vw, 18rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.04em;
  text-align: center;
  -webkit-text-stroke: clamp(1.4px, 0.16vw, 2.6px) currentColor;
  paint-order: stroke fill;
  white-space: nowrap;
  transform: translateX(-50%);
  user-select: none;
}

.hero-portrait-shell {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  display: flex;
  width: min(55vw, 760px);
  height: min(820px, calc(max(760px, 94svh) - var(--header-height) - 18px));
  align-items: flex-end;
  justify-content: center;
  transform: translateX(-50%);
}

.hero-portrait {
  width: auto;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 16px rgba(21, 50, 81, 0.14));
}

.hero-identity {
  position: absolute;
  bottom: 48px;
  left: 0;
  width: min(290px, 36vw);
}

.hero-kicker,
.profile-kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-identity h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(21, 50, 81, 0.48);
}

.hero-identity h1 strong {
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  line-height: 1;
}

.hero-identity h1 small {
  color: #284b66;
  font-size: 0.92rem;
  font-weight: 700;
}

.instructor-profile {
  background: var(--paper);
}

.instructor-profile-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(64px, 9vw, 128px);
}

.instructor-profile-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(4rem, 7.5vw, 7rem);
  line-height: 0.95;
}

.instructor-profile-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
  font-weight: 700;
}

.career-title {
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.career-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.career-list li {
  display: grid;
  align-items: center;
  padding: 23px 0;
  border-bottom: 1px solid var(--line-strong);
  grid-template-columns: 54px 1fr;
  gap: 14px;
}

.career-list li span {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.career-list li strong {
  font-size: clamp(1rem, 1.55vw, 1.24rem);
}

/* Shared sections */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.section-heading h2,
.timetable-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.section-heading h2 {
  max-width: 12ch;
}

.section-heading p,
.timetable-copy p {
  max-width: 52ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  overflow-wrap: break-word;
  text-wrap: pretty;
  word-break: keep-all;
}

.notices-preview {
  border-top: 1px solid var(--line);
  background: var(--sky-soft);
}

.notice-list {
  border-top: 1px solid var(--line-strong);
}

.notice-row {
  border-bottom: 1px solid var(--line);
}

.notice-row.expanded {
  background: rgba(255, 220, 76, 0.14);
}

.notice-button {
  display: grid;
  width: 100%;
  align-items: center;
  padding: 24px 10px;
  border: 0;
  background: transparent;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  text-align: left;
}

.notice-button:hover {
  background: rgba(143, 210, 236, 0.14);
}

.notice-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--yellow-soft);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease;
}

.notice-button:hover .notice-icon {
  background: var(--yellow);
  transform: rotate(-6deg) scale(1.05);
}

.notice-copy {
  min-width: 0;
}

.notice-copy strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 1.04rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.class-label {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
}

.notice-arrow {
  transition: transform 180ms ease;
}

.notice-row.expanded .notice-arrow {
  transform: rotate(90deg);
}

.notice-detail {
  max-width: 70ch;
  margin: -4px 62px 0;
  padding: 0 0 26px;
  color: var(--ink-soft);
}

.notice-skeleton {
  display: grid;
  height: 92px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 28% 58%;
  gap: 24px;
}

.notice-skeleton span {
  height: 12px;
  border-radius: 999px;
  background: rgba(21, 50, 81, 0.12);
  animation: skeleton-pulse 1.2s ease-in-out infinite alternate;
}

.timetable-preview {
  background: var(--yellow);
}

.timetable-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(220px, 0.66fr) minmax(0, 1.34fr);
  gap: 92px;
}

.timetable-copy {
  position: sticky;
  top: calc(var(--header-height) + 32px);
}

.timetable-copy h2 {
  max-width: none;
  font-size: clamp(1.75rem, 2.6vw, 2.3rem);
  line-height: 1.08;
  white-space: nowrap;
}

.timetable-copy p {
  max-width: 26rem;
  margin-bottom: 24px;
}

.day-selector,
.segmented-control {
  display: flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.day-button,
.segment {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.day-button:hover,
.segment:hover {
  color: var(--ink);
  background: rgba(21, 50, 81, 0.08);
}

.day-button.active,
.segment.active {
  color: var(--white);
  background: var(--ink);
  transform: scale(1.03);
}

.schedule-list {
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.schedule-row {
  display: grid;
  align-items: center;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 130px 1fr 160px 116px;
  gap: 20px;
}

.schedule-row time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.schedule-primary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-room,
.schedule-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.schedule-empty,
.content-state {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.schedule-empty {
  flex-direction: column;
  text-align: center;
}

.schedule-empty p,
.content-state p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* Internal public pages */
.page-intro {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  padding-top: var(--header-height);
  isolation: isolate;
}

.page-intro-blue {
  background: var(--sky);
}

.page-intro-yellow {
  background: var(--yellow);
}

.page-intro-content {
  display: flex;
  min-height: calc(380px - var(--header-height));
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding-block: 56px;
  text-align: center;
}

.page-intro-content::after {
  width: 52px;
  height: 2px;
  margin-top: 28px;
  background: currentColor;
  content: "";
  opacity: 0.48;
  transform-origin: center;
}

.page-intro-content h1 {
  margin-bottom: 14px;
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.page-intro-content p {
  max-width: 48ch;
  margin-bottom: 0;
  color: #284b66;
  font-size: 1.05rem;
  text-wrap: pretty;
  word-break: keep-all;
}

.public-list-section {
  min-height: 520px;
  background: var(--paper);
}

.notice-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.segmented-control {
  background: rgba(143, 210, 236, 0.28);
}

.search-field {
  display: flex;
  min-width: min(100%, 290px);
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--white);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.search-field:focus-within {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-field input::placeholder {
  color: #5f7485;
}

.result-summary {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

/* Account access */
.auth-page {
  position: relative;
  display: grid;
  min-height: calc(100svh - 180px);
  overflow: hidden;
  place-items: center;
  padding: calc(var(--header-height) + 64px) 24px 80px;
  background: var(--sky-soft);
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.auth-page::before {
  top: -310px;
  left: -230px;
  width: clamp(560px, 48vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sky);
  opacity: 0.6;
}

.auth-page::after {
  right: -170px;
  bottom: -210px;
  width: clamp(390px, 34vw, 560px);
  height: clamp(280px, 25vw, 410px);
  border-radius: var(--radius-surface);
  background: var(--yellow-soft);
  opacity: 0.82;
  transform: rotate(-12deg);
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 980px);
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
  justify-self: center;
  border-radius: var(--radius-surface);
  background: var(--paper);
  box-shadow: 0 8px 8px rgba(21, 50, 81, 0.09);
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.auth-intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 48px;
  background: var(--sky);
}

.auth-intro-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}

.auth-intro-copy {
  margin-block: auto;
}

.auth-intro-title {
  max-width: 11ch;
  margin-bottom: 22px;
  font-size: clamp(2.3rem, 3.7vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  word-break: keep-all;
}

.auth-intro-detail {
  max-width: 34ch;
  margin-bottom: 0;
  color: #284b66;
  word-break: keep-all;
}

.auth-public-nav {
  display: flex;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(21, 50, 81, 0.28);
}

.auth-public-nav a {
  font-weight: 700;
  text-decoration: none;
}

.auth-public-nav a:hover {
  text-decoration: underline;
}

.auth-form-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--paper);
}

.auth-form-heading {
  margin-bottom: 34px;
}

.auth-form-heading h1 {
  margin-bottom: 8px;
  font-size: 2.7rem;
}

.auth-form-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  word-break: keep-all;
}

.auth-form {
  display: grid;
  min-width: 0;
  gap: 21px;
}

.auth-field-row {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 8px;
  font-weight: 700;
}

.input-shell {
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--white);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.input-shell:focus-within {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.input-shell input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
}

.input-shell input::placeholder {
  color: #5f7485;
}

.password-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
}

.password-toggle:hover {
  background: var(--yellow-soft);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-status {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-surface);
  background: var(--yellow-soft);
}

.auth-status[hidden] {
  display: none;
}

.auth-status svg {
  flex: 0 0 auto;
  margin-top: 3px;
}

.auth-status p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.auth-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.auth-secondary a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.auth-secondary a svg {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-secondary a:hover {
  text-decoration: underline;
}

.auth-secondary a:hover svg {
  transform: translateX(3px);
}

/* Footer */
.site-footer {
  padding-block: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  background: #0d263f;
}

.footer-inner {
  display: grid;
  width: min(calc(100% - 48px), var(--content-width));
  align-items: center;
  margin-inline: auto;
  grid-template-columns: 1.3fr auto;
  gap: 36px;
}

.footer-brand {
  display: block;
}

.footer-brand strong {
  display: block;
  margin-bottom: 3px;
}

.footer-brand p,
.footer-copy {
  margin-bottom: 0;
  color: #b9cedf;
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-nav a:hover {
  color: var(--yellow);
  text-decoration: underline;
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.motion-pending {
  opacity: 0;
  filter: blur(2px);
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--motion-delay, 0ms),
    filter 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--motion-delay, 0ms),
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--motion-delay, 0ms),
    clip-path 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--motion-delay, 0ms);
}

.motion-pending[data-motion="left"] {
  transform: translate3d(-28px, 0, 0);
}

.motion-pending[data-motion="right"] {
  transform: translate3d(28px, 0, 0);
}

.motion-pending[data-motion="fade"] {
  filter: blur(3px);
  transform: none;
}

.motion-pending[data-motion="clip"] {
  clip-path: inset(0 0 22% 0);
  transform: none;
}

.motion-pending[data-motion="scale"] {
  transform: scale(0.985);
}

.motion-pending.is-visible {
  clip-path: inset(0);
  opacity: 1;
  filter: blur(0);
  transform: none;
}

@keyframes hero-word-settle {
  from {
    opacity: 0.28;
    filter: blur(3px);
    letter-spacing: -0.015em;
    transform: translateX(-50%) scaleX(0.94);
  }
  to {
    opacity: 1;
    filter: blur(0);
    letter-spacing: -0.04em;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes hero-portrait-focus {
  from {
    opacity: 0.74;
    filter: blur(4px) saturate(0.92);
    transform: translateX(-50%) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translateX(-50%) scale(1);
  }
}

@keyframes hero-identity-enter {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

@keyframes header-arrive {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes page-intro-enter {
  from {
    opacity: 0.55;
    filter: blur(3px);
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes intro-line-draw {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 0.48;
    transform: scaleX(1);
  }
}

@keyframes detail-open {
  from {
    clip-path: inset(0 0 45% 0);
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    clip-path: inset(0);
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes icon-settle {
  from {
    opacity: 0.35;
    transform: rotate(-8deg) scale(0.82);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes skeleton-pulse {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.9;
  }
}

@keyframes auth-circle-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(24px, 14px, 0);
  }
}

@keyframes auth-sheet-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-12deg);
  }
  to {
    transform: translate3d(-18px, -12px, 0) rotate(-9deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-page::before {
    animation: auth-circle-drift 12s ease-in-out infinite alternate;
  }

  .auth-page::after {
    animation: auth-sheet-drift 14s ease-in-out infinite alternate;
  }

  .header-inner {
    animation: header-arrive 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-word {
    animation: hero-word-settle 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-portrait-shell {
    animation: hero-portrait-focus 820ms 80ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-identity {
    animation: hero-identity-enter 650ms 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .page-intro-content {
    animation: page-intro-enter 650ms 70ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .page-intro-content::after {
    animation: intro-line-draw 500ms 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .notice-row.expanded .notice-detail {
    animation: detail-open 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .timetable.is-visible .schedule-empty > svg,
  .auth-status:not([hidden]) > svg {
    animation: icon-settle 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@media (max-width: 980px) {
  .site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .header-inner {
    display: grid;
    width: min(calc(100% - 48px), var(--content-width));
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    grid-template-columns: 1fr auto;
  }

  .brand {
    display: inline-flex;
    justify-self: start;
  }

  .header-actions {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .desktop-nav,
  .header-auth {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 180ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 240ms;
  }

  .mobile-nav.open {
    border-top: 1px solid var(--line);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .mobile-nav-inner {
    display: grid;
    width: min(calc(100% - 48px), var(--content-width));
    gap: 4px;
    margin-inline: auto;
    padding: 22px 0 28px;
  }

  .mobile-nav-link {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
    font-weight: 700;
    opacity: 0;
    text-decoration: none;
    transform: translateY(-6px);
    transition: color 160ms ease, opacity 220ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-link.active {
    color: #a2332c;
  }

  .mobile-login {
    margin-top: 14px;
    opacity: 0;
    transform: translateY(-6px);
    transition: background-color 180ms ease, color 180ms ease, opacity 220ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav.open .mobile-nav-link,
  .mobile-nav.open .mobile-login {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-nav.open .mobile-nav-link:nth-child(1) {
    transition-delay: 40ms;
  }

  .mobile-nav.open .mobile-nav-link:nth-child(2) {
    transition-delay: 80ms;
  }

  .mobile-nav.open .mobile-nav-link:nth-child(3) {
    transition-delay: 120ms;
  }

  .mobile-nav.open .mobile-login {
    transition-delay: 150ms;
  }

  .hero-portrait-shell {
    left: 53%;
    width: min(68vw, 700px);
  }

  .instructor-profile-grid {
    gap: 60px;
  }

  .timetable-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .timetable-copy {
    position: static;
  }

  .schedule-row {
    grid-template-columns: 120px 1fr 150px;
  }

  .schedule-duration {
    display: none;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .auth-intro {
    padding: 42px;
  }

  .auth-form-panel {
    padding: 48px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  .container,
  .narrow-container,
  .header-inner,
  .mobile-nav-inner,
  .footer-inner {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .section {
    padding-block: 76px;
  }

  .hero {
    min-height: 730px;
  }

  .hero-frame {
    min-height: 662px;
  }

  .hero-word {
    top: 22%;
    font-size: clamp(6rem, 30vw, 10rem);
  }

  .hero-portrait-shell {
    z-index: 4;
    left: 53%;
    width: min(116vw, 650px);
    height: calc(730px - var(--header-height) - 18px);
  }

  .hero-identity {
    z-index: 6;
    bottom: 28px;
    width: min(245px, 72vw);
    color: var(--paper);
    text-shadow: 0 1px 10px rgba(13, 38, 63, 0.28);
  }

  .hero-identity h1 {
    border-color: rgba(255, 250, 240, 0.68);
  }

  .hero-identity h1 small {
    color: rgba(255, 250, 240, 0.86);
  }

  .instructor-profile-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .instructor-profile-heading h2 {
    font-size: 3.9rem;
  }

  .career-list li {
    grid-template-columns: 40px 1fr;
    gap: 10px;
  }

  .section-heading {
    display: grid;
    align-items: start;
    margin-bottom: 30px;
  }

  .section-heading h2,
  .timetable-copy h2 {
    font-size: 2.5rem;
  }

  .notices-preview .section-heading h2 {
    max-width: none;
    font-size: clamp(1.55rem, 7vw, 2rem);
    letter-spacing: -0.04em;
    white-space: nowrap;
  }

  .timetable-copy h2 {
    font-size: clamp(1.65rem, 8.2vw, 2rem);
  }

  .notice-button {
    padding: 20px 2px;
    grid-template-columns: 38px 1fr auto;
    gap: 11px;
  }

  .notice-icon {
    width: 36px;
    height: 36px;
  }

  .notice-copy strong {
    font-size: 0.94rem;
  }

  .notice-meta {
    gap: 4px 9px;
    font-size: 0.7rem;
  }

  .notice-detail {
    margin-inline: 49px 8px;
    font-size: 0.88rem;
  }

  .timetable-preview {
    padding-bottom: 84px;
  }

  .day-selector,
  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .day-button,
  .segment {
    flex: 1 0 auto;
  }

  .schedule-row {
    align-items: start;
    padding: 20px 2px;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
  }

  .schedule-row time {
    grid-column: 1;
  }

  .schedule-primary {
    grid-column: 1;
    grid-row: 2;
  }

  .schedule-room {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .page-intro {
    min-height: 300px;
  }

  .page-intro-content {
    min-height: calc(300px - var(--header-height));
    padding-block: 42px;
  }

  .page-intro-content h1 {
    font-size: 3rem;
  }

  .notice-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .auth-page {
    padding: calc(var(--header-height) + 28px) 16px 48px;
  }

  .auth-page::before {
    top: -210px;
    left: -350px;
    width: 560px;
    opacity: 0.38;
  }

  .auth-page::after {
    right: -230px;
    bottom: -120px;
    width: 380px;
    height: 270px;
    opacity: 0.68;
  }

  .auth-layout {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .auth-intro {
    display: none;
  }

  .auth-form-panel {
    padding: 40px 24px;
  }

  .auth-field-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .auth-form-panel {
    padding: 34px 20px 38px;
  }

  .hero-portrait-shell {
    left: 56%;
    width: 132vw;
  }

  .hero-word {
    top: 24%;
  }

  .hero-identity h1 strong {
    font-size: 1.8rem;
  }

  .schedule-room {
    max-width: 105px;
    text-align: right;
  }
}

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

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