@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #c52227; /* Laurence Crimson Red */
  --primary-hover: #a01a1f;
  --primary-light: rgba(197, 34, 39, 0.18);
  --navy-dark: #070d19; /* Deep Navy */
  --navy-surface: #0f172a;
  --navy-card: #1e293b;
  --navy-glass: rgba(15, 23, 42, 0.85);
  --bg-main: var(--navy-dark);
  --bg-surface: var(--navy-surface);
  --bg-card: var(--navy-card);
  --bg-glass: var(--navy-glass);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(197, 34, 39, 0.25);
  --border-glow: rgba(197, 34, 39, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-3d: 0 20px 35px -10px rgba(0, 0, 0, 0.6), 0 10px 15px -5px rgba(197, 34, 39, 0.25);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: rgba(197, 34, 39, 0.18);
  --shadow-3d: 0 15px 30px -10px rgba(15, 23, 42, 0.12), 0 8px 12px -6px rgba(197, 34, 39, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  perspective: 1200px; /* 3D Scene Perspective */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  line-height: 1.2;
}

/* Glassmorphism & 3D Utility Classes */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 3D Dynamic Tilt Card Effect */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

.tilt-card:hover {
  transform: translateY(-8px) rotateX(3deg) rotateY(-2deg) scale(1.015);
  border-color: var(--primary);
  box-shadow: var(--shadow-3d), 0 0 25px rgba(197, 34, 39, 0.3);
}

.tilt-card-inner {
  transform: translateZ(30px); /* 3D Element Pop-out */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
}

.btn-apply {
  background: linear-gradient(135deg, #c52227, #e11d48);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(197, 34, 39, 0.45);
  position: relative;
  overflow: hidden;
}

.btn-apply::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.6s;
}

.btn-apply:hover::before {
  left: 100%;
}

.btn-apply:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(197, 34, 39, 0.6);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(197, 34, 39, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.badge-primary {
  background-color: var(--primary-light);
  color: #f87171;
  border: 1px solid rgba(197, 34, 39, 0.4);
}

.badge-navy {
  background: rgba(15, 23, 42, 0.9);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

/* Header Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.06) rotate(-2deg);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #ef4444);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

/* Announcement Ticker Bar */
.announcement-bar {
  background: linear-gradient(90deg, #7f1d1d, #c52227, #0f172a);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.ticker-tag {
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.2);
}

.ticker-text {
  white-space: nowrap;
  animation: scrollTicker 25s linear infinite;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

@keyframes scrollTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Hero Section with 3D Depth */
.hero-section {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: brightness(0.6) contrast(1.1);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-title {
  font-size: 3.8rem;
  letter-spacing: -0.02em;
  margin: 1.25rem 0;
  text-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.hero-title span {
  background: linear-gradient(135deg, #ef4444, #f87171);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 640px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-card {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateZ(20px) translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(197, 34, 39, 0.25);
}

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: #ef4444;
  font-family: 'Outfit', sans-serif;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero 3D Card Widget */
.hero-card-widget {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-3d);
  transform-style: preserve-3d;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.principal-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 6px 15px rgba(197, 34, 39, 0.4);
}

/* 1994x743 HIGHLIGHT PICTURE BANNER SECTION */
.highlight-section {
  padding: 4rem 0;
}

.highlight-banner-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1994 / 743; /* Exact 1994x743 ratio */
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-glow);
  box-shadow: var(--shadow-3d), 0 0 35px rgba(197, 34, 39, 0.3);
  transform-style: preserve-3d;
  transition: var(--transition);
}

.highlight-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.highlight-banner-container:hover .highlight-banner-img {
  transform: scale(1.04);
}

.highlight-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 13, 25, 0.92) 0%, rgba(7, 13, 25, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  transform: translateZ(40px);
}

.highlight-size-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* Section Common Styles */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-size: 2.5rem;
  margin: 0.6rem 0 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.75rem;
}

.tab-btn {
  padding: 0.55rem 1.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(197, 34, 39, 0.4);
}

/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.25rem;
}

.event-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.event-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.event-card:hover .event-img {
  transform: scale(1.07);
}

.event-date-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(7, 13, 25, 0.9);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  text-align: center;
  color: #fff;
  border: 1px solid var(--primary);
}

.event-date-day {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.event-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #ef4444;
  font-weight: 800;
}

.event-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-title {
  font-size: 1.25rem;
  margin: 0.5rem 0 0.75rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.event-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.75rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 270px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 13, 25, 0.92), transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-size: 1.15rem;
  color: #ffffff;
}

/* News Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2.25rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.news-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.news-content {
  padding: 1.75rem;
}

/* Faculty Directory Cards */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.faculty-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.75rem;
  text-align: center;
}

.faculty-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--primary);
  box-shadow: 0 6px 15px rgba(197, 34, 39, 0.3);
}

.faculty-name {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.faculty-role {
  color: #ef4444;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Contact & Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  box-shadow: var(--shadow-3d);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 25, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--shadow-3d);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* CMS Overlay */
.cms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 25, 0.96);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  overflow: hidden;
}

.cms-sidebar {
  width: 290px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
}

.cms-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.cms-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.4rem;
}

.cms-nav-item:hover, .cms-nav-item.active {
  background-color: var(--primary-light);
  color: #ef4444;
}

.cms-main-content {
  flex-grow: 1;
  padding: 3rem;
  overflow-y: auto;
  background: var(--bg-main);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
}

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

.admin-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 800;
}

.thumb-preview {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3d);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cms-modal-backdrop { flex-direction: column; }
  .cms-sidebar { width: 100%; height: auto; }
  .hero-title { font-size: 2.8rem; }
}

@media (max-width: 640px) {
  .nav-menu { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
