/* ============================================================
   NIKHIL TOGADIYA — PORTFOLIO STYLESHEET
   Color Psychology: Blue = Trust, Warm White = Comfort
   Accent: Amber/Gold for energy & warmth
   ============================================================ */

/* ---------- CSS Variables (Easy to customize) ---------- */
:root {
  /* Primary Palette — Trust & Comfort */
  --primary:        #3B82F6;    /* Calm blue — trustworthy */
  --primary-dark:   #2563EB;
  --primary-light:  #DBEAFE;
  --primary-subtle: #EFF6FF;

  /* Accent — Warm & Inviting */
  --accent:         #F59E0B;    /* Amber gold — approachable */
  --accent-dark:    #D97706;
  --accent-light:   #FEF3C7;

  /* Backgrounds — Warm whites */
  --bg-main:        #FAFBFC;
  --bg-card:        #FFFFFF;
  --bg-section-alt: #F0F7FF;    /* Very light blue tint */

  /* Text */
  --text-primary:   #1E293B;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --text-on-primary:#FFFFFF;

  /* Borders & Shadows */
  --border:         #E2E8F0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:      0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-glow:    0 0 30px rgba(59,130,246,0.12);

  /* Layout */
  --max-width:      1200px;
  --radius:         12px;
  --radius-lg:      20px;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:      'Fira Code', 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

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

/* ---------- Utility Classes ---------- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-section-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.highlight {
  color: var(--primary);
}

.accent {
  color: var(--accent);
}

/* ---------- Scroll Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(250, 251, 252, 0.95);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--primary); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--primary); }

.nav-resume-btn {
  background: var(--primary);
  color: var(--text-on-primary) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition);
}
.nav-resume-btn:hover {
  background: var(--primary-dark);
  color: var(--text-on-primary) !important;
  transform: translateY(-1px);
}
.nav-resume-btn::after { display: none !important; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.05) 0%, transparent 50%),
    var(--bg-main);
  position: relative;
  overflow: hidden;
}

/* Floating decoration */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.05); }
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-greeting .wave {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wave {
  0%   { transform: rotate(0); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.hero-name {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -1px;
}

/* Typing Effect Container */
.hero-typing {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 2rem;
}
.hero-typing .cursor {
  display: inline-block;
  width: 3px;
  height: 1.3rem;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--text-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

/* Hero Image / Avatar */
.hero-image {
  flex-shrink: 0;
  position: relative;
}
.hero-avatar-wrapper {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 5px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: float 6s ease-in-out infinite;
}
.hero-avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stat h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}
.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.about-highlight-card {
  background: var(--bg-card);
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
}
.about-highlight-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.about-highlight-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.about-highlight-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.about-highlight-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- EXPERIENCE (Timeline) ---------- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), var(--primary));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 70px;
  margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  z-index: 1;
  transition: all var(--transition);
}
.timeline-item:hover .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-light);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.timeline-company {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}
.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--primary-subtle);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.timeline-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-points {
  list-style: none;
  padding: 0;
}
.timeline-points li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.timeline-points li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Tech tags on experience */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tag {
  background: var(--primary-subtle);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
}
.tag:hover {
  background: var(--primary);
  color: var(--text-on-primary);
}

/* Links for experience/project items */
.timeline-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--primary-light);
  transition: all var(--transition);
}
.timeline-link:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}

/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  transform: translateY(-5px);
}

.project-card-header {
  padding: 2rem 2rem 1rem;
}

.project-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.project-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.project-card-subtitle {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.project-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-card-body {
  padding: 0 2rem 1.5rem;
  flex: 1;
}

.project-card-body ul {
  list-style: none;
  padding: 0;
}
.project-card-body li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.project-card-body li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.project-card-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

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

.project-links {
  display: flex;
  gap: 0.5rem;
}
.project-link {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color var(--transition);
}
.project-link:hover {
  color: var(--primary);
}

/* ---------- SKILLS ---------- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}
.skill-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

.skill-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tag {
  background: var(--primary-subtle);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.skill-tag:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ---------- EDUCATION ---------- */
.education-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all var(--transition);
}
.education-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-3px);
}
.education-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}
.education-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.education-info .school {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.education-info .edu-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- BLOG ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  transform: translateY(-5px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-content {
  padding: 1.5rem 2rem 2rem;
}
.blog-card-tag {
  display: inline-block;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-coming-soon {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
}
.blog-coming-soon p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---------- PUBLICATIONS ---------- */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.publication-ghost-slot {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  color: var(--text-muted);
  min-height: 100%;
}
.publication-ghost-slot svg { stroke: var(--text-muted); }
.publication-ghost-slot span { font-size: 0.85rem; font-weight: 600; }

.publication-card-authors {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.publication-card-affiliation {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.publication-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.publication-card-actions .btn {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ---------- CONTACT SECTION ---------- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.contact-info h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  color: var(--text-primary);
}

.contact-method:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contact-method-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-subtle);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--transition);
}

.contact-method:hover .contact-method-icon {
  background: var(--primary);
  color: white;
}

.contact-method-info h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.contact-method-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-cta {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.contact-cta-box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-cta-box p {
  opacity: 0.95;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.contact-cta-box ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.contact-cta-box ul li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.contact-cta-box ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.contact-cta-box .btn {
  width: 100%;
  justify-content: center;
  background: white;
  color: var(--primary);
  font-weight: 600;
}

.contact-cta-box .btn:hover {
  background: var(--primary-subtle);
  transform: translateY(-2px);
}

/* ---------- CONTACT / FOOTER ---------- */
.footer {
  background: var(--text-primary);
  color: var(--text-on-primary);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-info p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  color: var(--text-on-primary);
  opacity: 0.7;
  font-size: 1.3rem;
  transition: all var(--transition);
}
.footer-social a:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero .container { flex-direction: column-reverse; text-align: center; gap: 2rem; }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-avatar-wrapper { width: 200px; height: 200px; }
  .hero-name { font-size: 2.2rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-highlights { grid-template-columns: 1fr 1fr; }

  .projects-grid { grid-template-columns: 1fr; }
  .skills-categories { grid-template-columns: 1fr; }
  .education-cards { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .publications-grid { grid-template-columns: 1fr; }
  .contact-container { grid-template-columns: 1fr; gap: 2rem; }

  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }

  .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 1.8rem; }
  .hero-typing { font-size: 1rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat h3 { font-size: 1.4rem; }
  .about-highlights { grid-template-columns: 1fr; }
  .timeline::before { left: 16px; }
  .timeline-item { padding-left: 50px; }
  .timeline-dot { left: 6px; width: 18px; height: 18px; }
}

/* ================================================================
   DARK THEME — variable overrides (applied when data-theme="dark")
   ================================================================ */
[data-theme="dark"] {
  --bg-main:        #0a0a1a;
  --bg-card:        rgba(15, 15, 46, 0.85);
  --bg-section-alt: #0d0d28;
  --primary:        #00f5ff;
  --primary-dark:   #00c4cc;
  --primary-light:  rgba(0, 245, 255, 0.15);
  --primary-subtle: rgba(0, 245, 255, 0.06);
  --accent:         #8b5cf6;
  --accent-dark:    #7c3aed;
  --accent-light:   rgba(139, 92, 246, 0.15);
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-on-primary:#0a0a1a;
  --border:         rgba(139, 92, 246, 0.18);
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:      0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg:      0 10px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow:    0 0 30px rgba(0, 245, 255, 0.15);
}

/* Dark mode — element-level overrides for items with hardcoded backgrounds */
[data-theme="dark"] .navbar {
  background: rgba(10, 10, 26, 0.85);
  border-bottom-color: rgba(139, 92, 246, 0.15);
}
[data-theme="dark"] .navbar.scrolled {
  background: rgba(10, 10, 26, 0.95);
}

[data-theme="dark"] .footer {
  background: #07071a;
  color: var(--text-primary);
}
[data-theme="dark"] .footer-social a {
  color: var(--text-primary);
}

/* CTA box — replace bright cyan gradient with a muted dark card */
[data-theme="dark"] .contact-cta-box {
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.2);
  color: var(--text-primary);
}
[data-theme="dark"] .contact-cta-box h3 {
  color: #00f5ff;
}
[data-theme="dark"] .contact-cta-box p,
[data-theme="dark"] .contact-cta-box ul li {
  color: var(--text-secondary);
}
[data-theme="dark"] .contact-cta-box ul li::before {
  color: #00f5ff;
}
[data-theme="dark"] .contact-cta-box .btn {
  background: rgba(0, 245, 255, 0.12);
  color: #00f5ff;
  border: 1px solid rgba(0, 245, 255, 0.3);
}
[data-theme="dark"] .contact-cta-box .btn:hover {
  background: rgba(0, 245, 255, 0.22);
}

body { transition: background 0.4s ease, color 0.4s ease; }

/* ================================================================
   NAVBAR RIGHT CONTROLS
   ================================================================ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================================================================
   THEME TOGGLE BUTTON
   ================================================================ */
.theme-toggle {
  position: relative;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: rotate(15deg);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Light mode: show moon (to switch TO dark) */
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
/* Dark mode: show sun (to switch TO light) */
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* ================================================================
   LANGUAGE TOGGLE BUTTON
   ================================================================ */
.lang-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 0 12px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: var(--font-mono, 'Fira Code', monospace);
  transition: all var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}
.lang-toggle:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ================================================================
   PROJECT CARD — PARTNER BADGE + COLLAPSIBLE BODY
   ================================================================ */
.project-card-partner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle, rgba(59,130,246,0.06));
  border: 1px solid var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  padding: 3px 10px 3px 8px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

/* Collapsible body — override padding + add overflow for fold/unfold */
.project-card-body {
  position: relative;
  overflow: hidden;
  max-height: 130px;
  transition: max-height 0.45s ease;
}
.project-card-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.project-card.expanded .project-card-body {
  max-height: 900px;
}
.project-card.expanded .project-card-body::after {
  opacity: 0;
}

/* Expand / collapse toggle button */
.project-card-toggle-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 2rem 0;
}
.project-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  transition: color 0.2s ease;
  font-family: var(--font-mono, 'Fira Code', monospace);
  letter-spacing: 0.02em;
  opacity: 0.7;
}
.project-card-toggle:hover { color: var(--primary); opacity: 1; }
.project-card-toggle svg { transition: transform 0.35s ease; opacity: 0.6; }
.project-card-toggle:hover svg { opacity: 1; }
.project-card.expanded .project-card-toggle svg { transform: rotate(180deg); }
