/* ============================================================
   SAE Engineering — Modern 2026 Theme
   ============================================================ */

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #0a0d14;
  --bg2:       #0f1320;
  --bg3:       #151b2e;
  --surface:   rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.08);
  --accent:    #4f46e5;
  --accent2:   #7c3aed;
  --cyan:      #06b6d4;
  --green:     #10b981;
  --text:      #f1f5f9;
  --text-muted:#94a3b8;
  --glow:      0 0 60px rgba(79,70,229,0.3);
  --card-shadow: 0 4px 32px rgba(0,0,0,0.4);
  --radius:    16px;
  --radius-sm: 10px;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Animated mesh background ─────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(79,70,229,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(6,182,212,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ────────────────────────────────────────────── */
#navbar {
  background: rgba(10,13,20,0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 40px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

.navbar-brand {
  padding: 0 !important;
}

.navbar-brand img {
  height: 44px !important;
  width: auto;
  filter: brightness(1.1);
}

.navbar-nav .nav-link {
  color: var(--text-muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text) !important;
  background: var(--surface);
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero-section,
section.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79,70,229,0.15);
  border: 1px solid rgba(79,70,229,0.3);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1.hero-title,
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary,
a.button {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  box-shadow: 0 4px 20px rgba(79,70,229,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-primary:hover,
a.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79,70,229,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
  color: #fff !important;
  text-decoration: none;
}

.btn-secondary,
a.button-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover,
a.button-outline:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  color: #fff !important;
  text-decoration: none;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card,
.feature-card,
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before,
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.card:hover,
.feature-card:hover,
.service-card:hover {
  border-color: rgba(79,70,229,0.4);
  box-shadow: 0 8px 40px rgba(79,70,229,0.2), var(--card-shadow);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79,70,229,0.2), rgba(124,58,237,0.2));
  border: 1px solid rgba(79,70,229,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

/* ── Section Titles ────────────────────────────────────────── */
.section-label {
  display: inline-block;
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

/* Section headings with gradient underline */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
}

/* ── Stat Counters ─────────────────────────────────────────── */
.stat-block {
  text-align: center;
  padding: 1.5rem;
}
.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Main content area ─────────────────────────────────────── */
#body-wrapper,
.section-wrapper {
  position: relative;
  z-index: 1;
}

main.section-wrapper {
  padding: 80px 0;
}

/* ── Content blocks ────────────────────────────────────────── */
.content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.content a {
  color: #a5b4fc;
  text-decoration: none;
  border-bottom: 1px solid rgba(165,180,252,0.3);
  transition: all 0.2s;
}
.content a:hover {
  color: #c7d2fe;
  border-bottom-color: #c7d2fe;
}

/* ── Portal Grid ───────────────────────────────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text) !important;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.portal-card:hover {
  border-color: rgba(79,70,229,0.5);
  background: rgba(79,70,229,0.12);
  box-shadow: 0 4px 24px rgba(79,70,229,0.25);
  transform: translateY(-3px);
  text-decoration: none;
  color: #fff !important;
}

.portal-card-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(79,70,229,0.4));
}

.portal-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.portal-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.portal-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4f46e5;
  padding: 0.4rem 0.8rem;
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.2);
  border-radius: 6px;
  margin: 1.5rem 0 0.75rem;
  display: inline-block;
}

/* ── Dividers ──────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Tags / Badges ─────────────────────────────────────────── */
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(79,70,229,0.2);
  color: #a5b4fc;
  border: 1px solid rgba(79,70,229,0.3);
}

/* ── Login Page ────────────────────────────────────────────── */
.login-wrapper,
#login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 2rem;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(24px);
  box-shadow: var(--card-shadow), 0 0 80px rgba(79,70,229,0.15);
}

/* SSO Button */
button[name="oauth2"],
.form-oauth2 button {
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin: 0.5rem 0;
  border: 1px solid rgba(79,70,229,0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(79,70,229,0.35);
}

button[name="oauth2"]:hover,
.form-oauth2 button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,70,229,0.55);
}

.form-oauth2 .oauth2-or {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-oauth2 .oauth2-or .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Forms ─────────────────────────────────────────────────── */
input, textarea, select {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  width: 100%;
  transition: all 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.2) !important;
}

label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  display: block;
}

/* ── Footer ────────────────────────────────────────────────── */
#footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  color: var(--text-muted);
}

#footer a { color: var(--text-muted); transition: color 0.2s; }
#footer a:hover { color: var(--text); }

/* ── AOS Animation defaults ────────────────────────────────── */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Selection ─────────────────────────────────────────────── */
::selection {
  background: rgba(79,70,229,0.4);
  color: #fff;
}

/* ── Grav content blocks ───────────────────────────────────── */
.notices.yellow { background: rgba(250,204,21,0.1); border-color: rgba(250,204,21,0.3); }
.notices.red    { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3); }
.notices.blue   { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); }
.notices.green  { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .portal-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hero-title  { font-size: 2.2rem; }
  main.section-wrapper { padding: 48px 0; }
}

/* ── Floating particles (hero decor) ──────────────────────── */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float-glow 8s ease-in-out infinite;
}
.hero-glow-1 {
  width: 400px; height: 400px;
  background: rgba(79,70,229,0.2);
  top: -100px; right: 10%;
  animation-delay: 0s;
}
.hero-glow-2 {
  width: 300px; height: 300px;
  background: rgba(6,182,212,0.15);
  bottom: 0; right: 30%;
  animation-delay: -3s;
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Grid utility classes ──────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
