/* ==========================================================================
   Dr. Monssif NAJIM - Premium CSS Design System
   Academic Homepage for Energy Systems & Applied Thermofluid Sciences
   ========================================================================== */

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

/* Reset and Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

:root {
  /* HSL Color Tokens */
  --bg-primary-light: hsl(210, 30%, 98%);
  --bg-secondary-light: hsl(210, 25%, 94%);
  --bg-glass-light: rgba(255, 255, 255, 0.7);
  --border-light: rgba(0, 0, 0, 0.08);
  --text-primary-light: hsl(210, 45%, 12%);
  --text-secondary-light: hsl(210, 20%, 40%);
  --shadow-light: 0 10px 30px -10px rgba(12, 201, 217, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);

  --bg-primary-dark: hsl(220, 30%, 5%);
  --bg-secondary-dark: hsl(220, 25%, 9%);
  --bg-glass-dark: rgba(10, 15, 26, 0.75);
  --border-dark: rgba(255, 255, 255, 0.07);
  --text-primary-dark: hsl(210, 25%, 96%);
  --text-secondary-dark: hsl(210, 15%, 72%);
  --shadow-dark: 0 15px 40px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(12, 201, 217, 0.03);

  /* Shared Styling Accents */
  --accent-cool: hsl(185, 90%, 42%);     /* Convection Cyan */
  --accent-cool-glow: hsla(185, 90%, 42%, 0.35);
  --accent-hot: hsl(22, 95%, 52%);       /* Thermal Orange */
  --accent-hot-glow: hsla(22, 95%, 52%, 0.35);
  --accent-green: hsl(145, 60%, 42%);    /* Sustainable Green */
  --accent-green-glow: hsla(145, 60%, 42%, 0.25);
  
  /* Font Stacks */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Standardized Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-snappy: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Theme Switching Variables Map */
body {
  background-color: var(--bg-primary-light);
  color: var(--text-primary-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition-smooth);
  transition-property: background-color, color, border-color;
}

body.dark-theme {
  background-color: var(--bg-primary-dark);
  color: var(--text-primary-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary-light);
}
body.dark-theme ::-webkit-scrollbar-track {
  background: var(--bg-primary-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary-light);
  border-radius: 5px;
}
body.dark-theme ::-webkit-scrollbar-thumb {
  background: var(--bg-secondary-dark);
  border: 2px solid var(--bg-primary-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cool);
}

/* Semantic Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-light);
}
body.dark-theme .section {
  border-bottom: 1px solid var(--border-dark);
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cool);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
  position: relative;
}

.section-title {
  font-size: 2.2rem;
  color: var(--text-primary-light);
  position: relative;
}
body.dark-theme .section-title {
  color: var(--text-primary-dark);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.header--sticky {
  background-color: var(--bg-glass-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

body.dark-theme .header--sticky {
  background-color: var(--bg-glass-dark);
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
body.dark-theme .nav__logo {
  color: var(--text-primary-dark);
}

.nav__logo span {
  color: var(--accent-cool);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  position: relative;
  padding: 0.5rem 0;
}
body.dark-theme .nav__link {
  color: var(--text-secondary-dark);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cool), var(--accent-hot));
  transition: var(--transition-snappy);
  border-radius: 2px;
}

.nav__link:hover {
  color: var(--text-primary-light);
}
body.dark-theme .nav__link:hover {
  color: var(--text-primary-dark);
}

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

.nav__link--active {
  color: var(--accent-cool) !important;
  font-weight: 600;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  transition: var(--transition-snappy);
}
body.dark-theme .theme-toggle-btn {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: none;
}

.burger span {
  display: block;
  width: 25px;
  height: 2.5px;
  background-color: var(--text-primary-light);
  transition: var(--transition-snappy);
}
body.dark-theme .burger span {
  background-color: var(--text-primary-dark);
}

/* ==========================================================================
   Hero Section & Canvas Simulation
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 6rem;
  background-color: var(--bg-primary-light);
  transition: var(--transition-smooth);
}
body.dark-theme .hero {
  background-color: var(--bg-primary-dark);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, hsla(185, 90%, 42%, 0.1), hsla(22, 95%, 52%, 0.05));
  border: 1px solid rgba(12, 201, 217, 0.2);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cool);
  margin-bottom: 1.5rem;
}
body.dark-theme .hero__badge {
  background: linear-gradient(135deg, hsla(185, 90%, 42%, 0.15), hsla(22, 95%, 52%, 0.08));
}

.hero__title {
  font-size: 3.8rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary-light) 40%, var(--accent-cool));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.dark-theme .hero__title {
  background: linear-gradient(135deg, var(--text-primary-dark) 45%, var(--accent-cool));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary-light);
  margin-bottom: 1.5rem;
  max-width: 90%;
}
body.dark-theme .hero__subtitle {
  color: var(--text-primary-dark);
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-secondary-light);
  margin-bottom: 2.5rem;
  max-width: 85%;
}
body.dark-theme .hero__desc {
  color: var(--text-secondary-dark);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-cool), var(--accent-hot));
  color: white;
  border: none;
  box-shadow: 0 10px 25px -8px rgba(12, 201, 217, 0.4);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(12, 201, 217, 0.6);
}

.btn--secondary {
  background-color: var(--bg-secondary-light);
  color: var(--text-primary-light);
  border: 1px solid var(--border-light);
}
body.dark-theme .btn--secondary {
  background-color: var(--bg-secondary-dark);
  color: var(--text-primary-dark);
  border: 1px solid var(--border-dark);
}

.btn--secondary:hover {
  background-color: var(--border-light);
  transform: translateY(-2px);
}
body.dark-theme .btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Profile Photo Frame (Ultra premium glassmorphic border) */
.profile-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  justify-self: center;
  aspect-ratio: 3 / 4; /* Vertical portrait card ratio */
}

.profile-container__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--accent-cool), var(--accent-hot));
  filter: blur(40px);
  opacity: 0.15;
  border-radius: 30px;
  z-index: 1;
  transition: var(--transition-smooth);
}

.profile-container__card {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background-color: var(--bg-glass-light);
  border: 1.5px solid var(--border-light);
  padding: 1rem;
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}
body.dark-theme .profile-container__card {
  background-color: var(--bg-glass-dark);
  border: 1.5px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.profile-container__img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  object-position: center top; /* Focuses crop on the top of the photo to keep head visible */
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-svg-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(135deg, hsl(210, 20%, 94%), hsl(210, 20%, 88%));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary-light);
  transition: var(--transition-smooth);
}
body.dark-theme .profile-svg-placeholder {
  background: linear-gradient(135deg, hsl(220, 25%, 8%), hsl(220, 25%, 15%));
  color: var(--text-secondary-dark);
}

.profile-svg-placeholder svg {
  width: 4.5rem;
  height: 4.5rem;
  fill: currentColor;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.profile-svg-placeholder span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.profile-container:hover .profile-container__card {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--accent-cool);
}

.profile-container:hover .profile-container__glow {
  opacity: 0.35;
  filter: blur(50px);
}

/* ==========================================================================
   About & Core Credentials
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-secondary-light);
}
body.dark-theme .about__text {
  color: var(--text-secondary-dark);
}

.about__paragraph {
  margin-bottom: 1.5rem;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-item {
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition-snappy);
}
body.dark-theme .stat-item {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cool);
}

.stat-item__num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-cool);
  font-family: var(--font-display);
  margin-bottom: 0.2rem;
}

.stat-item__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary-light);
}
body.dark-theme .stat-item__label {
  color: var(--text-secondary-dark);
}

.about__interests {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.interests-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.interest-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  transition: var(--transition-snappy);
}
body.dark-theme .interest-card {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.interest-card:hover {
  border-color: var(--accent-cool);
  background-color: var(--bg-primary-light);
}
body.dark-theme .interest-card:hover {
  background-color: var(--bg-primary-dark);
}

.interest-card__icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background-color: hsla(185, 90%, 42%, 0.1);
  color: var(--accent-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.interest-card__name {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31px;
  width: 2px;
  background-color: var(--border-light);
}
body.dark-theme .timeline::before {
  background-color: var(--border-dark);
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
  padding-left: 5rem;
  transition: var(--transition-smooth);
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-primary-light);
  border: 4px solid var(--border-light);
  z-index: 2;
  transition: var(--transition-snappy);
}
body.dark-theme .timeline-dot {
  background-color: var(--bg-primary-dark);
  border: 4px solid var(--border-dark);
}

.timeline-item:hover .timeline-dot {
  border-color: var(--accent-cool);
  background-color: var(--accent-cool);
  box-shadow: 0 0 12px var(--accent-cool);
}

.timeline-content {
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}
body.dark-theme .timeline-content {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.timeline-content:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cool);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cool);
  background-color: hsla(185, 90%, 42%, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.timeline-inst {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary-light);
}
body.dark-theme .timeline-inst {
  color: var(--text-secondary-dark);
}

.timeline-list {
  padding-left: 1.2rem;
}

.timeline-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  position: relative;
  list-style-type: square;
}
.timeline-list li::marker {
  color: var(--accent-cool);
}

/* ==========================================================================
   Education & Professional Credentials
   ========================================================================== */
.edu-sec-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.edu-card {
  display: flex;
  gap: 1.5rem;
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
}
body.dark-theme .edu-card {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.edu-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-cool);
}

.edu-card__badge {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, hsla(185, 90%, 42%, 0.15), hsla(22, 95%, 52%, 0.05));
  color: var(--accent-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.edu-card__info {
  display: flex;
  flex-direction: column;
}

.edu-card__year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-cool);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.edu-card__degree {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.edu-card__school {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  margin-bottom: 0.5rem;
}
body.dark-theme .edu-card__school {
  color: var(--text-secondary-dark);
}

.edu-card__details {
  font-size: 0.88rem;
  color: var(--text-secondary-light);
  border-top: 1px solid var(--border-light);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
body.dark-theme .edu-card__details {
  color: var(--text-secondary-dark);
  border-top: 1px solid var(--border-dark);
}

.edu-card__details strong {
  color: var(--text-primary-light);
}
body.dark-theme .edu-card__details strong {
  color: var(--text-primary-dark);
}

/* Certifications Layout */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
}
body.dark-theme .cert-card {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-hot);
}

.cert-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: hsla(22, 95%, 52%, 0.1);
  color: var(--accent-hot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.cert-card__info {
  display: flex;
  flex-direction: column;
}

.cert-card__year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-hot);
  margin-bottom: 0.1rem;
}

.cert-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cert-card__issuer {
  font-size: 0.85rem;
  color: var(--text-secondary-light);
}
body.dark-theme .cert-card__issuer {
  color: var(--text-secondary-dark);
}

/* ==========================================================================
   Teaching Portfolio (Taught Modules)
   ========================================================================== */
.teaching-tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.teaching-tab {
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  color: var(--text-secondary-light);
  padding: 0.75rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-snappy);
}
body.dark-theme .teaching-tab {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
}

.teaching-tab:hover {
  border-color: var(--accent-cool);
  color: var(--text-primary-light);
}
body.dark-theme .teaching-tab:hover {
  color: var(--text-primary-dark);
}

.teaching-tab--active {
  background: linear-gradient(135deg, var(--accent-cool), hsla(185, 90%, 42%, 0.75));
  border-color: var(--accent-cool) !important;
  color: white !important;
  box-shadow: var(--shadow-glow);
}

.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.course-card {
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
body.dark-theme .course-card {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.course-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cool);
}

.course-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.course-card__code {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cool);
  background-color: hsla(185, 90%, 42%, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.course-card__icon {
  font-size: 1.15rem;
  color: var(--text-secondary-light);
  opacity: 0.5;
}
body.dark-theme .course-card__icon {
  color: var(--text-secondary-dark);
}

.course-card__title {
  font-size: 1.18rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.course-card__type {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-hot);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.course-card__details {
  font-size: 0.9rem;
  color: var(--text-secondary-light);
  flex-grow: 1;
}
body.dark-theme .course-card__details {
  color: var(--text-secondary-dark);
}

/* ==========================================================================
   Publications (Dynamic Bibliography)
   ========================================================================== */
.pub-dashboard {
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3.5rem;
}
body.dark-theme .pub-dashboard {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.pub-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-search-wrap {
  position: relative;
  width: 100%;
}

.pub-search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary-light);
  font-size: 1.1rem;
}
body.dark-theme .pub-search-icon {
  color: var(--text-secondary-dark);
}

.pub-search-input {
  width: 100%;
  background-color: var(--bg-primary-light);
  border: 1.5px solid var(--border-light);
  color: var(--text-primary-light);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 1rem 1.2rem 1rem 3rem;
  border-radius: 12px;
  outline: none;
  transition: var(--transition-snappy);
}
body.dark-theme .pub-search-input {
  background-color: var(--bg-primary-dark);
  border: 1.5px solid var(--border-dark);
  color: var(--text-primary-dark);
}

.pub-search-input:focus {
  border-color: var(--accent-cool);
  box-shadow: 0 0 15px rgba(12, 201, 217, 0.15);
}

/* Horizontal Filters list */
.pub-filters-list {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pub-filters-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary-light);
  margin-right: 0.5rem;
}
body.dark-theme .pub-filters-label {
  color: var(--text-secondary-dark);
}

.pub-filter-btn {
  background-color: var(--bg-primary-light);
  border: 1px solid var(--border-light);
  color: var(--text-secondary-light);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-snappy);
}
body.dark-theme .pub-filter-btn {
  background-color: var(--bg-primary-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
}

.pub-filter-btn:hover {
  border-color: var(--accent-cool);
  color: var(--text-primary-light);
}
body.dark-theme .pub-filter-btn:hover {
  color: var(--text-primary-dark);
}

.pub-filter-btn--active {
  background-color: var(--accent-cool);
  border-color: var(--accent-cool) !important;
  color: white !important;
}

/* Pub tabs (Books vs Journals) */
.pub-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 2rem;
  gap: 2rem;
}
body.dark-theme .pub-tabs {
  border-bottom: 2px solid var(--border-dark);
}

.pub-tab {
  background: none;
  border: none;
  color: var(--text-secondary-light);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.8rem 0;
  cursor: pointer;
  position: relative;
  transition: var(--transition-snappy);
}
body.dark-theme .pub-tab {
  color: var(--text-secondary-dark);
}

.pub-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-cool);
  transition: var(--transition-snappy);
}

.pub-tab:hover {
  color: var(--text-primary-light);
}
body.dark-theme .pub-tab:hover {
  color: var(--text-primary-dark);
}

.pub-tab--active {
  color: var(--accent-cool) !important;
}

.pub-tab--active::after {
  width: 100%;
}

/* Visible publications count indicator */
.publications-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary-light);
  font-weight: 500;
}
body.dark-theme .publications-meta-bar {
  color: var(--text-secondary-dark);
}

/* Publications Grid */
.pub-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-card {
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
}
body.dark-theme .pub-card {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.pub-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cool);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}
body.dark-theme .pub-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.pub-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.pub-card__badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
}

.pub-card__badge--journal {
  background-color: hsla(185, 90%, 42%, 0.1);
  color: var(--accent-cool);
}

.pub-card__badge--book,
.pub-card__badge--chapter {
  background-color: hsla(22, 95%, 52%, 0.1);
  color: var(--accent-hot);
}

.pub-card__tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
body.dark-theme .pub-card__tag {
  color: var(--text-secondary-dark);
}

.pub-card__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary-light);
  margin-left: auto;
}
body.dark-theme .pub-card__year {
  color: var(--text-secondary-dark);
}

.pub-card__title {
  font-size: 1.22rem;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  color: var(--text-primary-light);
}
body.dark-theme .pub-card__title {
  color: var(--text-primary-dark);
}

.pub-card__authors {
  font-size: 0.92rem;
  color: var(--text-secondary-light);
  margin-bottom: 0.5rem;
}
body.dark-theme .pub-card__authors {
  color: var(--text-secondary-dark);
}

.pub-card__authors strong {
  color: var(--text-primary-light);
  font-weight: 600;
}
body.dark-theme .pub-card__authors strong {
  color: var(--text-primary-dark);
}

.pub-card__source {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-secondary-light);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
body.dark-theme .pub-card__source {
  color: var(--text-secondary-dark);
}

.pub-card__footer {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  display: flex;
}
body.dark-theme .pub-card__footer {
  border-top: 1px solid var(--border-dark);
}

.pub-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cool);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pub-card__link:hover {
  color: var(--accent-hot);
}

.pub-card__link--disabled {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.7;
}
body.dark-theme .pub-card__link--disabled {
  color: var(--text-secondary-dark);
}

.pub-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.pub-empty__icon {
  font-size: 3rem;
  color: var(--text-secondary-light);
  opacity: 0.3;
  margin-bottom: 1rem;
}
body.dark-theme .pub-empty__icon {
  color: var(--text-secondary-dark);
}

.pub-empty__text {
  color: var(--text-secondary-light);
}
body.dark-theme .pub-empty__text {
  color: var(--text-secondary-dark);
}

/* Load More Container */
.pub-load-more-wrap {
  text-align: center;
  margin-top: 3rem;
}

/* ==========================================================================
   Academic Committees & Leadership
   ========================================================================== */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.committee-card {
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
body.dark-theme .committee-card {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.committee-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cool);
}

.committee-card__year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-cool);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.committee-card__role {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.committee-card__conf {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-primary-light);
}
body.dark-theme .committee-card__conf {
  color: var(--text-primary-dark);
}

.committee-card__loc {
  font-size: 0.85rem;
  color: var(--text-secondary-light);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
body.dark-theme .committee-card__loc {
  color: var(--text-secondary-dark);
}

/* Technical Simulation & Programming Skills Tags */
.skills-sec {
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 4rem;
}
body.dark-theme .skills-sec {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-col-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skills-col-title i {
  color: var(--accent-cool);
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background-color: var(--bg-primary-light);
  border: 1px solid var(--border-light);
  color: var(--text-primary-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-snappy);
}
body.dark-theme .skill-tag {
  background-color: var(--bg-primary-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-primary-dark);
}

.skill-tag:hover {
  border-color: var(--accent-cool);
  transform: translateY(-2px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.2rem;
}

.contact-item__icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 10px;
  background-color: hsla(185, 90%, 42%, 0.1);
  color: var(--accent-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item__info {
  display: flex;
  flex-direction: column;
}

.contact-item__label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary-light);
  margin-bottom: 0.2rem;
}
body.dark-theme .contact-item__label {
  color: var(--text-secondary-dark);
}

.contact-item__val {
  font-size: 0.98rem;
  font-weight: 600;
}

.contact-socials {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  color: var(--text-secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-snappy);
}
body.dark-theme .social-link {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
}

.social-link:hover {
  background-color: var(--accent-cool);
  border-color: var(--accent-cool);
  color: white;
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
  background-color: var(--bg-glass-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.dark-theme .contact-form {
  background-color: var(--bg-glass-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary-light);
  margin-bottom: 0.5rem;
}
body.dark-theme .form-label {
  color: var(--text-secondary-dark);
}

.form-control {
  width: 100%;
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  color: var(--text-primary-light);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-snappy);
}
body.dark-theme .form-control {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-primary-dark);
}

.form-control:focus {
  border-color: var(--accent-cool);
  background-color: var(--bg-primary-light);
  box-shadow: 0 0 10px rgba(12, 201, 217, 0.1);
}
body.dark-theme .form-control:focus {
  background-color: var(--bg-primary-dark);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-secondary-light);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0;
  text-align: center;
}
body.dark-theme .footer {
  background-color: var(--bg-secondary-dark);
  border-top: 1px solid var(--border-dark);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary-light);
}
body.dark-theme .footer-logo {
  color: var(--text-primary-dark);
}

.footer-logo span {
  color: var(--accent-cool);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary-light);
  max-width: 600px;
}
body.dark-theme .footer-text {
  color: var(--text-secondary-dark);
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero__content {
    align-items: center;
  }
  
  .hero__title {
    font-size: 3rem;
  }
  
  .hero__subtitle {
    max-width: 100%;
  }
  
  .hero__desc {
    max-width: 100%;
  }
  
  .hero__actions {
    justify-content: center;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .edu-sec-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media screen and (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  
  .burger {
    display: flex;
    z-index: 1001;
  }
  
  .burger--active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  
  .burger--active span:nth-child(2) {
    opacity: 0;
  }
  
  .burger--active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  .nav__list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--bg-glass-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition-smooth);
    z-index: 1000;
  }
  
  body.dark-theme .nav__list {
    background-color: var(--bg-glass-dark);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  
  .nav__list--active {
    right: 0;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-dot {
    left: 9px;
  }
  
  .timeline-item {
    padding-left: 2.5rem;
  }
  
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .pub-dashboard {
    padding: 1.5rem;
  }
  
  .pub-filters-list {
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-primary-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 90%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-light);
}

body.dark-theme .modal-content {
  background-color: var(--bg-primary-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary-light);
  cursor: pointer;
  transition: var(--transition-snappy);
  z-index: 10;
}

body.dark-theme .modal-close {
  color: var(--text-secondary-dark);
}

.modal-close:hover {
  color: var(--accent-hot);
  transform: rotate(90deg);
}

.modal-header {
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

body.dark-theme .modal-header {
  border-bottom: 1px solid var(--border-dark);
}

.modal-body {
  padding: 2.5rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.modal-free-version, .modal-pro-version {
  background-color: var(--bg-secondary-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

body.dark-theme .modal-free-version,
body.dark-theme .modal-pro-version {
  background-color: var(--bg-secondary-dark);
  border: 1px solid var(--border-dark);
}

.modal-pro-version {
  border-color: var(--accent-hot);
  position: relative;
  overflow: hidden;
}

.modal-pro-version::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-hot), #ff9a44);
}

.badge-premium {
  font-size: 0.7rem;
  background: linear-gradient(135deg, var(--accent-hot), #ff9a44);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  vertical-align: middle;
  margin-left: 0.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.pro-features-list {
  list-style: none;
  margin-top: 1rem;
  flex-grow: 1;
}

.pro-features-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.95rem;
  color: var(--text-secondary-light);
}

body.dark-theme .pro-features-list li {
  color: var(--text-secondary-dark);
}

.pro-features-list li i {
  color: var(--accent-hot);
  margin-top: 0.25rem;
}

@media screen and (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .modal-header {
    padding: 1.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
}
