:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card-bg: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --border-subtle: rgba(148, 163, 184, 0.3);
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.7);
  --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.45);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* Light theme overrides */
body.light {
  --bg: #f5f5f5;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent-soft: rgba(56, 189, 248, 0.08);
  --border-subtle: rgba(156, 163, 175, 0.4);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.15);
  --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #111827 0, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout helpers */

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

.section {
  padding: 64px 0;
}

.section-alt {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.98)
  );
}

.two-column {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .two-column {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: flex-start;
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.75),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

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

.logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9),
    0 10px 25px rgba(56, 189, 248, 0.45);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transition: width 0.2s ease;
}

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

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

.theme-toggle {
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at 0 0, #1f2937, #020617);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* Hero */

.hero {
  padding: 72px 0 40px;
}

.hero-inner {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  }
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.1rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-card {
  border-radius: 26px;
  background: radial-gradient(circle at top left, #0b1120, #020617);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 1px;
}

.hero-card-inner {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.07), #020617);
}

.hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.hero-card li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.hero-card li::before {
  content: "▹";
  color: #38bdf8;
  margin-top: 2px;
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(120deg, #38bdf8, #22c55e);
  color: #0b1120;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.5);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.secondary {
  border-color: rgba(148, 163, 184, 0.55);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.85);
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn.full-width {
  width: 100%;
}

/* About */

.about-highlight {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top right, #0f172a, #020617);
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  font-size: 0.9rem;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.stat-list li {
  margin-bottom: 8px;
}

/* Experience */

#experience h2 {
  margin-bottom: 28px;
}

.experience-item {
  padding: 20px 20px 18px;
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-subtle);
  margin-bottom: 16px;
}

.experience-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.experience-header h3 {
  margin: 0;
  font-size: 1rem;
}

.exp-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.experience-summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 6px 0 10px;
}

.experience-bullets {
  font-size: 0.88rem;
  padding-left: 18px;
  margin: 0;
}

.experience-bullets li {
  margin-bottom: 6px;
}

/* Skills */

.skills-grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

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

.skill-card {
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.85);
  padding: 18px 18px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-subtle);
  font-size: 0.9rem;
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.skill-card p {
  margin-top: 0;
  margin-bottom: 6px;
}

/* Impact */

#impact h2 {
  margin-bottom: 10px;
}

#impact .stat-list li {
  margin-bottom: 8px;
}

/* Contact */

#contact h2 {
  margin-bottom: 10px;
}

.contact-intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-layout {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

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

.contact-details {
  font-size: 0.9rem;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.download-btn {
  margin-bottom: 12px;
}

.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.contact-details li {
  margin-bottom: 6px;
}

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

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

.contact-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: radial-gradient(circle at 0 0, #1f2937, #020617);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.6);
}

.back-to-top.visible {
  display: flex;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 16px 0 26px;
  margin-top: 32px;
  background: radial-gradient(circle at top, #020617, #020617);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Typography */

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
  margin-top: 0;
}

p {
  margin-top: 0;
}

/* Responsive tweaks */

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .hero {
    padding-top: 56px;
  }

  .header-inner {
    padding-inline: 0.25rem;
  }

  .hero-card {
    order: -1;
  }

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