/* =============================================
   CSS VARIABLES & FORMAL ACADEMIC THEME
============================================= */
:root {
  --transition: 0.3s ease-in-out;
}

/* Formal Light Mode (Clean, Professional, Earthy) */
[data-theme="light"] {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f4f7f5;
  --bg-tertiary:   #e8ece9;
  --text-primary:  #16241a; 
  --text-secondary:#3b4d40;
  --text-muted:    #6b7d70;
  --accent:        #1e4d2e; 
  --accent-gold:   #d4af37; 
  --accent-glow:   rgba(30, 77, 46, 0.1);
  --glass-bg:      rgba(255, 255, 255, 0.95); /* Slightly softer white */
  --glass-border:  #e8ece9; 
  --glass-shadow:  0 4px 20px rgba(0, 0, 0, 0.08); 
  --card-hover:    #f9fbf9;
  --nav-bg:        #ffffff; 
  --hero-overlay:  rgba(15, 30, 20, 0.65); 
  --footer-bg:     #121c16;
}

/* Formal Dark Mode */
[data-theme="dark"] {
  --bg-primary:    #121c16;
  --bg-secondary:  #1a261e;
  --bg-tertiary:   #233328;
  --text-primary:  #f4f7f5;
  --text-secondary:#c2d1c7;
  --text-muted:    #8ba393;
  --accent:        #d4af37; /* Use gold for better contrast in dark mode */
  --accent-gold:   #d4af37; 
  --accent-glow:   rgba(212, 175, 55, 0.15);
  --glass-bg:      rgba(26, 38, 30, 0.95);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-shadow:  0 8px 30px rgba(0, 0, 0, 0.4); 
  --card-hover:    #233328;
  --nav-bg:        #121c16; 
  --hero-overlay:  rgba(10, 15, 12, 0.8); 
  --footer-bg:     #0a0f0c;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  line-height: 1.7;
}

h1,h2,h3,h4 {
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

section { padding: 100px 0; }

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

/* Formal Card */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--glass-shadow);
}

/* Glow button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(30, 77, 46, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 77, 46, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--glass-border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* =============================================
   LOGO & CUSTOM FOOTER STYLES
============================================= */
.navbar-logo-img {
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.footer-logo-img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 18px;
}

.dkode-link {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.dkode-link:hover {
  color: var(--accent);
}

/* =============================================
   NAVBAR & LOGO TEXT
============================================= */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
}

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 0 5%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
  transition: height var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  height: 70px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

@media (max-width: 480px) {
  .brand-title { font-size: 1.1rem; }
  .brand-sub { font-size: 0.55rem; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Theme toggle */
.theme-toggle {
  width: 46px; height: 26px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #08101e;
}
[data-theme="light"] .theme-toggle-knob {
  transform: translateX(20px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* =============================================
   SIDEBAR & OVERLAY (Mobile)
============================================= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.75); /* Slightly darker overlay */
  backdrop-filter: blur(12px); /* Beautiful strong blur */
  -webkit-backdrop-filter: blur(12px);
  z-index: 1001; /* Forces it ABOVE the navbar (which is 1000) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0; 
  right: -100%; 
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  z-index: 1002; /* Forces it to be the absolute highest layer */
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-menu.active { 
  right: 0; 
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 5%;
  border-bottom: 1px solid var(--glass-border);
}
/* Sidebar Theme Toggle Wrapper */
.sidebar-theme-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
}
.sidebar-logo {
  max-height: 40px;
  width: auto;
}
.sidebar-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 10px; /* Expands the clickable area */
  position: relative;
  z-index: 10; /* Ensures nothing invisible overlaps and blocks the click */
}
.sidebar-close:hover { color: var(--accent); }

.sidebar-links {
  display: flex;
  flex-direction: column;
  padding: 20px 5%;
}
.sidebar-links a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--transition), padding-left var(--transition);
}
.sidebar-links a:hover { 
  color: var(--accent); 
  padding-left: 8px;
}

.sidebar-contact {
  margin-top: auto;
  padding: 30px 5%;
  background: rgba(0,0,0,0.1);
  border-top: 1px solid var(--glass-border);
}
.sidebar-contact h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.sidebar-contact p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}
.sidebar-contact i {
  color: var(--accent);
  margin-top: 3px;
}

/* =============================================
   HERO
============================================= */
#hero {
  height: 100vh;
  min-height: 680px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero-bg-dark.jpg');
  background-size: cover;
  background-position: center;
  transition: background-image 0.3s;
}
[data-theme="light"] .hero-bg {
  background-image: url('images/hero-bg-light.jpg');
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
/* Animated radial glow */
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, var(--accent-glow) 0%, transparent 70%);
  animation: heroGlowPulse 6s ease-in-out infinite alternate;
}
@keyframes heroGlowPulse {
  from { opacity: 0.5; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 52px 48px;
  max-width: 820px;
  width: 90%;
}
.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.hero-label::before, .hero-label::after {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.hero-h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 22px;
  text-shadow: none; /* Removed shadow for a cleaner, formal look */
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.85;
}
.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btns .btn-outline {
  border-color: var(--glass-border);
  color: var(--text-primary);
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-hint-line {
  width: 1.5px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform: scaleY(1); opacity: 0.6; }
  50%      { transform: scaleY(1.3); opacity: 1; }
}

/* =============================================
   ABOUT
============================================= */
#about { background: var(--bg-secondary); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-img-wrap {
  position: relative;
}
.about-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  animation: floatImg 5s ease-in-out infinite;
}
@keyframes floatImg {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.about-img-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  padding: 20px 28px;
  text-align: center;
}
.about-img-badge .badge-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.about-img-badge .badge-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.about-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 22px;
  line-height: 1.85;
}
.accreditation-box {
  margin-top: 36px;
  padding: 26px 30px;
  border-left: 3px solid var(--accent);
  background: var(--glass-bg);
  border-radius: 0 14px 14px 0;
  position: relative;
}
.accreditation-box::before {
  content: '"';
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.25;
  position: absolute;
  top: -10px; left: 16px;
  line-height: 1;
}
.accreditation-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  margin: 0;
}
.accreditation-box .cite {
  margin-top: 12px;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* =============================================
   FACULTIES
============================================= */
#faculties { background: var(--bg-primary); }
.faculties-header {
  text-align: center;
  margin-bottom: 60px;
}
.faculties-header .section-label {
  justify-content: center;
}
.faculties-header .section-label::before { display: none; }
.faculties-header .section-label::after {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--accent);
}

.faculties-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.faculty-card {
  padding: 36px 28px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faculty-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px var(--accent), 0 0 40px var(--accent-glow);
}
.faculty-icon {
  width: 52px; height: 52px;
  background: var(--accent-glow);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: all var(--transition);
}
.faculty-card:hover .faculty-icon {
  background: var(--accent);
  color: #08101e;
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.faculty-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.4;
}
.faculty-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faculty-card .card-arrow {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: all var(--transition);
}
.faculty-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =============================================
   VISION & MISSION (Tabs)
============================================= */
#vision { background: var(--bg-secondary); }
.vm-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}
.vm-left .section-sub { margin-bottom: 40px; }
.vm-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.vm-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vm-stat .stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.vm-stat .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--glass-border);
}
.tab-btn {
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  letter-spacing: 0.04em;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn:hover { color: var(--accent); }

.tab-panel { display: none; animation: fadeInTab 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-panel p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 18px;
}
.vm-points {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vm-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.vm-point-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}
.vm-point p { margin: 0; font-size: 0.93rem; }

/* =============================================
   GALLERY STRIP
============================================= */
#gallery { background: var(--bg-primary); padding: 80px 0; overflow: hidden; }
.gallery-header { text-align: center; margin-bottom: 48px; }
.gallery-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 12px 5% 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 360px;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,16,30,0.7) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.06em;
}

/* =============================================
   CONTACT TEASER
============================================= */
#contact { background: var(--bg-secondary); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.contact-icon-wrap {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-item-text .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-item-text .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}
.contact-form-panel {
  padding: 44px 40px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 56px;
}
.footer-brand .logo-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e8edf5;
}
.footer-brand .logo-sub {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.8;
  max-width: 300px;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.footer-social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.footer-social-link:hover {
  background: var(--accent);
  color: #08101e;
  border-color: var(--accent);
}

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  font-size: 0.9rem;
  color: #64748b;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a::before {
  content: '→';
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition);
}
.footer-links a:hover { color: #e8edf5; }
.footer-links a:hover::before { opacity: 1; transform: translateX(0); }

.footer-contact-item {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.footer-contact-item i {
  color: var(--accent);
  font-size: 0.85rem;
  width: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: #475569;
}
.footer-bottom .accent { color: var(--accent); }

/* =============================================
   SCROLL TO TOP
============================================= */
#scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #08101e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
  border: none;
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#scroll-top:hover { transform: translateY(-3px); }

/* =============================================
   NOISE TEXTURE OVERLAY
============================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* =============================================
   IMPROVED RESPONSIVE (Mobile Friendly & Fixed Footer)
============================================= */
@media (max-width: 1100px) {
  .faculties-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-img { height: 400px; }
}

@media (max-width: 860px) {
  section { padding: 60px 0; }
  .vm-wrap { grid-template-columns: 1fr; gap: 40px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .section-title { font-size: 2.2rem; }
  .hero-h1 { font-size: 2.5rem; }
  .about-img { height: 300px; }
  .accreditation-box::before { font-size: 3.5rem; top: -5px; }
}

@media (max-width: 950px) {
  /* Hides the top navbar toggle on ALL pages for mobile */
  .desktop-toggle,
  .theme-toggle-desktop { 
    display: none !important; 
  }
  
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .faculties-grid { grid-template-columns: 1fr; }
  
  /* --- Mobile Hero Adjustments --- */
  .hero-content { padding: 30px 20px; width: 95%; }
  .hero-h1 { font-size: 1.8rem; line-height: 1.3; }
  .hero-sub { font-size: 0.95rem; margin-bottom: 30px; }
  .hero-btns { flex-direction: column; width: 100%; gap: 12px; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .section-title { font-size: 1.8rem; margin-bottom: 15px; }
  
  /* --- Mobile Tabs & Forms --- */
  .tabs { flex-wrap: wrap; justify-content: center; border-bottom: none; gap: 10px;}
  .tab-btn { padding: 10px; font-size: 0.85rem; border-bottom: 1px solid var(--glass-border); width: 100%;}
  .tab-btn::after { bottom: -1px; }
  .contact-form-panel { padding: 30px 20px; }
  .vm-stats { flex-direction: row; flex-wrap: wrap; gap: 20px; justify-content: flex-start; }
  .vm-stat { flex: 1 1 40%; }

  .faculty-card .card-arrow {
    opacity: 1;
    transform: translateX(0);
  }

  /* ==========================================
     PREMIUM MOBILE FOOTER FIXES
  ========================================== */
  
  /* 1. Prevent button from covering D-KODE text */
  footer { 
    padding-bottom: 90px; 
  }
  
  #scroll-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  /* 2. Add breathing room between sections */
  .footer-grid { 
    grid-template-columns: 1fr; 
    gap: 50px; 
    text-align: center; 
  }
  
  /* 3. Center the brand description and limit logo size */
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-logo-img {
     max-height: 75px; 
     margin-bottom: 20px;
  }
  .footer-brand p { 
    margin-left: auto; 
    margin-right: auto;
    line-height: 1.8;
  }
  
  /* 4. Center links and contact icons perfectly */
  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-socials { justify-content: center; margin-top: 15px; }
  .footer-links { align-items: center; gap: 16px; }
  .footer-contact-item { justify-content: center; width: 100%; }
  
  /* 5. Fix the awkward Accreditation dash */
  .footer-col .section-label { justify-content: center; width: 100%; }
  .footer-col .section-label span { display: none; } 

  /* 6. Clean up the bottom copyright spacing */
  .footer-bottom { 
    flex-direction: column; 
    justify-content: center; 
    text-align: center; 
    gap: 16px;
    padding-top: 30px;
  }
  .footer-bottom p {
    line-height: 1.6;
  }
}
/* =============================================
   SUB-PAGE HERO (For About, Gallery, etc.)
============================================= */
.sub-hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 72px; /* Accounts for the navbar */
  background: var(--bg-primary); 
}

.sub-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-hero-content .hero-h1 {
  text-align: center;
  margin: 0 auto;
}

/* =============================================
   DYNAMIC FACULTY PAGE LAYOUT
============================================= */
.faculty-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  align-items: start;
}

.faculty-nav-sidebar {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  position: sticky;
  top: 100px; /* Keeps it on screen when scrolling down */
  overflow: hidden;
}

.faculty-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 16px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faculty-nav-btn i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: color var(--transition);
}

.faculty-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.faculty-nav-btn.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
}

.faculty-panel {
  display: none; /* Hidden by default */
  padding: 48px;
  animation: fadeInTab 0.5s ease;
}

.faculty-panel.active {
  display: block; /* Shown when active */
}

.faculty-panel img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 36px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.faculty-panel h2 {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.faculty-panel p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.faculty-panel h4 {
  font-family: 'DM Sans', sans-serif;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.faculty-panel ul {
  list-style-type: disc;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faculty-panel li {
  margin-bottom: 10px;
}

.faculty-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
  margin-bottom: 30px;
}
.faculty-quote {
  border-left: 3px solid var(--accent);
  padding: 10px 0 10px 24px;
  margin: 40px 0;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  border-radius: 0 12px 12px 0;
}
.faculty-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.faculty-quote span {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
@media (max-width: 768px) {
  .faculty-info-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* =============================================
   MOBILE FIXES FOR FACULTY PAGE
============================================= */
@media (max-width: 860px) {
 /* ==========================================
     MOBILE FACULTY LAYOUT (STACKED SCROLL)
  ========================================== */
  .faculty-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  /* 1. Hide the sliding tab menu entirely on mobile */
  .faculty-nav-sidebar {
    display: none;
  }
  
  /* 2. Force ALL faculty panels to show and stack them */
  .faculty-panel { 
    display: block !important; 
    padding: 40px 20px; 
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0; /* Makes it look cleaner stacked */
    box-shadow: none; /* Removes overlapping shadows */
    background: transparent;
  }
  
  /* Remove the line under the very last faculty */
  .faculty-panel:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  /* 3. Adjust images and text for mobile readability */
  .faculty-panel img { 
    height: 250px; 
    margin-bottom: 24px;
    border-radius: 12px;
  }
  .faculty-panel h2 {
    font-size: 2rem;
  }
  .faculty-quote {
    margin: 24px 0;
    padding: 10px 0 10px 16px;
  }
  .faculty-quote p { 
    font-size: 1.15rem; 
  }
  
  /* 3. Adjust the buttons for horizontal scrolling */
  .faculty-nav-btn {
    flex: 0 0 auto;
    border-left: none;
    border-bottom: 3px solid transparent;
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 12px 20px;
  }
  .faculty-nav-btn.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
    background: linear-gradient(0deg, var(--accent-glow) 0%, transparent 100%);
  }
  
  /* 4. Fix panel spacing, images, and text sizing for phones */
  .faculty-panel { 
    padding: 30px 20px; 
  }
  .faculty-panel img { 
    height: 220px; 
    margin-bottom: 24px;
  }
  .faculty-panel h2 {
    font-size: 1.8rem;
  }
  .faculty-quote {
    margin: 24px 0;
    padding: 10px 0 10px 16px;
  }
  .faculty-quote p { 
    font-size: 1.15rem; 
  }
}

/* =============================================
   FULL PAGE GALLERY GRID & LIGHTBOX
============================================= */
.full-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.gallery-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--bg-secondary);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-photo:hover img {
  transform: scale(1.08);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: #f8fafc;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-overlay i {
  color: var(--accent);
  margin-right: 10px;
  font-size: 1.2rem;
}

.gallery-photo:hover .photo-overlay {
  opacity: 1;
}

/* --- The Lightbox Overlay --- */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border: 1px solid var(--glass-border);
}

.lightbox-caption {
  margin: 20px auto;
  text-align: center;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* Mobile Gallery Fix */
@media (max-width: 640px) {
  .full-gallery-grid {
    grid-template-columns: 1fr; /* 1 column on phones */
  }
  .lightbox-close {
    top: 15px;
    right: 25px;
  }
  .gallery-photo {
    aspect-ratio: auto;
    height: 250px;
  }
}

/* =============================================
   HOME GALLERY SLIDER ARROWS & WRAPPER
============================================= */
.gallery-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all var(--transition);
}

.gallery-arrow:hover {
  background: var(--accent);
  color: #08101e;
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* Position them slightly overlapping the edges */
.left-arrow { left: 2%; }
.right-arrow { right: 2%; }

/* Hide arrows on mobile because users will swipe natively */
@media (max-width: 860px) {
  .gallery-arrow { display: none; }
}