:root {
  /* Shared design tokens */
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --transition-fast: 0.25s ease;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.4);

  --font-main: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* DARK THEME (default) */
.theme-dark {
  --bg-gradient: radial-gradient(circle at top left, #2b9bff, #18122b 55%, #0f172a 100%);
  --card-bg: rgba(15, 23, 42, 0.9);
  --card-border: rgba(148, 163, 184, 0.3);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --accent-strong: #f97316;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --chip-bg: rgba(15, 23, 42, 0.8);
}

/* LIGHT THEME with PASTEL COLORS */
.theme-light {
  --bg-gradient: linear-gradient(135deg, #fdf2ff, #e0f2fe, #fef9c3);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(209, 213, 219, 0.9);
  --accent: #fb7185;          /* pastel rose */
  --accent-soft: rgba(251, 113, 133, 0.14);
  --accent-strong: #f97316;   /* warm accent */
  --text-main: #111827;
  --text-muted: #6b7280;
  --chip-bg: rgba(255, 255, 255, 0.9);
}

/* GLOBAL */

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

/* ✅ make sure the page can scroll on mobile */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;  /* no sideways scroll */
  overflow-y: auto;    /* allow vertical scroll */
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  transition: background 0.5s ease, color 0.4s ease;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

@media (min-width: 768px) {
  .page {
    padding: 2rem 1.5rem 4rem;
  }
}

/* Shell */

.glass-shell {
  border-radius: 2rem;
  border: 1px solid var(--card-border);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.9));
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.theme-light .glass-shell {
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.15);
}

/* NAVBAR */

.navbar {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  margin-bottom: 1.5rem;
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.theme-light .navbar-inner {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(209, 213, 219, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #38bdf8, #f97316, #a855f7, #38bdf8);
  padding: 2px;
}

.brand-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #e5e7eb;
  font-family: var(--font-mono);
}

.theme-light .brand-logo-inner {
  background: #f9fafb;
  color: #111827;
}

.brand-text-main {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.brand-text-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.nav-links {
  display: none;
  gap: 1rem;
  font-size: 0.8rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

/* Active nav link */
.nav-links a.active {
  color: #f9fafb;
  background: rgba(56, 189, 248, 0.15);
}

.theme-light .nav-links a.active {
  color: #111827;
  background: rgba(254, 249, 195, 0.9);
}

.nav-links a:hover {
  color: #f9fafb;
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

.theme-light .nav-links a:hover {
  color: #111827;
  background: rgba(243, 244, 246, 0.9);
}

@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }
}

/* Theme toggle button */

.theme-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.theme-light .theme-toggle {
  background: #fef9c3;
  color: #92400e;
  border-color: rgba(253, 224, 71, 0.8);
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

/* HERO (used on Home) */

.hero {
  padding: 2.5rem 2rem 2rem;
  display: grid;
  gap: 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 55%);
}

.theme-light .hero {
  background: radial-gradient(circle at top left, rgba(251, 113, 133, 0.18), transparent 55%);
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 3fr 2.3fr;
    align-items: center;
    padding: 2.8rem 3rem 2.4rem;
  }
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  font-size: 0.75rem;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.theme-light .hero-tagline {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 12px rgba(148, 163, 184, 0.35);
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}

.hero-title {
  font-size: clamp(2.1rem, 3vw + 1.4rem, 3rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
}

.hero-highlight {
  background: linear-gradient(120deg, #38bdf8, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero-subtitle strong {
  color: var(--text-main);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0b1220;
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.5);
}

.theme-light .btn-primary {
  background: linear-gradient(135deg, #fb7185, #f97316);
  color: #fff7ed;
  box-shadow: 0 12px 30px rgba(248, 113, 113, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 58px rgba(56, 189, 248, 0.65);
}

.theme-light .btn-primary:hover {
  box-shadow: 0 20px 50px rgba(248, 113, 113, 0.7);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--text-main);
}

.theme-light .btn-ghost {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(209, 213, 219, 0.9);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
  border-color: #38bdf8;
}

.theme-light .btn-ghost:hover {
  background: #fef3c7;
  border-color: #fbbf24;
}

.btn-icon {
  font-size: 1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.theme-light .meta-pill {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(209, 213, 219, 0.9);
}

/* Hero right card */

.hero-right-card {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.95));
  border-radius: 1.8rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.3rem;
  display: grid;
  gap: 1rem;
}

.theme-light .hero-right-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 242, 242, 0.9));
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  font-size: 0.8rem;
}

.hero-chip {
  background: var(--chip-bg);
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  padding: 0.7rem 0.75rem;
}

.hero-chip-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.hero-chip-main {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.hero-chip-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mini-pill {
  font-size: 0.7rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
}

.theme-light .mini-pill {
  background: #f9fafb;
}

/* SECTION BASE */

section {
  padding: 2rem 2rem 0;
}

@media (min-width: 768px) {
  section {
    padding: 2.3rem 3rem 0;
  }
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-title-badge {
  width: 8px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #f97316);
}

.section-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* SKILLS */

.skills-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.skill-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 1rem;
}

.skill-card h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.skill-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-chip {
  font-size: 0.7rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.theme-light .skill-chip {
  background: #f9fafb;
  border-color: rgba(209, 213, 219, 0.9);
}

.skill-chip.highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #e0f2fe;
}

.theme-light .skill-chip.highlight {
  color: #9b1c1f;
}

/* PROJECTS */

.projects-grid {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
}

@media (min-width: 880px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.project-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.project-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.project-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-tech {
  font-size: 0.72rem;
  margin-top: 0.3rem;
  color: var(--text-main);
}

.project-tech span {
  color: var(--accent-strong);
  font-weight: 500;
}

.project-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  margin-top: 0.7rem;
}

.project-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.project-pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

.theme-light .project-pill {
  background: #fefce8;
  border-color: rgba(250, 204, 21, 0.9);
}

/* EXPERIENCE & EDUCATION */

.timeline {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .timeline-wrap {
    display: grid;
    grid-template-columns: 3fr 2.1fr;
    gap: 1.2rem;
  }
}

.timeline-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 1rem;
  position: relative;
}

.timeline-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.timeline-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-list {
  font-size: 0.78rem;
  color: var(--text-main);
  padding-left: 1.1rem;
}

.timeline-list li {
  margin-bottom: 0.2rem;
}

.edu-list {
  font-size: 0.8rem;
  color: var(--text-main);
  display: grid;
  gap: 0.55rem;
}

.edu-item-title {
  font-weight: 500;
}

.edu-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* CONTACT */

.contact-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 1.1rem;
  margin-bottom: 2rem;
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 720px) {
  .contact-card {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
}

.contact-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 28rem;
}

.contact-info {
  font-size: 0.8rem;
  display: grid;
  gap: 0.3rem;
}

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

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

/* FOOTER */

.footer {
  padding: 0 2rem 1.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 768px) {
  .footer {
    padding: 0 3rem 1.4rem;
  }
}

/* ============================
   MOBILE & TABLET RESPONSIVE
   ============================ */

/* General small-screen tweaks */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;      /* remove sideways scroll */
  }

  .page {
    padding: 1.25rem 1rem 2.5rem;
  }

  .navbar-inner {
    padding: 0.5rem 0.9rem;
    gap: 0.5rem;
  }

  .brand-text-main {
    font-size: 0.9rem;
  }

  .brand-text-sub {
    font-size: 0.7rem;
  }

  /* stack hero left/right into one column */
  .hero {
    grid-template-columns: 1fr;
    padding: 1.8rem 1.4rem 1.6rem;
    gap: 1.25rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-right-card {
    margin-top: 0.4rem;
  }

  section {
    padding: 1.8rem 1.4rem 0;
  }

  /* skills cards: single column */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* projects: single column */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* timeline (experience + education): single column */
  .timeline-wrap {
    grid-template-columns: 1fr;
  }

  /* contact card: stack text + details */
  .contact-card {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .contact-title {
    font-size: 0.95rem;
  }

  .contact-text,
  .contact-info {
    font-size: 0.78rem;
  }
}

/* Extra-small phones (≤ 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .meta-pill {
    width: 100%;
    justify-content: center;
  }

  .project-card,
  .skill-card,
  .timeline-card,
  .contact-card {
    padding: 0.9rem;
  }
}

