:root {
  /* Refined Color Palette */
  --bg: #fafafa;
  --bg-soft: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Gradient Accents */
  --accent-primary: #6366f1;
  --accent-secondary: #a855f7;
  --accent-tertiary: #ec4899;
  --accent-soft: #eef2ff;
  --accent-strong: #4f46e5;

  /* Borders & Shadows */
  --border-subtle: #e2e8f0;
  --border-light: #f1f5f9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 20px 48px rgba(15, 23, 42, 0.12);

  /* Typography Scale */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --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);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

/* Layout */

.container {
  width: min(1080px, 100% - 2rem);
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.5), #f9fafb);
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
  font-size: 0.98rem;
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, #2563eb, #22c55e, #f97316, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
}

.logo-text {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.98rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  font-size: 0.9rem;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.1rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.18s ease-out;
}

.nav a:hover {
  color: var(--text);
}

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

.nav-active {
  color: var(--text);
  font-weight: 500;
}

.header-cta {
  display: flex;
  align-items: center;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent-strong);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-strong);
  border-color: var(--accent-primary);
}

.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Hero */

.hero {
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #d4d4ff;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b5563;
}

.badge-subtle {
  background: #f3f4ff;
  border-color: #e5e7eb;
}

.hero-text h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(2.3rem, 3vw + 1.6rem, 3.4rem);
  line-height: 1.1;
  margin: 1.4rem 0 0.9rem;
}

.highlight {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  font-weight: 800;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 40rem;
  font-size: 0.98rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.8rem 0 1.3rem;
}

.hero-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-size: 0.8rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.meta-value {
  color: var(--text);
}

.hero-panel {
  position: relative;
}

.hero-panel-inner {
  border-radius: 26px;
  padding: 1.5rem;
  background: radial-gradient(circle at top left, #e0ecff 0, #ffffff 55%, #e5fbe9 100%);
  box-shadow: var(--shadow-soft);
  border: 1px solid #dbe2ff;
}

.hero-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.hero-stat {
  flex: 1;
  min-width: 120px;
}

.hero-stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-soft);
}

.hero-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.hero-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4b5563;
}

/* Cards & grids */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.8rem;
}

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

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.card:hover::after {
  left: 100%;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  position: relative;
  z-index: 1;
}

.pill-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill-list li {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 1.6rem;
}

.project-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 1.4rem 1.5rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1d4ed8;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.project-card p {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.project-bullets {
  margin: 0 0 0.9rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.subsection-title {
  margin-top: 2.6rem;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.subsection-subtitle {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Research */

.research-list {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr);
  gap: 1.2rem;
}

.research-item {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 1.3rem 1.4rem;
  font-size: 0.94rem;
}

.research-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.research-item h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.05rem;
}

.research-item p {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
}

/* Experience cards */

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.experience-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 1.3rem 1.4rem;
  font-size: 0.93rem;
}

.exp-role {
  margin: 0;
  font-weight: 600;
}

.exp-meta {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 0.15rem;
}

.exp-bullets {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Blog */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 1.2rem 1.3rem;
  font-size: 0.93rem;
}

.blog-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.blog-card p {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 1.8rem;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 0;
  font-size: 0.94rem;
}

.contact-list li + li {
  margin-top: 0.4rem;
}

.contact-list a {
  color: var(--accent-strong);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-note {
  font-size: 0.9rem;
}

.contact-note p {
  margin-top: 0;
  color: var(--text-muted);
}

.contact-note ul {
  margin: 0.5rem 0 0.4rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.contact-note-footnote {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* Text helpers */

.text-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.9rem;
}

.text-link:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 1.2rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.footer-inner a {
  color: var(--accent-strong);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Responsive */

@media (max-width: 880px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel-inner {
    margin-top: 1.2rem;
  }

  .grid-2,
  .grid-3,
  .projects-grid,
  .experience-grid,
  .blog-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* --- Dynamic flavour additions --- */

/* Header shadow on scroll */
.header-scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Hero background blob */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.55), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(34, 197, 94, 0.45), transparent 60%);
  filter: blur(4px);
  opacity: 0.8;
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 40% 40%, rgba(251, 191, 36, 0.45), transparent 60%);
  filter: blur(6px);
  opacity: 0.7;
  z-index: -1;
}

/* Typewriter cursor */
.hero-rotating-wrapper {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: var(--accent-strong);
}

.cursor {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  background: var(--accent-strong);
  margin-left: 2px;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-subtitle-small {
  font-size: 0.92rem;
  margin-top: 0.4rem;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }
.reveal:nth-child(5) { transition-delay: 400ms; }

/* Responsive Typography */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

/* Enhanced Card Hover Effects */
.card {
  transition: all var(--transition-slow);
  cursor: default;
}

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

/* Logo Animation */
.logo-mark {
  transition: all var(--transition-base);
}

.logo:hover .logo-mark {
  transform: rotate(180deg);
}

/* Improved Text Links */
.text-link {
  position: relative;
  transition: color var(--transition-base);
}

.text-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-base);
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ==========================================
   DARK MODE VARIABLES
   ==========================================*/
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-alt: #162032;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --border-subtle: #334155;
  --border-light: #1e293b;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.7);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .site-footer {
  background: #0f172a;
  border-top-color: #334155;
}

[data-theme="dark"] .card,
[data-theme="dark"] .work-card,
[data-theme="dark"] .exp-content,
[data-theme="dark"] .journey-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .experience-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .research-item {
  background: rgba(30, 41, 59, 0.95);
  border-color: #334155;
}

[data-theme="dark"] .stat-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .skills-summary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .skill-tag {
  background: rgba(30, 41, 59, 0.9);
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .btn-outline {
  background: rgba(30, 41, 59, 0.8);
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-ghost {
  color: #94a3b8;
  border-color: #334155;
}

[data-theme="dark"] .btn-ghost:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
}

[data-theme="dark"] .gradient-bg {
  background: linear-gradient(135deg, #0f172a 0%, #131f35 50%, #1a2540 100%);
}

[data-theme="dark"] .dot-pattern {
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

[data-theme="dark"] .tech-pill {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(30, 41, 59, 0.6));
  border-color: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
}

[data-theme="dark"] .tech-pill:hover {
  border-color: #6366f1;
  color: #818cf8;
}

[data-theme="dark"] .badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

[data-theme="dark"] .badge-subtle {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(51, 65, 85, 0.8);
  color: #94a3b8;
}

[data-theme="dark"] .section-alt {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), #162032);
}

[data-theme="dark"] .featured-work {
  background: linear-gradient(180deg, transparent, rgba(30, 41, 59, 0.5));
}

[data-theme="dark"] .journey-section {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), transparent);
}

[data-theme="dark"] .timeline-road {
  background: linear-gradient(180deg, transparent, #334155 10%, #334155 90%, transparent);
}

[data-theme="dark"] .hero-panel-inner {
  background: radial-gradient(circle at top left, #1e3a5f 0, #1e293b 55%, #162f2a 100%);
  border-color: #334155;
}

[data-theme="dark"] .profile-photo {
  background: linear-gradient(#1e293b, #1e293b) padding-box,
              linear-gradient(135deg, #6366f1, #a855f7, #ec4899) border-box;
}

/* ==========================================
   THEME TOGGLE BUTTON
   ==========================================*/
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ==========================================
   PROFILE PHOTO
   ==========================================*/
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo-wrapper {
  position: relative;
  width: 360px;
  height: 360px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #6366f1, #a855f7, #ec4899) border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-initials {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}

.profile-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  animation: profileGlow 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes profileGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.4; }
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-visual {
    order: -1;
    justify-content: center;
  }
  .profile-photo-wrapper {
    width: 220px;
    height: 220px;
  }
}

/* ==========================================
   SECTION UTILITY CLASSES
   ==========================================*/
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-header-center {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* ==========================================
   HOMEPAGE INLINE-STYLE REPLACEMENTS
   ==========================================*/

/* Hero h1 */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 1.5rem 0 1rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #475569;
}

[data-theme="dark"] .hero-subtitle {
  color: #cbd5e1;
}

.hero-cta-row {
  margin-top: 2.5rem;
}

/* Small colored kicker label above a card title */
.kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.kicker-indigo { color: #6366f1; }
.kicker-violet { color: #a855f7; }
.kicker-pink   { color: #ec4899; }

/* Work/feature card text */
.work-card-title {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.work-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.work-card-head {
  margin-bottom: 1rem;
}

.work-card-foot {
  margin-top: 1.5rem;
}

/* Expertise card icon squares */
.icon-square {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.icon-square-iv { background: linear-gradient(135deg, #6366f1, #a855f7); }
.icon-square-vp { background: linear-gradient(135deg, #a855f7, #ec4899); }
.icon-square-po { background: linear-gradient(135deg, #ec4899, #f97316); }

.expertise-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.expertise-desc {
  line-height: 1.6;
}

/* Journey card text */
.journey-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}

[data-theme="dark"] .journey-title {
  color: #f1f5f9;
}

.journey-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Skill pills row inside journey cards */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-weight: 500;
}
.skill-pill-indigo { background: #eef2ff; color: #6366f1; }
.skill-pill-violet { background: #f3e8ff; color: #a855f7; }
.skill-pill-pink   { background: #fce7f3; color: #ec4899; }

[data-theme="dark"] .skill-pill-indigo { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
[data-theme="dark"] .skill-pill-violet { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
[data-theme="dark"] .skill-pill-pink   { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; }

.mt-4 { margin-top: 4rem; }
