@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #17132f;
  --muted: #615d78;
  --primary: #6d3df5;
  --primary-dark: #4c1fc1;
  --cyan: #22c7d9;
  --lime: #b8f34a;
  --surface: #ffffff;
  --soft: #f4f1ff;
  --border: rgba(78, 56, 142, 0.14);
  --shadow: 0 24px 70px rgba(51, 32, 112, 0.14);
  --radius-lg: 32px;
  --radius-md: 22px;
  --container: 1180px;
}

/* Keep display type compact and comfortable across page sizes. */
.hero h1 { font-size: clamp(2.7rem, 5.4vw, 5rem); }
.page-hero h1 { max-width: 760px; font-size: clamp(2.35rem, 5.2vw, 4.25rem); }
.section-heading h2,
.spotlight-copy h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.hero-copy,
.section-heading p,
.page-hero p { font-size: 0.98rem; }
.student-name { font-size: 0.92rem; }
.album-copy h2 { font-size: 1.05rem; }
.cta-panel h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.auth-aside h1 { font-size: clamp(2rem, 4vw, 3.4rem); }

.teacher-frames-section { padding-block: 4rem 5rem; }
.teacher-frame-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.teacher-frame-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.teacher-frame-photo, .teacher-frame-placeholder { aspect-ratio: 16 / 10; overflow: hidden; }
.teacher-frame-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-frame-caption { padding: 1.2rem 1.4rem 1.4rem; }
.teacher-frame-caption h3 { margin-top: .7rem; font-size: 1.1rem; }
.teacher-frame-caption p { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.teacher-frame-placeholder { display: grid; place-content: center; justify-items: center; gap: .35rem; background: linear-gradient(135deg, #f3efff, #e5fbfc); color: var(--primary-dark); }
.teacher-frame-placeholder span { font: 700 3rem 'Space Grotesk', sans-serif; }
.teacher-frame-placeholder small { color: var(--muted); }

@media (max-width: 760px) {
  .hero h1 { font-size: clamp(2.45rem, 10vw, 3.25rem); }
  .page-hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .teacher-frame-grid { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(184, 243, 74, 0.17), transparent 24rem),
    radial-gradient(circle at 91% 19%, rgba(34, 199, 217, 0.17), transparent 28rem),
    #fbfaff;
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.42;
  background-image: radial-gradient(rgba(109, 61, 245, 0.2) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(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;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  z-index: 100;
}

.nav-shell {
  min-height: 68px;
  padding: 10px 12px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 45px rgba(44, 25, 101, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #986dff);
  box-shadow: 0 10px 24px rgba(109, 61, 245, 0.3);
}

.brand-mark svg,
.icon svg {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.91rem;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current='page'] {
  color: var(--primary-dark);
  background: var(--soft);
}

.nav-cta {
  color: #fff !important;
  background: var(--ink) !important;
}

.nav-toggle {
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.hero {
  min-height: 100vh;
  padding: 150px 0 78px;
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: clamp(42px, 7vw, 90px);
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(109, 61, 245, 0.2);
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(184, 243, 74, 0.24);
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.08;
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.065em;
}

.text-gradient {
  color: transparent;
  background: linear-gradient(105deg, var(--primary) 12%, #9c4ff1 55%, #16a7ba);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-copy {
  max-width: 620px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 15px 32px rgba(109, 61, 245, 0.28);
}

.button-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 19px 38px rgba(109, 61, 245, 0.34);
}

.button-secondary {
  border-color: var(--border);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.button svg {
  width: 19px;
  height: 19px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.hero-photo {
  position: absolute;
  inset: 30px 0 46px 42px;
  overflow: hidden;
  border: 10px solid #fff;
  border-radius: 42px;
  background: var(--soft);
  box-shadow: var(--shadow);
  transform: rotate(2.5deg);
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 19, 47, 0.38), transparent 45%);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  z-index: 2;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 18px 45px rgba(39, 24, 88, 0.16);
  backdrop-filter: blur(14px);
}

.floating-card.top {
  top: 0;
  right: 4px;
}

.floating-card.bottom {
  bottom: 10px;
  left: 0;
}

.icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--soft);
}

.floating-card strong,
.floating-card span {
  display: block;
}

.floating-card strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.96rem;
}

.floating-card span {
  color: var(--muted);
  font-size: 0.75rem;
}

.section {
  padding: 100px 0;
}

.section-soft {
  background: linear-gradient(135deg, rgba(244, 241, 255, 0.86), rgba(237, 252, 252, 0.78));
}

.section-heading {
  max-width: 710px;
  margin-bottom: 44px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading.center .eyebrow {
  margin-inline: auto;
}

.section-heading h2 {
  margin-top: 18px;
  font-size: clamp(2.25rem, 5vw, 4.1rem);
  letter-spacing: -0.045em;
}

.section-heading p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.04rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
}

.stat-card strong {
  display: block;
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.7rem;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 16px 45px rgba(61, 43, 120, 0.07);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.feature-card:hover {
  border-color: rgba(109, 61, 245, 0.36);
  box-shadow: 0 22px 55px rgba(61, 43, 120, 0.12);
}

.feature-card .icon {
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.35rem;
}

.feature-card p {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.94rem;
}

.spotlight {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
}

.spotlight-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--soft);
  box-shadow: var(--shadow);
}

.spotlight-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-copy h2 {
  margin-top: 18px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: -0.045em;
}

.spotlight-copy p {
  margin: 18px 0 28px;
  color: var(--muted);
}

.badge-row {
  margin-bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.badge {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-hero {
  padding: 160px 0 62px;
  text-align: center;
}

.page-hero .eyebrow {
  margin-inline: auto;
}

.page-hero h1 {
  max-width: 850px;
  margin: 22px auto 0;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 650px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.toolbar {
  margin-bottom: 26px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 40px rgba(61, 43, 120, 0.07);
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(109, 61, 245, 0.12);
}

.result-count {
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.students-section {
  padding: 10px 0 110px;
}

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

.student-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 13px 34px rgba(53, 37, 107, 0.08);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.student-card:hover {
  border-color: rgba(109, 61, 245, 0.34);
  box-shadow: 0 20px 46px rgba(53, 37, 107, 0.14);
  transform: translateY(-4px);
}

.student-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(145deg, #e9e2ff, #dff9fc);
}

.student-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 300ms ease;
}

.student-card:hover .student-photo img {
  transform: scale(1.025);
}

.student-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--primary-dark);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.student-info {
  padding: 18px 18px 20px;
}

.student-number {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-name {
  min-height: 2.7em;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.35;
}

.student-nis {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 55px 20px;
  border: 1px dashed rgba(109, 61, 245, 0.35);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--soft);
  text-align: center;
}

.content-section {
  padding: 8px 0 110px;
}

.legend-row {
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-item {
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.8rem;
  font-weight: 700;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.purple { background: var(--primary); }
.legend-dot.cyan { background: var(--cyan); }
.legend-dot.lime { background: #78b815; }

.table-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
}

.table-scroll {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 17px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.schedule-table th:last-child,
.schedule-table td:last-child {
  border-right: 0;
}

.schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

.schedule-table th {
  color: #fff;
  background: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.schedule-table tbody tr:hover {
  background: #fbfaff;
}

.time-cell {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.subject {
  display: block;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.teacher {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.room {
  margin-top: 8px;
  padding: 4px 7px;
  display: inline-block;
  border-radius: 7px;
  color: var(--primary-dark);
  background: var(--soft);
  font-size: 0.66rem;
  font-weight: 800;
}

.room.fo {
  color: #086d78;
  background: #dff9fc;
}

.room.classroom {
  color: #4d7412;
  background: #effbd9;
}

.schedule-note {
  padding: 18px 20px;
  color: var(--muted);
  background: #fbfaff;
  font-size: 0.8rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.album-card {
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 25px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 15px 40px rgba(53, 37, 107, 0.09);
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.album-card:nth-child(1),
.album-card:nth-child(2) {
  grid-column: span 6;
}

.album-card:hover {
  border-color: rgba(109, 61, 245, 0.35);
  box-shadow: 0 22px 52px rgba(53, 37, 107, 0.14);
  transform: translateY(-4px);
}

.album-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
}

.album-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.album-card:hover .album-image img {
  transform: scale(1.025);
}

.album-copy {
  padding: 19px 20px 22px;
}

.album-copy span {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.album-copy h2 {
  margin-top: 6px;
  font-size: 1.15rem;
}

.auth-section {
  min-height: 100vh;
  padding: 140px 0 70px;
  display: grid;
  place-items: center;
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-aside {
  padding: 54px 45px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 199, 217, 0.35), transparent 20rem),
    var(--ink);
}

.auth-aside .brand {
  color: #fff;
}

.auth-aside h1 {
  margin-top: 80px;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  letter-spacing: -0.05em;
}

.auth-aside p {
  margin-top: 17px;
  color: rgba(255, 255, 255, 0.68);
}

.auth-card {
  padding: 54px 50px;
}

.auth-card h2 {
  font-size: 2rem;
}

.auth-card > p {
  margin-top: 8px;
  color: var(--muted);
}

.auth-form {
  margin-top: 32px;
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-control {
  position: relative;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(109, 61, 245, 0.12);
}

.field-control input[type='password'],
.field-control input[type='text'].password-field {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--primary-dark);
  background: var(--soft);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-submit {
  width: 100%;
  border: 0;
}

.demo-box {
  margin-top: 22px;
  padding: 15px;
  border: 1px dashed rgba(109, 61, 245, 0.28);
  border-radius: 14px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.79rem;
}

.demo-box strong {
  color: var(--ink);
}

.form-message {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-message.success { color: #207514; }
.form-message.error { color: #b42318; }

.gallery-detail {
  padding: 142px 0 40px;
}

.gallery-back {
  margin-bottom: 28px;
}

.gallery-detail-heading {
  margin-bottom: 34px;
  text-align: center;
}

.gallery-detail-heading .eyebrow {
  margin-inline: auto;
}

.gallery-detail-heading h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 4.6vw, 3.75rem);
  letter-spacing: -0.05em;
}

.gallery-detail-heading p {
  max-width: 620px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-photo-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 13px 34px rgba(53, 37, 107, 0.08);
}

.gallery-photo-button {
  width: 100%;
  padding: 0;
  display: block;
  border: 0;
  background: var(--soft);
  cursor: zoom-in;
}

.gallery-photo-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 250ms ease;
}

.gallery-photo-button:hover img {
  transform: scale(1.025);
}

.gallery-photo-caption {
  padding: 12px 15px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: none;
  place-items: center;
  background: rgba(17, 14, 34, 0.9);
  backdrop-filter: blur(12px);
}

.photo-lightbox.is-open {
  display: grid;
}

.lightbox-content {
  position: relative;
  width: min(100%, 1060px);
  max-height: calc(100vh - 48px);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 19, 47, 0.78);
  font-size: 1.45rem;
  cursor: pointer;
}

.lightbox-download {
  padding: 9px 14px;
  border-radius: 11px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery-photo-card { border-radius: 15px; }
  .gallery-photo-caption { padding: 9px 11px; font-size: 0.72rem; }
  .photo-lightbox { padding: 14px; }
}

@media (max-width: 370px) {
  .gallery-photo-grid { grid-template-columns: 1fr; }
}

.cta-panel {
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 80% -30%, rgba(34, 199, 217, 0.48), transparent 22rem),
    var(--ink);
}

.cta-panel h2 {
  max-width: 620px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

.cta-panel p {
  max-width: 620px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.cta-panel .button {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--lime);
}

.site-footer {
  margin-top: 100px;
  padding: 56px 0 30px;
  color: #fff;
  background: #17132f;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 44px;
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand p {
  max-width: 370px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.footer-column h3 {
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-column a,
.footer-column p {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid rgba(34, 199, 217, 0.65);
  outline-offset: 3px;
}

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

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .feature-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .students-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .album-card,
  .album-card:nth-child(1),
  .album-card:nth-child(2) {
    grid-column: span 6;
  }

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

  .auth-aside h1 {
    margin-top: 42px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header {
    top: 10px;
  }

  .nav-shell {
    position: relative;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 140px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .hero-photo {
    inset: 24px 6px 38px 20px;
    border-width: 7px;
    border-radius: 30px;
  }

  .floating-card {
    padding: 11px 13px;
  }

  .section {
    padding: 76px 0;
  }

  .feature-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .students-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .album-card,
  .album-card:nth-child(1),
  .album-card:nth-child(2) {
    grid-column: 1 / -1;
  }

  .auth-aside,
  .auth-card {
    padding: 35px 25px;
  }

  .student-info {
    padding: 14px 13px 16px;
  }

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

  .search-box {
    max-width: none;
  }

  .result-count {
    padding-bottom: 3px;
  }

  .cta-panel {
    padding: 32px 24px;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .brand-text-secondary {
    display: none;
  }

  .hero-visual {
    min-height: 360px;
  }

  .floating-card.top {
    right: -2px;
  }

  .floating-card.bottom {
    bottom: 2px;
  }

  .floating-card .icon {
    display: none;
  }

  .student-name {
    font-size: 0.9rem;
  }
}

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

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

/* Final type scale overrides for the compact reading size requested. */
body { font-size: 15px; }
.hero h1 { font-size: clamp(2.65rem, 5.25vw, 4.75rem); }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.gallery-detail-heading h1 { font-size: clamp(2rem, 4.3vw, 3.35rem); }
.section-heading h2,
.spotlight-copy h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.hero-copy,
.section-heading p,
.page-hero p,
.spotlight-copy p { font-size: 0.94rem; }
.student-name { font-size: 0.88rem; }
.album-copy h2 { font-size: 1rem; }
.cta-panel h2 { font-size: clamp(1.7rem, 3.3vw, 2.65rem); }
.auth-aside h1 { font-size: clamp(1.95rem, 3.8vw, 3.25rem); }

@media (max-width: 760px) {
  .hero h1 { font-size: clamp(2.35rem, 9.2vw, 3rem); }
  .page-hero h1 { font-size: clamp(1.95rem, 7.7vw, 2.75rem); }
  .gallery-detail-heading h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); }
}
