/* CSS Custom Properties & Base Styles */
:root {
  /* Vibrant & Modern Palette */
  --bg-color: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --border-color: #e2e8f0;
  
  /* Hero Gradient Colors */
  --hero-grad-1: #3b82f6;
  --hero-grad-2: #8b5cf6;
  --hero-grad-3: #ec4899;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #60a5fa;
  --accent-hover: #93c5fd;
  --nav-bg: rgba(15, 23, 42, 0.85);
  --border-color: #334155;
  
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* ================== Navigation ================== */
.navigation {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  justify-self: start;
}

.main-nav {
  justify-self: center;
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--hero-grad-1), var(--hero-grad-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

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

.nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--accent-color);
  transition: var(--transition);
}

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

.nav-menu a.active {
  color: var(--accent-color);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
  background: var(--border-color);
}

[data-theme="dark"] .dark-icon { display: none; }
[data-theme="dark"] .light-icon { display: inline-block; color: #fbbf24; }
:root:not([data-theme="dark"]) .light-icon { display: none; }
:root:not([data-theme="dark"]) .dark-icon { display: inline-block; color: #1e293b; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* ================== Hero Cover ================== */
.site-header-container {
  margin-top: 70px;
  height: 60vh;
  min-height: 400px;
  background: linear-gradient(120deg, var(--hero-grad-1), var(--hero-grad-2), var(--hero-grad-3));
  background-size: 200% 200%;
  animation: gradientFlow 10s ease infinite;
  position: relative;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.site-header {
  color: white;
  animation: slideUp 1s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-header .title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.site-header .subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ================== Main Content ================== */
.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section {
  display: none;
  margin-bottom: 5rem;
}

.section.active-tab {
  display: block;
  animation: fadeInTab 0.5s ease-out forwards;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  display: inline-block;
  color: var(--text-primary);
}

.profile-image.right {
  float: right;
  margin: 0 0 2rem 2rem;
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  border: 4px solid var(--bg-color);
  transition: transform 0.4s ease;
}

.profile-image.right:hover {
  transform: translateY(-10px) rotate(2deg);
}

.bio-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.personal-quote {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent-color);
  border-left: 4px solid var(--accent-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  background: var(--glass-bg);
  padding: 1rem 1.5rem;
  border-radius: 0 10px 10px 0;
}

/* ================== Timeline Lists ================== */
.timeline-list {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--border-color);
}

.timeline-list li {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 3px solid var(--bg-color);
  box-shadow: 0 0 0 2px var(--accent-color);
  transition: var(--transition);
}

.timeline-list li:hover::before {
  transform: scale(1.3);
}

.timeline-content h4 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-content .institution {
  font-weight: 500;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.timeline-content .institution span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.9rem;
}

/* ================== Styled Lists ================== */
.styled-list {
  list-style: none;
  margin-bottom: 2rem;
}

.styled-list li {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.styled-list li:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow);
  border-color: var(--accent-hover);
}

.styled-list a {
  color: var(--text-primary);
  display: block;
}

.styled-list a:hover {
  color: var(--accent-color);
}

/* ================== Grids & Cards ================== */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border-color: var(--accent-color);
}

.glass-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.glass-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.glass-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ================== News List ================== */
.news-list {
  list-style: none;
}

.news-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-color);
}

.news-list li:last-child {
  border-bottom: none;
}

.news-year {
  font-weight: 600;
  color: var(--accent-color);
  margin-right: 0.5rem;
}

/* ================== Footer ================== */
.site-footer {
  background: #0f172a;
  color: #f8fafc;
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.site-footer .wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.footer-heading {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--hero-grad-1), var(--hero-grad-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.social-media-list {
  list-style: none;
}

.social-media-list li {
  margin-bottom: 0.75rem;
}

.social-media-list a {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-media-list a:hover {
  color: #60a5fa;
  transform: translateX(5px);
}

.site-signature .text {
  color: #94a3b8;
  max-width: 300px;
}

.site-copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 0.9rem;
}

/* Removed old fade-in as it's replaced by active-tab animation */

/* ================== Responsive ================== */
@media (max-width: 768px) {
  .nav-wrapper {
    grid-template-columns: 1fr auto;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.show {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .site-header .title {
    font-size: 2.5rem;
  }

  .profile-image.right {
    float: none;
    display: block;
    margin: 0 auto 2rem;
  }

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