:root {
  --bg: #121212;
  --card: #1e1e1f;
  --muted: #bdbdbd;
  --accent: #2563eb;
  --container: 1100px;
  color-scheme: dark;
}

/* === Global === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: #e6e6e6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s ease, color 0.6s ease;
}

h1, h2, h3, .brand {
  font-family: 'Montserrat', sans-serif;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px;
}

section {
  width: 100%;
  margin: 0;
  padding: 100px 0;
  display: block;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.4s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.brand {
  font-weight: 700;
}

.nav a {
  color: #ddd;
  text-decoration: none;
  margin: 0 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.nav a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.theme-btn {
  background: none;
  border: 0;
  color: #ddd;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
}

/* === Hero Section === */
.hero {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-inner h1 {
  font-weight: 800;
  font-size: 64px;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #ffffff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background 0.5s ease;
}

.light .hero-inner h1 {
  background: linear-gradient(90deg, #111111 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 1.2rem;
  font-weight: 400;
  color: #cfcfcf;
  margin-top: 10px;
}

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

/* === CTA Buttons === */
.cta {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Dark mode buttons */
.btn {
  background: rgba(255, 255, 255, 0.05);
  color: #e6e6e6;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Primary Button */
.btn.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
  animation: soft-pulse 2.5s infinite ease-in-out;
}

.btn.primary:hover {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.9);
}

/* Secondary Button */
.btn.smooth {
  background: transparent;
  color: #e6e6e6;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn.smooth:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

/* Pulse Animation */
@keyframes soft-pulse {
  0% { box-shadow: 0 0 8px rgba(37,99,235,0.4); }
  50% { box-shadow: 0 0 22px rgba(37,99,235,0.8); }
  100% { box-shadow: 0 0 8px rgba(37,99,235,0.4); }
}

/* === About Section === */
.about {
  padding: 80px 0;
  text-align: left;
}

.about-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 6px solid rgba(37, 99, 235, 0.15);
  object-fit: cover;
  display: block;
}

.about-right {
  flex: 1;
  min-width: 280px;
}

.about-right h2 {
  font-size: 36px;
  margin: 0 0 10px;
}

/* === Projects Section === */
.projects {
  padding: 80px 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.card {
  background: var(--card);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(1, 1, 1, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.card .hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: scaleY(0.9);
  transition: max-height 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}

.card .hidden.open {
  max-height: 200px;
  opacity: 1;
  transform: scaleY(1);
}

/* === Certificates Section === */
.certs {
  padding: 80px 0;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.cert-card {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.6s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.cert-card h3 {
  color: #fff;
  margin: 8px 0;
  font-size: 1.1rem;
}

.cert-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* === Badges === */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
  color: #fff;
}

.badge.internship { background: #f59e0b; }
.badge.achievement { background: #2563eb; }
.badge.finalist { background: #e11d48; }
.badge.course { background: #059669; }
.badge.participation { background: #9333ea; }

/* === Contact Section === */
.contact {
  padding: 80px 0;
  text-align: center;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0;
}

/* Contact Buttons */
.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e6e6e6;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

/* === Light Theme === */
:root.light {
  --bg: #f9f9f9;
  --card: #ffffff;
  --muted: #444;
  --accent: #2563eb;
  color: #111;
}

.light body {
  background: var(--bg);
  color: #111;
}

.light .site-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.light .nav a {
  color: #333;
}

.light .btn {
  background: rgba(0, 0, 0, 0.04);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.light .btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.light .btn.secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.light .btn.secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

.light .cert-card h3 {
  color: #111;
}

.light .badge.internship { background: #f59e0b; color: #fff; }
.light .badge.achievement { background: #2563eb; color: #fff; }
.light .badge.finalist { background: #e11d48; color: #fff; }
.light .badge.course { background: #059669; color: #fff; }
.light .badge.participation { background: #9333ea; color: #fff; }

/* === Responsive === */
@media (max-width: 900px) {
  .about-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .avatar {
    margin-bottom: 20px;
  }
  .hero-inner h1 {
    font-size: 36px;
  }
  .cards, .certificates-grid {
    grid-template-columns: 1fr;
  }
}
/* === Project Learn More Links === */
.card .learn {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.card .learn:hover {
  color: #60a5fa;
  transform: translateY(-2px);
}

.card .learn:active {
  transform: translateY(1px);
}
/* Fix tagline visibility in light mode */
.light .tagline {
  color: #333 !important; /* Dark gray for visibility */
}

/* Optional: improve contrast in dark mode too */
.tagline {
  color: #cfcfcf;
}
/* === Footer Section === */
.site-footer {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  text-align: center;
  padding: 35px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 5px 0;
}

.site-footer strong {
  color: #fff;
}

/* Light theme adjustment */
.light .site-footer {
  background: rgba(255, 255, 255, 0.85);
  color: #444;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.light .site-footer strong {
  color: #000;
}
/* ===========================
   SKILLS SECTION (cleaned & merged)
   =========================== */

#skills {
  padding: 80px 0 100px 0;
}

/* Title */
.skills-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 36px;
  text-align: center;
}

/* Layout */
.skills-wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
}
.skills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Base card style (matches projects/certs) */
.skill-panel {
  background: var(--card);               /* theme-aware */
  color: inherit;
  border-radius: 14px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 30px rgba(0,0,0,0.55);
  min-height: 220px;
  position: relative;
  overflow: visible;

  /* reveal animation initial state */
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform, box-shadow;
  transform-origin: center;
  transition: transform 260ms cubic-bezier(.2,.9,.25,1), box-shadow 260ms cubic-bezier(.2,.9,.25,1), opacity 260ms ease;
  cursor: default;
}

/* Reveal animation state — when observer adds .visible */
.skill-panel.visible {
  opacity: 1;
  transform: none;
}

/* Headings & list */
.skill-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
}

.skill-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--muted);
}
.skill-list li {
  margin-bottom: 10px;
}

/* Hover/focus micro-interaction — only on hover-capable devices */
/* Subtle hover/focus micro-interaction (replaces previous heavier version) */
@media (hover: hover) and (pointer: fine) {
  .skill-panel {
    /* softer base shadow so hover change is gentle */
    box-shadow: 0 8px 26px rgba(0,0,0,0.35);
    transition: transform 220ms cubic-bezier(.2,.9,.25,1), box-shadow 220ms cubic-bezier(.2,.9,.25,1), opacity 220ms ease;
  }

  .skill-panel:hover,
  .skill-panel:focus-within {
    transform: translateY(-6px) scale(1.015); /* subtle lift + very small scale */
    box-shadow:
      0 18px 46px rgba(2,6,23,0.36), /* softer deep shadow */
      0 5px 16px rgba(0,0,0,0.22);
    cursor: pointer; /* remove if non-interactive */
  }

  .skill-panel:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: 120ms;
  }
}

/* Accessible keyboard focus styling for non-hover devices too */
.skill-panel:focus-visible {
  outline: 3px solid rgba(37,99,235,0.14);
  outline-offset: 6px;
}

/* Small screens */
@media (max-width: 980px) {
  .skills-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .skill-panel {
    padding: 20px;
    min-height: unset;
  }
  .skills-title {
    font-size: 36px;
  }
}
/* Make the skills card full width */
.full-panel {
  grid-column: span 2;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Mobile responsive */
@media (max-width: 980px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

