/* =============================================================
   redesign.css — Dr. Dylan Porter Portfolio
   ============================================================= */

/* ---------------------------------------------------------------
   CSS CUSTOM PROPERTIES  (Light — default)
--------------------------------------------------------------- */
:root {
  --color-bg:           #f8fafc;
  --color-bg-alt:       #f1f5f9;
  --color-bg-card:      #ffffff;
  --color-border:       #e2e8f0;
  --color-border-hover: rgba(99, 102, 241, 0.5);
  --color-text:         #475569;
  --color-text-muted:   #94a3b8;
  --color-text-strong:  #0f172a;
  --color-indigo:       #6366f1;
  --color-cyan:         #0891b2;
  --color-indigo-dim:   rgba(99, 102, 241, 0.08);
  --color-cyan-dim:     rgba(8, 145, 178, 0.08);

  --grad-accent:        linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-accent-rev:    linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);

  --font-head:          'Space Grotesk', 'Inter', sans-serif;
  --font-body:          'Inter', sans-serif;

  --section-pad:        96px;
  --card-radius:        16px;
  --nav-h:              64px;

  --shadow-sm:          0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card:        0 1px 4px rgba(0,0,0,0.05), 0 6px 24px rgba(0,0,0,0.06);
  --shadow-card-hover:  0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.10);
  --shadow-indigo:      0 4px 20px rgba(99,102,241,0.3);
  --shadow-indigo-lg:   0 6px 30px rgba(99,102,241,0.45);

  --transition-base:    0.22s ease;
  --transition-slow:    0.4s ease;
}

/* ---------------------------------------------------------------
   CSS CUSTOM PROPERTIES  (Dark — toggled via [data-theme="dark"])
--------------------------------------------------------------- */
[data-theme="dark"] {
  --color-bg:           #0f172a;
  --color-bg-alt:       #1e293b;
  --color-bg-card:      #1e293b;
  --color-border:       rgba(255,255,255,0.08);
  --color-border-hover: rgba(99,102,241,0.5);
  --color-text:         #94a3b8;
  --color-text-muted:   #64748b;
  --color-text-strong:  #f1f5f9;
  --color-indigo-dim:   rgba(99,102,241,0.15);
  --color-cyan-dim:     rgba(8,145,178,0.15);

  --shadow-sm:          0 1px 3px rgba(0,0,0,0.5);
  --shadow-card:        0 2px 8px rgba(0,0,0,0.35), 0 6px 24px rgba(0,0,0,0.4);
  --shadow-card-hover:  0 4px 16px rgba(0,0,0,0.45), 0 16px 40px rgba(0,0,0,0.55);
}

[data-theme="dark"] .site-nav {
  background: rgba(15,23,42,0.92);
  border-bottom-color: rgba(255,255,255,0.07);
}

[data-theme="dark"] .site-footer {
  background: #0f172a;
  border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .footer-grid {
  border-bottom-color: rgba(255,255,255,0.07);
}

[data-theme="dark"] .footer-contact-icon {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .footer-social-link {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .footer-social-link:hover {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.1);
}

[data-theme="dark"] .footer-social-icon { opacity: 0.65; }

[data-theme="dark"] .hero {
  background: linear-gradient(160deg, #0f172a 0%, #111827 50%, #0c1a2e 100%);
}

[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(ellipse 70% 50% at 60% -10%, rgba(99,102,241,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%,  rgba(6,182,212,0.15) 0%, transparent 50%);
}

[data-theme="dark"] .hero-orb { opacity: 0.55; }

[data-theme="dark"] .page-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 70%);
  border-bottom-color: rgba(255,255,255,0.07);
}

@media (max-width: 768px) {
  [data-theme="dark"] .nav-menu {
    background: rgba(15,23,42,0.98);
    border-bottom-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
}

/* ---------------------------------------------------------------
   THEME TOGGLE BUTTON
--------------------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base),
              color var(--transition-base), box-shadow var(--transition-base);
}

.theme-toggle:hover {
  border-color: var(--color-indigo);
  color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim);
}

.theme-toggle svg { width: 16px; height: 16px; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Show moon in light mode, sun in dark mode */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------------------------------------------------------------
   BASE / RESET
--------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--color-text-strong);
  line-height: 1.25;
}

a {
  color: var(--color-indigo);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover { color: var(--color-cyan); text-decoration: none; }

img { display: block; max-width: 100%; }
ul  { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; }

/* ---------------------------------------------------------------
   NAVIGATION
--------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

/* Push nav-menu (and everything after brand) to the right */
.nav-menu { margin-left: auto; }

/* Brand — gradient monogram */
.nav-brand {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--transition-base);
  white-space: nowrap;
}

.nav-brand:hover { opacity: 0.75; color: unset; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-text-strong);
  background: var(--color-bg-alt);
}

.nav-link.active {
  color: var(--color-indigo);
  background: var(--color-indigo-dim);
}

.nav-social { display: flex; align-items: center; gap: 8px; }

.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.nav-social-link:hover {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim);
}

.nav-social-icon {
  width: 18px; height: 18px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.nav-social-link:hover .nav-social-icon { opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  gap: 5px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--color-text-strong);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------
   HERO
--------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  overflow: hidden;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 50%, #f0fdff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 60% -10%, rgba(99,102,241,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%,  rgba(6,182,212,0.08)  0%, transparent 50%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  animation: orbFloat linear infinite;
}

.hero-orb:nth-child(1) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  top: -120px; left: -100px;
  animation-duration: 18s;
}

.hero-orb:nth-child(2) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
  top: 30%; right: -80px;
  animation-duration: 22s;
  animation-delay: -6s;
}

.hero-orb:nth-child(3) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
  bottom: 10%; left: 40%;
  animation-duration: 26s;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(30px, -40px) scale(1.05); }
  50%  { transform: translate(-20px, 30px) scale(0.95); }
  75%  { transform: translate(40px, 20px) scale(1.03); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(99,102,241,0.25);
  background: rgba(99,102,241,0.07);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-indigo);
  margin-bottom: 28px;
}

.hero-eyebrow .pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-cyan);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.55); }
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text-strong);
  line-height: 1.05;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text);
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------- */
.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--grad-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-indigo);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  text-decoration: none;
}

.btn-primary-glow:hover {
  color: #fff;
  box-shadow: var(--shadow-indigo-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-secondary-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--color-bg-card);
  color: var(--color-text-strong);
  border: 1px solid var(--color-border);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
  text-decoration: none;
}

.btn-secondary-glass:hover {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim), var(--shadow-sm);
  color: var(--color-text-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--grad-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(99,102,241,0.25);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  text-decoration: none;
}

.btn-glow:hover {
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.45);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-glow:disabled,
.btn-glow[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-glass-sm {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
  text-decoration: none;
}

.btn-glass-sm:hover {
  background: var(--color-indigo-dim);
  border-color: var(--color-indigo);
  color: var(--color-indigo);
  text-decoration: none;
}

.btn-disabled-glass {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ---------------------------------------------------------------
   STATS STRIP
--------------------------------------------------------------- */
.stats-strip {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 36px 24px;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 800;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------------
   SECTIONS
--------------------------------------------------------------- */
.site-section { padding: var(--section-pad) 24px; }
.site-section.alt-bg { background: var(--color-bg-alt); }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-header {
  margin-bottom: 52px;
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid rgba(99,102,241,0.25);
  background: var(--color-indigo-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-indigo);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---------------------------------------------------------------
   CARDS
--------------------------------------------------------------- */
.glass-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.glass-card:hover .card-image img { transform: scale(1.04); }

.card-content {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.card-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------------------------------------------------------
   CSS GRIDS
--------------------------------------------------------------- */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------------------------------------------------------------
   GITHUB SECTION
--------------------------------------------------------------- */
.github-intro {
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(6,182,212,0.04) 100%);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--card-radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.github-intro-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.github-intro h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 3px;
}

.github-intro p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.github-intro p a { color: var(--color-indigo); font-weight: 600; }

/* ---------------------------------------------------------------
   TABLE (DataTables)
--------------------------------------------------------------- */
.dark-table-wrapper {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.dark-table {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--color-text);
}

.dark-table thead th {
  background: var(--color-bg-alt);
  color: var(--color-text-strong);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

.dark-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

.dark-table tbody tr:last-child { border-bottom: none; }

.dark-table tbody tr:hover { background: var(--color-bg-alt); }

.dark-table tbody td {
  padding: 13px 18px;
  vertical-align: middle;
}

.dark-table tbody td a {
  color: var(--color-indigo);
  font-weight: 500;
}

.dark-table tbody td a:hover { color: var(--color-cyan); }

/* DataTables controls */
.dataTables_wrapper { padding: 0; color: var(--color-text); }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-strong);
  padding: 5px 10px;
  font-size: 0.85rem;
  outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim);
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted) !important;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--color-indigo-dim) !important;
  border-color: var(--color-indigo) !important;
  color: var(--color-indigo) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--grad-accent) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--shadow-indigo);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent !important;
  border-color: var(--color-border) !important;
}

/* ---------------------------------------------------------------
   PAGE HERO (non-home pages)
--------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 60px) 24px 60px;
  text-align: center;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 70%);
  border-bottom: 1px solid var(--color-border);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(99,102,241,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 35% 45% at 85% 100%, rgba(6,182,212,0.07) 0%, transparent 55%);
  pointer-events: none;
}

.page-hero .section-tag {
  position: relative; z-index: 1; margin-bottom: 14px;
}

.page-hero h1 {
  position: relative; z-index: 1;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.page-hero .page-hero-sub {
  position: relative; z-index: 1;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 540px;
  line-height: 1.65;
}

/* ---------------------------------------------------------------
   AI LAB CARDS
--------------------------------------------------------------- */
.lab-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 24px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.lab-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover);
}

.lab-img-wrap { overflow: hidden; }

.lab-img {
  width: 100%; height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.lab-card:hover .lab-img { transform: scale(1.03); }

.lab-content {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.lab-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0;
}

.lab-content p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.65;
}

.lab-result {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* ---------------------------------------------------------------
   PDF DROP ZONE
--------------------------------------------------------------- */
.pdf-drop-zone {
  border: 2px dashed rgba(99,102,241,0.3);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base);
  background: var(--color-indigo-dim);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.pdf-drop-zone:hover,
.pdf-drop-zone.dragover {
  border-color: var(--color-indigo);
  background: rgba(99,102,241,0.1);
  color: var(--color-indigo);
}

.pdf-drop-zone svg {
  display: block;
  margin: 0 auto 8px;
  color: var(--color-indigo);
  opacity: 0.7;
}

/* ---------------------------------------------------------------
   INPUTS
--------------------------------------------------------------- */
.dark-input {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--color-text-strong);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.dark-input::placeholder { color: var(--color-text-muted); }

.dark-input:focus {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim);
}

.dark-input-group {
  display: flex;
  gap: 0;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.dark-input-group:focus-within {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px var(--color-indigo-dim);
}

.dark-input-group .dark-input {
  border: none; border-radius: 0; flex: 1; box-shadow: none;
}

.dark-input-group .dark-input:focus { box-shadow: none; border: none; }

.dark-input-group .btn-glow { border-radius: 0; box-shadow: none; }
.dark-input-group .btn-glow:hover { box-shadow: none; transform: none; }

/* ---------------------------------------------------------------
   SPINNER
--------------------------------------------------------------- */
.spinner-dot, .spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-indigo);
  border-radius: 50%;
  animation: spinDot 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spinDot {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#status {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-top: 8px;
}

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 60px 24px 0;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 280px;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.footer-nav { display: flex; flex-direction: column; gap: 10px; }

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text);
  transition: color var(--transition-base);
}

.footer-nav a:hover { color: var(--color-text-strong); }

.footer-contact-list { display: flex; flex-direction: column; gap: 12px; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--color-text);
}

.footer-contact-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
}

.footer-copy { font-size: 0.8rem; color: var(--color-text-muted); }

.footer-socials { display: flex; gap: 10px; }

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.footer-social-link:hover {
  border-color: var(--color-indigo);
  background: var(--color-indigo-dim);
}

.footer-social-icon {
  width: 16px; height: 16px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition-base);
}

.footer-social-link:hover .footer-social-icon { opacity: 1; }

/* ---------------------------------------------------------------
   SCROLL-REVEAL
--------------------------------------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------
   ABOUT SECTION
--------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-bio {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 32px;
}

.skills-block { display: flex; flex-direction: column; gap: 16px; }

.skill-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.skill-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  width: 88px;
  flex-shrink: 0;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.skill-tag:hover {
  border-color: var(--color-indigo);
  background: var(--color-indigo-dim);
  color: var(--color-indigo);
}

/* Education */
.edu-list {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--color-border);
  padding-left: 24px;
  margin-top: 8px;
}

.edu-item { position: relative; padding-bottom: 28px; }
.edu-item:last-child { padding-bottom: 0; }

.edu-item::before {
  content: '';
  position: absolute;
  left: -30px; top: 5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 4px rgba(99,102,241,0.3);
}

.edu-degree {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 3px;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--color-indigo);
  font-weight: 600;
  margin-bottom: 2px;
}

.edu-year { font-size: 0.8rem; color: var(--color-text-muted); }

/* ---------------------------------------------------------------
   EXPERIENCE TIMELINE
--------------------------------------------------------------- */
.exp-timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--color-border);
  margin-left: 6px;
}

.exp-item { position: relative; padding-bottom: 44px; }
.exp-item:last-child { padding-bottom: 0; }

.exp-dot {
  position: absolute;
  left: -36px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 0 3px var(--color-bg-alt), 0 0 0 4px rgba(99,102,241,0.25);
}

.exp-body {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.exp-body:hover {
  border-color: rgba(99,102,241,0.35);
  box-shadow: var(--shadow-card);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.exp-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 2px;
}

.exp-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-indigo);
}

.exp-dates {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-top: 3px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 3px 10px;
}

.exp-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}

.exp-bullets li {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}

.exp-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-cyan);
}

/* ---------------------------------------------------------------
   TABS (Research & Writing)
--------------------------------------------------------------- */
.tab-bar {
  display: inline-flex;
  gap: 4px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
}

.tab-btn {
  padding: 8px 22px;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab-btn:hover:not(.active) {
  color: var(--color-text-strong);
  background: var(--color-bg-card);
}

.tab-btn.active {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------------------------------------------------------------
   RESPONSIVE — 768px
--------------------------------------------------------------- */
@media (max-width: 768px) {
  :root { --section-pad: 60px; }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 16px;
    display: none;
  }

  .nav-menu.is-open { display: flex; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%; gap: 2px;
  }

  .nav-link { width: 100%; padding: 10px 12px; }

  .nav-social {
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    width: 100%;
    margin-top: 8px;
  }

  .hero { padding: calc(var(--nav-h) + 40px) 20px 60px; }
  .hero-orb:nth-child(1) { width: 280px; height: 280px; }
  .hero-orb:nth-child(2) { width: 220px; height: 220px; }
  .hero-orb:nth-child(3) { width: 160px; height: 160px; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-2 { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skill-group { flex-direction: column; gap: 8px; }
  .skill-group-label { width: auto; }

  .lab-card { grid-template-columns: 1fr; }
  .lab-img { min-height: 200px; }
  .lab-content { padding: 22px 18px; }

  .exp-header { flex-direction: column; gap: 8px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }

  .github-intro { flex-direction: column; align-items: flex-start; }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter { display: block; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; }
  .dataTables_wrapper .dataTables_paginate { justify-content: center; }
}
