:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #5b6472;
  --surface: #f6f7f9;
  --surface-strong: #ffffff;
  --border: #e4e7ec;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #d9f3ee;
  --warm: #b45309;
  --shadow: 0 16px 38px rgba(17, 24, 39, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --overlay: rgba(8, 13, 24, 0.6);
  color-scheme: light;
}

.dark {
  --bg: #0f172a;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --surface: #111c31;
  --surface-strong: #172033;
  --border: rgba(226, 232, 240, 0.14);
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.15);
  --warm: #f59e0b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --nav-bg: rgba(15, 23, 42, 0.9);
  --overlay: rgba(5, 10, 18, 0.7);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", "Inter", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

body[data-lang="bn"] {
  font-family: "Hind Siliguri", sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

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

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.navbar.scrolled {
  background: var(--nav-bg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
  padding: 10px 0;
}

body:not([data-page="home"]) .navbar {
  background: var(--nav-bg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(14px);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #ffffff;
}

.navbar.scrolled .logo,
.page-main + .footer ~ .logo {
  color: var(--text);
}

body:not([data-page="home"]) .logo,
body:not([data-page="home"]) .nav-links a {
  color: var(--text);
}

.logo-img {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.88;
  transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.nav-links > a::after {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar.scrolled .nav-links a {
  color: var(--text);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--accent);
  opacity: 1;
}

.nav-links > a:hover,
.nav-links > a:focus-visible,
.nav-links > a.active {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

body:not([data-page="home"]) .nav-links > a:hover,
body:not([data-page="home"]) .nav-links > a:focus-visible,
body:not([data-page="home"]) .nav-links > a.active,
.navbar.scrolled .nav-links > a:hover,
.navbar.scrolled .nav-links > a:focus-visible,
.navbar.scrolled .nav-links > a.active {
  background: var(--accent-soft);
}

.nav-links > a:hover::after,
.nav-links > a:focus-visible::after,
.nav-links > a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-links > a:active,
.more-menu-toggle:active,
.more-menu-panel a:active {
  transform: translateY(1px) scale(0.98);
}

.more-menu {
  position: relative;
  display: inline-block;
}

.more-menu[hidden] {
  display: none !important;
}

.nav-links a.is-overflow {
  display: none !important;
}

.more-menu-toggle {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.more-menu-toggle:hover,
.more-menu-toggle:focus-visible,
.more-menu.open .more-menu-toggle {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

body:not([data-page="home"]) .more-menu-toggle,
.navbar.scrolled .more-menu-toggle {
  border-color: var(--border);
  background: var(--surface-strong);
  color: var(--text);
}

.more-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  display: none;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.more-menu.open .more-menu-panel {
  display: grid;
  gap: 4px;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.more-menu-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.more-menu-panel a[hidden] {
  display: none;
}

.more-menu-panel a:hover,
.more-menu-panel a:focus-visible,
.more-menu-panel a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateX(3px);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 64px);
  height: 42px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.language-switch button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.language-switch button.active {
  background: var(--accent);
  color: #ffffff;
}

body:not([data-page="home"]) .language-switch,
.navbar.scrolled .language-switch {
  background: var(--surface-strong);
  border-color: var(--border);
}

body:not([data-page="home"]) .language-switch button,
.navbar.scrolled .language-switch button {
  color: var(--text);
}

body:not([data-page="home"]) .language-switch button.active,
.navbar.scrolled .language-switch button.active {
  color: #ffffff;
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

body:not([data-page="home"]) .theme-toggle,
.navbar.scrolled .theme-toggle {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: url("../images/hostel-hero.jpg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--overlay), rgba(8, 13, 24, 0.25));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 78px;
  color: #ffffff;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: "Soin Sans Pro", "Outfit", Arial, sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.98;
  font-weight: 800;
}

body[data-lang="bn"] .hero h1,
body[data-lang="bn"] .page-hero h1,
body[data-lang="bn"] h2,
body[data-lang="bn"] h3 {
  font-family: "Hind Siliguri", sans-serif;
}

.hero-subtitle {
  max-width: 560px;
  margin: 22px 0 32px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2vw, 1.25rem);
}

.rotating-line {
  min-height: 2.8em;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.rotating-line.phrase-in {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #7dd3c7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.hero .btn.primary {
  margin-top: -8px;
}

.btn.secondary {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.18);
}

.section {
  padding: clamp(70px, 9vw, 112px) 0;
}

.section.tinted {
  background: var(--surface);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-family: "Soin Sans Pro", "Outfit", Arial, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.06;
  font-weight: 800;
}

h3 {
  margin: 0 0 8px;
  font-family: "Soin Sans Pro", "Outfit", Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.2;
}

.lead,
.location-copy,
.page-hero p {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.student-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.36);
}

.student-card img {
  height: 245px;
  object-fit: cover;
  background: var(--surface);
}

.student-body {
  display: block;
  padding: 22px;
}

.student-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.student-lines {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.profile a,
.developer-content a {
  color: var(--accent-strong);
  font-weight: 800;
}

.room-profile {
  display: grid;
  gap: 24px;
  padding: 30px;
}

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

.room-photo-grid img {
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-panel select {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.search-wrap {
  margin: 0 0 26px;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-strong);
  text-align: center;
  font-weight: 700;
}

.roommate-grid {
  display: grid;
  gap: 22px;
}

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

.room-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.room-person {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.room-person:hover {
  transform: translateY(-3px);
  background: var(--accent-soft);
}

.room-person img {
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  border-radius: 50%;
  object-fit: cover;
}

.room-person strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.room-person span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.room-number {
  display: grid;
  width: 84px;
  min-height: 84px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-number:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

.info-box {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.info-box p {
  margin: 0;
  color: var(--muted);
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.map-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
}

.map-link-card {
  display: grid;
  min-height: 340px;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(17, 24, 39, 0.62)),
    url("../images/hostel-building.jpg") center / cover no-repeat;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow);
}

.map-link-card span {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 800;
}

.map-link-card strong {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-strong);
}

.page-main {
  min-height: 70vh;
  padding-top: 72px;
}

.page-hero {
  position: relative;
  padding: 96px 0 70px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(5, 10, 18, 0.72), rgba(5, 10, 18, 0.38)), url("../images/hostel-hero.jpg") center / cover no-repeat;
  color: #ffffff;
}

.page-hero.compact h1 {
  max-width: 820px;
}

.page-hero p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
}

.roommates-hero,
.results-hero,
.hostel-hero {
  background-image: linear-gradient(90deg, rgba(5, 10, 18, 0.72), rgba(5, 10, 18, 0.38)), url("../images/hostel-building.jpg");
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

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

.result-table th,
.result-table td {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.result-table th {
  background: var(--surface);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.result-table button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.table-pdf-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  white-space: nowrap;
}

.hostel-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hostel-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.nearby-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.nearby-list li {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.footer {
  padding: 28px 0;
  background: #0a0f1d;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(100%, 820px);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.profile {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
}

.profile img {
  height: 320px;
  border-radius: 8px;
  object-fit: cover;
}

.profile h2 {
  margin-bottom: 4px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 20px;
}

.contact-btn {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  color: #ffffff;
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-btn.call {
  background: #0f766e;
}

.contact-btn.whatsapp {
  background: #25d366;
}

.contact-btn.email {
  background: #ea4335;
}

.contact-btn.facebook {
  background: #1877f2;
}

.contact-btn.messenger {
  background: #0084ff;
}

.contact-btn.missing-icon {
  opacity: 0.35;
  background: var(--surface);
}

.contact-btn.has-custom-img {
  background: transparent !important;
  box-shadow: none !important;
}

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

.profile-item {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
}

.profile-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.profile-item strong {
  overflow-wrap: anywhere;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}

.result-box {
  padding: 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  text-align: center;
}

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

.hall-photo-demo {
  margin-top: 26px;
}

.person-card,
.gallery-card,
.developer-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.person-card[role="button"] {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.person-card[role="button"]:hover,
.person-card[role="button"]:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.person-card img,
.gallery-card img,
.developer-card img {
  height: 240px;
  object-fit: cover;
}

.person-card h3,
.person-card p,
.gallery-card h3,
.gallery-card p {
  margin-left: 20px;
  margin-right: 20px;
}

.person-card h3,
.gallery-card h3 {
  margin-top: 20px;
}

.person-card p,
.gallery-card p {
  margin-bottom: 22px;
  color: var(--muted);
}

.achievement-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin: 10px 0 22px;
  color: var(--muted);
}

.achievement-list li::marker {
  color: var(--accent);
}

.alumni-story {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.alumni-story section {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
}

.alumni-story p {
  margin: 0;
  color: var(--muted);
}

.gallery-card {
  cursor: pointer;
}

.gallery-card button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-preview img {
  max-height: 68vh;
  object-fit: contain;
  background: var(--surface);
}

.gallery-preview-body {
  padding: 20px;
}

.gallery-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.success-chart {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.chart-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.chart-row > span {
  color: var(--muted);
  font-weight: 800;
}

.chart-row div {
  min-height: 44px;
  width: var(--w);
  min-width: 230px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.location-link {
  margin-bottom: 18px;
}

.map-link-card.location-link {
  min-height: auto;
  margin-top: 18px;
  padding: 22px;
}

.map-link-card.location-link span {
  font-size: 1.2rem;
}

.developer-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.developer-card {
  padding-bottom: 24px;
}

.developer-card h2,
.developer-card p,
.developer-card .btn {
  margin-left: 22px;
  margin-right: 22px;
}

.developer-card p {
  color: var(--muted);
}

.developer-content {
  display: grid;
  gap: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.timeline span {
  color: var(--muted);
}

.skill-bars {
  display: grid;
  gap: 14px;
}

.skill-bars span {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.skill-bars b {
  display: block;
  width: var(--w);
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.developer-main {
  padding-top: 0;
}

.developer-hero {
  padding: 128px 0 78px;
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.78), rgba(8, 13, 24, 0.46)),
    url("../images/hostel-building.jpg") center / cover no-repeat;
  color: #ffffff;
}

.developer-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 6vw, 74px);
  align-items: center;
}

.developer-intro h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Outfit", Arial, sans-serif;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.96;
  font-weight: 800;
}

.developer-lead {
  max-width: 650px;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.developer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.developer-portrait {
  margin: 0;
}

.developer-portrait img {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.developer-info-grid,
.project-grid,
.developer-split {
  display: grid;
  gap: 18px;
}

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

.developer-split {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.developer-panel,
.project-tile {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.developer-panel {
  padding: 24px;
}

.developer-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.developer-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.developer-panel a {
  color: var(--accent-strong);
  font-weight: 800;
}

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

.project-tile {
  display: grid;
  align-content: start;
  min-height: 210px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-tile:hover,
.project-tile:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.project-tile span {
  width: fit-content;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-tile strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.project-tile p {
  margin: 12px 0 0;
  color: var(--muted);
}

.developer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.developer-tags span {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.contributor-grid {
  max-width: 820px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 28px;
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 800;
}

.footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-brand {
  display: grid;
  gap: 12px;
}

.footer-brand p,
.footer-links a,
.footer-credit {
  color: rgba(255, 255, 255, 0.72);
}

.footer-about {
  padding-top: 8px;
}

.footer-developer-link {
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links h3 {
  color: #ffffff;
  margin: 0 0 4px;
  font-size: 1rem;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 920px) {
  .nav-inner {
    align-items: flex-start;
  }

  .nav-links {
    order: 3;
    width: 100%;
    padding-top: 12px;
    overflow: visible;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .nav-links > a,
  .more-menu-toggle {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 8px;
  }

  .nav-links > a {
    display: inline-flex;
    align-items: center;
  }

  .nav-links a.is-overflow {
    display: none;
  }

  .more-menu-panel a {
    display: block;
  }

  .more-menu {
    display: block;
  }

  .nav-actions {
    margin-left: auto;
  }

  .language-switch {
    width: 54px;
    height: 40px;
    grid-template-columns: 1fr;
  }

  .language-switch button {
    display: none;
    padding: 0;
    font-size: 0.82rem;
  }

  .language-switch button.active {
    display: block;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

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

  .student-grid,
  .info-grid.three,
  .roommate-grid.wide,
  .split,
  .filter-panel,
  .person-grid,
  .gallery-grid,
  .developer-layout,
  .developer-hero-inner,
  .developer-info-grid,
  .project-grid,
  .developer-split,
  .footer-inner,
  .room-info-grid,
  .room-photo-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .profile img {
    height: 280px;
  }

  .developer-hero {
    padding: 124px 0 58px;
  }

  .developer-portrait {
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .navbar {
    padding: 8px 0;
  }

  .navbar.scrolled,
  body:not([data-page="home"]) .navbar {
    padding: 8px 0;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }

  .logo {
    min-width: 0;
    gap: 8px;
  }

  .logo-img {
    width: 34px;
    height: 34px;
  }

  .logo span {
    overflow: hidden;
    font-size: 1.02rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 8px;
    margin-left: 0;
  }

  .nav-links a {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    gap: 8px;
    padding-top: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links > a,
  .more-menu-toggle {
    min-height: 40px;
    padding: 0 12px;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-content {
    padding-top: 120px;
  }

  .section {
    padding: 58px 0;
  }

  .student-grid {
    gap: 16px;
  }

  .student-card img {
    height: 220px;
  }

  .room-pair {
    grid-template-columns: 1fr;
  }

  .room-number {
    width: 100%;
    min-height: 58px;
  }

  .footer-inner,
  .profile-grid,
  .result-list,
  .pdf-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .chart-row div {
    width: 100%;
    min-width: 0;
  }

  .modal {
    padding: 12px;
  }

  .profile {
    padding: 22px;
  }

  .developer-hero {
    padding: 116px 0 52px;
  }

  .developer-intro h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .developer-lead {
    font-size: 1rem;
  }

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

  .developer-actions .btn {
    width: 100%;
  }

  .developer-panel,
  .project-tile {
    padding: 20px;
  }

  .project-tile {
    min-height: 0;
  }
}

/* Room Modal: Compact Occupants and About Description */
.room-about-desc {
  margin: 16px 0 24px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-light);
  border-left: 4px solid var(--accent);
}

.room-about-desc p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.room-occupants {
  margin-top: 24px;
}

.room-occupants h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.occupants-list {
  display: grid;
  gap: 12px;
}

.occupant-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-light);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.occupant-row:hover,
.occupant-row:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--accent);
}

.occupant-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-strong);
  border: 2px solid var(--border);
}

.occupant-info {
  flex-grow: 1;
}

.occupant-info h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--text-strong);
}

.occupant-info p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.occupant-action {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.18s ease;
}

.occupant-row:hover .occupant-action {
  color: var(--accent-strong);
}
