/* ═══════════════════════════════════════════════════════════════════════════
   ZAKARIA IZOUAOUEN — Futuristic Professional Theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root,
[data-theme="dark"] {
  --bg-primary: #030712;
  --bg-secondary: #0a0f1a;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-glass: rgba(15, 23, 42, 0.4);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;

  --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-glow: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(139, 92, 246, 0.15) 100%);
  --gradient-border: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);

  --shadow-glow: 0 0 60px rgba(6, 182, 212, 0.15), 0 0 100px rgba(59, 130, 246, 0.1);
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  --masthead-bg: rgba(3, 7, 18, 0.85);
  --masthead-border: rgba(255, 255, 255, 0.05);
  --footer-bg: rgba(3, 7, 18, 0.9);
  --footer-border: rgba(255, 255, 255, 0.05);
  --nav-bg: rgba(15, 23, 42, 0.4);
  --nav-border: rgba(255, 255, 255, 0.05);
  --nav-hover-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.05);
  --h2-border: rgba(255, 255, 255, 0.1);
  --grid-line: rgba(255, 255, 255, 0.02);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Light Mode Variables ─── */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(241, 245, 249, 0.7);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-cyan: #0891b2;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;

  --gradient-primary: linear-gradient(135deg, #0891b2 0%, #2563eb 50%, #7c3aed 100%);
  --gradient-glow: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(37, 99, 235, 0.1) 50%, rgba(124, 58, 237, 0.1) 100%);
  --gradient-border: linear-gradient(135deg, #0891b2, #2563eb, #7c3aed);

  --shadow-glow: 0 0 60px rgba(8, 145, 178, 0.08), 0 0 100px rgba(37, 99, 235, 0.06);
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.12);

  --masthead-bg: rgba(248, 250, 252, 0.92);
  --masthead-border: rgba(0, 0, 0, 0.08);
  --footer-bg: rgba(248, 250, 252, 0.95);
  --footer-border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(241, 245, 249, 0.8);
  --nav-border: rgba(0, 0, 0, 0.06);
  --nav-hover-bg: rgba(0, 0, 0, 0.05);
  --card-border: rgba(0, 0, 0, 0.06);
  --h2-border: rgba(0, 0, 0, 0.1);
  --grid-line: rgba(0, 0, 0, 0.025);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--transition-slow);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(8, 145, 178, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(37, 99, 235, 0.04) 0%, transparent 50%);
}

/* Grid pattern overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* ─── Utilities ─── */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

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

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

ul, ol {
  margin: 1rem 0 1.5rem 0;
  color: var(--text-secondary);
}

li { margin-bottom: 0.5rem; }

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── Header / Masthead ─── */
.site-masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: var(--masthead-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--masthead-border);
  transition: all var(--transition-base);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
}

/* Logo */
.masthead-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}

.masthead-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
              var(--gradient-border) border-box;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.masthead-logo:hover img {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

/* Site Title */
.site-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.site-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  background: var(--nav-bg);
  border-radius: var(--radius-full);
  border: 1px solid var(--nav-border);
}

.site-nav__item a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

.site-nav__item a:hover {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
}

.site-nav__item--active a,
.site-nav__item a[aria-current="page"] {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3), 0 0 30px rgba(59, 130, 246, 0.2);
}

/* Social Links */
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.social-link i {
  font-size: 1.1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.25);
}

.theme-toggle i {
  font-size: 1.1rem;
  transition: transform var(--transition-base);
}

.theme-toggle:hover i {
  transform: rotate(20deg);
}

/* ─── Main Content ─── */
.page__content {
  padding-top: 100px;
  min-height: calc(100vh - 180px);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Page Cards */
.home-intro,
.single-article {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.home-intro::before,
.single-article::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.5;
  pointer-events: none;
}

/* Glowing border effect */
.home-intro::after,
.single-article::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

/* Lead text */
.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Section Headers with icons */
h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--h2-border);
  margin-top: 2rem;
}

h2:first-of-type {
  margin-top: 0;
}

/* Lists styling */
ul {
  list-style: none;
  padding: 0;
}

ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Page title */
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Footer ─── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1rem 2rem;
  background: var(--footer-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--footer-border);
}

.site-footer p {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.site-footer p::before {
  content: '⟨ ';
  color: var(--accent-cyan);
}

.site-footer p::after {
  content: ' ⟩';
  color: var(--accent-purple);
}

/* ─── Responsive Design ─── */

/* ══════════════════════════════════════════════════════════════════════════
   LARGE DESKTOP (1400px+)
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
    padding: 4rem 3rem;
  }
  
  .home-intro,
  .single-article {
    padding: 4rem;
  }
  
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.5rem; }
  
  .page-title {
    font-size: 3rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DESKTOP (1024px - 1399px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) and (max-width: 1399px) {
  .container {
    max-width: 960px;
  }
  
  .masthead-inner {
    gap: 1.5rem;
  }
  
  .site-nav__item a {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   TABLET LANDSCAPE (768px - 1023px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .masthead-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .site-nav {
    order: 10;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.4rem;
  }
  
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  
  .site-nav__item a {
    white-space: nowrap;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
  
  .container {
    max-width: 720px;
    padding: 2.5rem 1.5rem;
  }
  
  .home-intro,
  .single-article {
    padding: 2.5rem;
  }
  
  .page__content {
    padding-top: 130px;
  }
  
  /* Two column layout for lists on tablet */
  .article-content ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   TABLET PORTRAIT (600px - 767px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .site-masthead {
    padding: 0.75rem 1rem;
  }
  
  .masthead-inner {
    gap: 0.75rem;
  }
  
  .masthead-logo img {
    width: 42px;
    height: 42px;
  }
  
  .site-title {
    font-size: 0.95rem;
  }
  
  .site-subtitle {
    display: none;
  }
  
  .site-nav {
    gap: 0.15rem;
    padding: 0.3rem;
  }
  
  .site-nav__item a {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }
  
  .social-link {
    width: 38px;
    height: 38px;
  }
  
  .container {
    padding: 2rem 1.25rem;
  }
  
  .home-intro,
  .single-article {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .page__content {
    padding-top: 140px;
  }
  
  h2 {
    font-size: 1.35rem;
    flex-wrap: wrap;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  /* Single column lists on smaller tablets */
  .article-content ul {
    grid-template-columns: 1fr;
  }
  
  /* Adjust table for tablet */
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 0.6rem 0.8rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE LANDSCAPE (480px - 599px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  body {
    font-size: 15px;
    padding-bottom: 70px;
  }
  
  .site-masthead {
    padding: 0.6rem 0.75rem;
  }
  
  .masthead-logo img {
    width: 38px;
    height: 38px;
  }
  
  .site-title-wrap {
    display: none;
  }
  
  .site-nav {
    justify-content: flex-start;
    margin: 0 -0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    background: transparent;
    border: none;
  }
  
  .site-nav__item a {
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }
  
  .masthead-actions {
    gap: 0.4rem;
  }
  
  .social-link {
    width: 34px;
    height: 34px;
  }
  
  .social-link i {
    font-size: 0.95rem;
  }
  
  .container {
    padding: 1.5rem 1rem;
  }
  
  .home-intro,
  .single-article {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-sm);
  }
  
  .page__content {
    padding-top: 120px;
  }
  
  h2 {
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
  }
  
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
  }
  
  ul li::before {
    width: 6px;
    height: 6px;
  }
  
  /* Footer adjustments */
  .site-footer {
    padding: 0.75rem 1rem;
  }
  
  .site-footer p {
    font-size: 0.75rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE PORTRAIT (< 480px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 479px) {
  body {
    font-size: 14px;
    padding-bottom: 65px;
  }
  
  .site-masthead {
    padding: 0.5rem 0.6rem;
  }
  
  .masthead-logo img {
    width: 34px;
    height: 34px;
  }
  
  .site-nav__item a {
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
  }
  
  .social-links {
    gap: 0.3rem;
  }
  
  .social-link {
    width: 32px;
    height: 32px;
  }
  
  .social-link i {
    font-size: 0.85rem;
  }
  
  .container {
    padding: 1.25rem 0.85rem;
  }
  
  .home-intro,
  .single-article {
    padding: 1.25rem 1rem;
  }
  
  /* Adjust glowing border for mobile */
  .home-intro::after,
  .single-article::after {
    left: 10%;
    right: 10%;
  }
  
  .page__content {
    padding-top: 110px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; margin-top: 1.25rem; }
  h3 { font-size: 1rem; }
  
  .page-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }
  
  p {
    margin-bottom: 0.85rem;
  }
  
  ul li {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.95em;
  }
  
  ul li::before {
    width: 5px;
    height: 5px;
    top: 0.55em;
  }
  
  /* Table responsive */
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 0.5rem 0.6rem;
  }
  
  /* Footer */
  .site-footer {
    padding: 0.6rem 0.75rem;
  }
  
  .site-footer p {
    font-size: 0.7rem;
  }
  
  .site-footer p::before,
  .site-footer p::after {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   VERY SMALL SCREENS (< 360px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 359px) {
  .site-nav__item a {
    padding: 0.3rem 0.4rem;
    font-size: 0.62rem;
  }
  
  .masthead-logo img {
    width: 30px;
    height: 30px;
  }
  
  .social-link {
    width: 28px;
    height: 28px;
  }
  
  .container {
    padding: 1rem 0.65rem;
  }
  
  .home-intro,
  .single-article {
    padding: 1rem 0.85rem;
  }
  
  .page-title {
    font-size: 1.2rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   LANDSCAPE ORIENTATION FIXES
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .site-masthead {
    position: relative;
    top: 0;
  }
  
  .page__content {
    padding-top: 1rem;
  }
  
  .site-footer {
    position: relative;
  }
  
  body {
    padding-bottom: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   HIGH DPI / RETINA DISPLAYS
   ══════════════════════════════════════════════════════════════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .masthead-logo img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════ */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  
  body::before,
  body::after {
    display: none;
  }
  
  .site-masthead,
  .site-footer,
  .social-links {
    display: none;
  }
  
  .page__content {
    padding-top: 0;
  }
  
  .home-intro,
  .single-article {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
  }
  
  .home-intro::before,
  .single-article::before,
  .home-intro::after,
  .single-article::after {
    display: none;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .page-title {
    background: none;
    -webkit-text-fill-color: #000;
    color: #000;
  }
}

/* ─── Focus States ─── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ─── Selection ─── */
::selection {
  background: rgba(6, 182, 212, 0.3);
  color: var(--text-primary);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-intro,
.single-article {
  animation: fadeInUp 0.6s ease-out;
}

/* Subtle hover lift on cards */
.home-intro:hover,
.single-article:hover {
  transform: translateY(-2px);
  transition: transform var(--transition-base);
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════════════════ */

.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 5rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 70vh;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: fit-content;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin: 0;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.cta-btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}

.cta-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.4);
  color: #fff;
}

.cta-btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--card-border);
}

.cta-btn--secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-meta a {
  color: var(--accent-cyan);
}

.hero-visual {
  flex: 0 0 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-svg {
  width: 300px;
  height: 300px;
  filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.2));
}

.hero-node {
  animation: pulse-node 3s ease-in-out infinite;
}

.hero-node:nth-child(even) {
  animation-delay: 1.5s;
}

@keyframes pulse-node {
  0%, 100% { opacity: 1; r: 6; }
  50% { opacity: 0.5; r: 8; }
}

/* ══════════════════════════════════════════════════════════════════════════
   STATS SECTION
   ══════════════════════════════════════════════════════════════════════════ */

.stats-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════════════════════
   TIMELINE / CHART SECTION
   ══════════════════════════════════════════════════════════════════════════ */

.timeline-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--h2-border);
  padding-bottom: 0.75rem;
  margin-top: 0;
}

.chart-wrapper {
  height: 220px;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════════════════
   PUBLICATIONS SECTION
   ══════════════════════════════════════════════════════════════════════════ */

#publications-section {
  margin-top: 1rem;
}

.pub-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  align-items: center;
}

.pub-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pub-search:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.pub-filter {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.pub-filter:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.pub-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.pub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: rgba(6, 182, 212, 0.2);
}

.pub-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pub-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.pub-badge--book-chapter    { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.pub-badge--journal-article { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.pub-badge--conference-paper{ background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.pub-badge--preprint        { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.pub-badge--thesis          { background: rgba(6, 182, 212, 0.10); color: var(--accent-cyan); }
.pub-badge--other           { background: var(--bg-secondary); color: var(--text-muted); }

.pub-year {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
}

.pub-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pub-links {
  margin-top: 0.5rem;
}

.pub-doi {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.pub-doi:hover { color: var(--accent-blue); }

.pub-abstract {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.pub-abstract summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  user-select: none;
  font-size: 0.82rem;
}

.pub-abstract summary:hover { color: var(--accent-cyan); }

.pub-abstract p {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pub-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}

.pub-export {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pub-export-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pub-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.pub-export-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.pub-profiles {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pub-profiles a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-cyan);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — HERO / STATS / CHART
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    padding: 4rem 1.5rem 2rem;
    min-height: auto;
    gap: 2rem;
  }

  .hero-visual {
    flex: none;
    width: 200px;
  }

  .hero-svg {
    width: 200px;
    height: 200px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-section {
    padding: 3.5rem 1rem 1.5rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-visual {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .pub-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .pub-search,
  .pub-filter {
    width: 100%;
  }
}
