/* ==========================================================================
   S. M. Joshi College — Unified Institutional Platform Stylesheet
   Apple-grade editorial minimalism · Tight balanced spacing · Mobile-first
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-dark: #0b0d10;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #6e6e73;
  --accent: #0f5c47;
  --accent-hover: #0a4434;
  --accent-soft: #edf6f3;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1120px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-pill: 999px;
}

html[data-contrast="high"] {
  --bg: #ffffff; --bg-soft: #ffffff; --line: #000; --line-strong: #000;
  --ink: #000; --ink-2: #000; --ink-3: #111; --accent: #00422f;
}
html[data-text-scale="lg"] { font-size: 112%; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.7rem 1.2rem; font-weight: 600; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; border-radius: var(--r-sm); }

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.1rem, 3.8vw, 2rem); }

/* Single-Row 56px Frosted Glass Navbar */
.navbar {
  position: sticky; top: 0; z-index: 120;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); font-weight: 600; font-size: 0.96rem; letter-spacing: -0.015em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 29px; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.84rem; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }

.nav-right { display: flex; align-items: center; gap: 0.85rem; }
.nav-erp { font-size: 0.83rem; font-weight: 500; color: var(--ink-2); }
.nav-erp:hover { color: var(--ink); text-decoration: none; }

.burger {
  display: none; width: 40px; height: 40px; padding: 0; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; align-items: center; justify-content: center; border-radius: 50%;
}
.burger:hover { background: var(--bg-soft); }

.mobile-sheet {
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 115;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 1.25rem clamp(1.25rem, 6vw, 2.5rem) 2rem; overflow-y: auto;
}
.mobile-sheet[hidden] { display: none; }
.mobile-sheet ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.mobile-sheet li a {
  display: block; padding: 0.85rem 0; font-size: 1.25rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink); border-bottom: 1px solid var(--line);
}
.mobile-sheet__actions { display: grid; gap: 0.7rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.68rem 1.35rem; border-radius: var(--r-pill); font-family: inherit;
  font-size: 0.9rem; font-weight: 500; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #333336; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--bg-soft); }
.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tight, Balanced Hero & Page Headers */
.hero { padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(2rem, 4vw, 3.25rem); text-align: center; }
.page-hero { padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.page-hero__kicker { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.page-hero__title { margin: 0 0 0.5rem; font-size: clamp(1.85rem, 4vw, 2.85rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.page-hero__sub { margin: 0; max-width: 58ch; font-size: 1rem; color: var(--ink-2); }

.heritage-sig {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 0.65rem 1.15rem; margin-bottom: 1.25rem; padding: 0.35rem 0.95rem;
  border-radius: var(--r-pill); background: var(--bg-soft);
}
.sig-person { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 500; color: var(--ink-2); }
.sig-person img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.sig-div { width: 1px; height: 16px; background: var(--line-strong); }

.hero__eyebrow { margin: 0 0 0.5rem; font-size: 0.84rem; font-weight: 600; color: var(--accent); }
.hero__title { margin: 0 auto 0.75rem; max-width: 19ch; font-size: clamp(2.15rem, 5.5vw, 3.9rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.035em; }
.hero__sub { margin: 0 auto 1.5rem; max-width: 48ch; font-size: clamp(0.98rem, 1.8vw, 1.18rem); color: var(--ink-2); }
.hero__cta { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }

.hero-frame {
  margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-soft);
  aspect-ratio: 16 / 9; max-height: 520px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Stats Strip */
.stats { padding: 1.75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; text-align: center; }
.stat__num { display: block; font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat__lbl { display: block; margin-top: 0.25rem; font-size: 0.82rem; color: var(--ink-3); }

/* Balanced Sections (Tight Rhythm — No Awkward Voids) */
.section { padding: clamp(2.5rem, 4.8vw, 4.25rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #f5f5f7; }

.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.75rem; }
.section__head--center { flex-direction: column; align-items: center; text-align: center; max-width: 620px; margin-left: auto; margin-right: auto; }
.section__title { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }
.section__sub { margin: 0.4rem 0 0; font-size: 0.96rem; color: var(--ink-2); }
.section--dark .section__sub { color: #a1a1a6; }

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

/* Platform Cards & Tiles */
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.45rem;
  background: var(--bg-soft); border-radius: var(--r-md); padding: 1.35rem;
  color: var(--ink); transition: background-color 0.15s ease, transform 0.15s ease;
}
.section--soft .tile { background: #ffffff; border: 1px solid var(--line); }
.tile:hover { background: #ebebef; transform: translateY(-2px); text-decoration: none; }
.section--soft .tile:hover { background: #ffffff; border-color: var(--accent); }
.tile__kicker { font-size: 0.74rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.tile__title { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.tile__desc { margin: 0; font-size: 0.86rem; color: var(--ink-2); }
.tile__go { margin-top: 0.35rem; font-size: 0.84rem; font-weight: 600; color: var(--accent); }

/* Bento Campus Grid */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.bento-tile { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: #111; }
.bento-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.bento-tile:hover img { transform: scale(1.03); }
.bento-tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.25rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0) 100%); color: #fff;
}
.bento-tile__title { display: block; font-size: 1rem; font-weight: 600; }
.bento-tile__sub { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.84); }

/* Bulletproof Video Cards */
.video-card { position: relative; border-radius: var(--r-md); overflow: hidden; background: #0b0d10; aspect-ratio: 16 / 9; }
.video-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.76; transition: opacity 0.2s ease, transform 0.4s ease; }
.video-card:hover img { opacity: 0.86; transform: scale(1.02); }
.video-trigger {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.08) 55%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; color: #fff;
}
.play-orb {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; padding-left: 4px;
}
.video-label { font-size: 0.88rem; font-weight: 600; }
.video-ext {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
  background: rgba(0,0,0,0.62); color: #fff; font-size: 0.74rem; font-weight: 500;
  padding: 0.28rem 0.68rem; border-radius: var(--r-pill);
}
.video-ext:hover { background: rgba(0,0,0,0.88); color: #fff; text-decoration: none; }
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Principal Desk */
.principal-grid { display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.25rem, 3.5vw, 2.5rem); align-items: start; }
.principal-grid__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-md); }
.principal-quote { margin: 0 0 0.9rem; font-size: clamp(1.02rem, 1.7vw, 1.18rem); line-height: 1.56; font-weight: 500; color: var(--ink); }
.principal-intro { margin: 0 0 0.9rem; font-size: 0.92rem; line-height: 1.62; color: var(--ink-2); }
.principal-by { margin: 0 0 0.85rem; font-size: 0.86rem; color: var(--ink-3); }

/* Heritage & Personalities */
.person-card { background: var(--bg-soft); border-radius: var(--r-md); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }
.person-card img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.person-card h3 { margin: 0 0 0.2rem; font-size: 0.96rem; font-weight: 600; }
.person-card p { margin: 0; font-size: 0.85rem; color: var(--ink-2); }

/* Segmented Controls, Notices, NAAC, Tables */
.segmented {
  display: inline-flex; gap: 0.25rem; padding: 0.26rem; border-radius: var(--r-pill);
  background: var(--bg-soft); max-width: 100%; overflow-x: auto;
}
.section--soft .segmented { background: #e9e9ed; }
.seg-btn {
  flex-shrink: 0; border: 0; background: transparent; color: var(--ink-2); font-family: inherit;
  font-size: 0.85rem; font-weight: 600; padding: 0.45rem 1.05rem; border-radius: var(--r-pill); cursor: pointer;
}
.seg-btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.dept-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dept-pill { padding: 0.48rem 0.95rem; border-radius: var(--r-pill); background: var(--bg-soft); font-size: 0.88rem; font-weight: 500; color: var(--ink); }

.notice-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.notice-row:first-child { border-top: 1px solid var(--line); }
.notice-row__meta { font-size: 0.76rem; color: var(--ink-3); }
.notice-row__title { margin: 0.15rem 0 0; font-size: 0.96rem; font-weight: 600; }

.naac-item { border-bottom: 1px solid var(--line); }
.naac-btn {
  width: 100%; background: transparent; border: 0; padding: 0.95rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  text-align: left; font-family: inherit; font-size: 0.95rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.naac-panel { padding: 0 0 1rem; font-size: 0.88rem; color: var(--ink-2); }
.naac-panel ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.28rem; }

/* Dark Museum-Grade Placement Partners Showcase (Downside) */
.partners-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.partner-tile {
  background: #ffffff; border-radius: var(--r-md); padding: 1.5rem 1rem 1.15rem;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.85rem; text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.partner-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0,0,0,0.35); }
.partner-tile__logo { height: 48px; display: flex; align-items: center; justify-content: center; }
.partner-tile__logo img { max-height: 42px; max-width: 124px; width: auto; object-fit: contain; }
.partner-tile__name { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.partner-tile__sub { display: block; font-size: 0.72rem; color: var(--ink-3); }

/* Forms & Tables */
.card-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }
.form-stack { display: grid; gap: 0.85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: 0.62rem 0.8rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink);
}
.field textarea { min-height: 92px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.alert { padding: 0.75rem 1rem; border-radius: var(--r-sm); font-size: 0.86rem; font-weight: 500; }
.alert--success { background: var(--accent-soft); color: var(--accent); }
.alert--error { background: #fef2f2; color: #991b1b; }

.table-wrap { overflow-x: auto; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.audit-table th, .audit-table td { text-align: left; padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.audit-table th { font-weight: 600; color: var(--ink-3); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sev { display: inline-block; padding: 0.16rem 0.55rem; border-radius: var(--r-pill); font-size: 0.72rem; font-weight: 700; }
.sev--crit { background: #fee2e2; color: #991b1b; }
.sev--high { background: #ffedd5; color: #9a3412; }
.sev--med { background: #fef9c3; color: #854d0e; }

/* Footer */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 2.5rem 0 1.75rem; font-size: 0.84rem; color: var(--ink-3); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.footer h3 { margin: 0 0 0.6rem; font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer a { color: var(--ink-2); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding-top: 1.25rem; font-size: 0.78rem; }
.a11y-row { display: inline-flex; gap: 0.35rem; }
.a11y-btn { background: #fff; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 0.22rem 0.62rem; font-size: 0.74rem; font-weight: 600; cursor: pointer; }
.a11y-btn[aria-pressed="true"], .a11y-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (max-width: 900px) {
  .nav-links, .nav-right { display: none; }
  .burger { display: inline-flex; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sig-div { display: none; }
  .hero__cta { display: grid; width: 100%; max-width: 300px; }
  .hero-frame { border-radius: var(--r-md); aspect-ratio: 4 / 3; }
  .principal-grid, .bento, .grid-2, .grid-3, .grid-4, .form-row, .footer__top { grid-template-columns: 1fr; }
  .principal-grid__img { max-width: 140px; }
  .partners-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
