﻿
:root {
  /* Light theme */
  --bg: #0b1220;
  --bg-soft: rgba(11, 18, 32, 0.06);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.6);
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.68);
  --border: rgba(11, 18, 32, 0.12);
  --shadow: 0 20px 50px rgba(11, 18, 32, 0.12);
  --accent: #5b7cfa;
  --accent-2: #10b981;
  --ring: rgba(91, 124, 250, 0.35);
}

html[data-theme="dark"] {
  /* Dark theme */
  --bg: #070a14;
  --bg-soft: rgba(255, 255, 255, 0.06);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --accent: #7aa2ff;
  --accent-2: #22c55e;
  --ring: rgba(122, 162, 255, 0.3);
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji";
  background: radial-gradient(1100px 600px at 10% -10%, rgba(91, 124, 250, 0.25), transparent 60%),
    radial-gradient(900px 500px at 95% 10%, rgba(34, 197, 94, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.35));
  color: var(--text);
}

html[data-theme="dark"] body {
  background: radial-gradient(1200px 700px at 10% -10%, rgba(122, 162, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 95% 10%, rgba(34, 197, 94, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(7, 10, 20, 1), rgba(7, 10, 20, 1));
}

/* Utility */
.text-accent {
  color: var(--accent) !important;
}

.section-pad {
  padding: 5.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

html[data-theme="dark"] .section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

section[id] {
  scroll-margin-top: 90px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 9999;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  left: 0.75rem;
  outline: 3px solid var(--ring);
}

/* Navbar */
.navbar-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 180ms ease, box-shadow 180ms ease;
}

html[data-theme="dark"] .navbar-glass {
  background: rgba(7, 10, 20, 0.6);
}

.navbar-glass.is-scrolled {
  box-shadow: 0 8px 30px rgba(11, 18, 32, 0.1);
}

html[data-theme="dark"] .navbar-glass.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)), var(--accent);
  box-shadow: 0 0 0 6px rgba(91, 124, 250, 0.12);
}

.nav-link {
  border-radius: 0.75rem;
}

.nav-link.active {
  background: var(--bg-soft);
}

.navbar-toggler {
  border-color: var(--border);
}

/* Ensure the toggler icon is visible in both themes */
html[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1) saturate(0) brightness(1.1);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(91, 124, 250, 0.18);
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--accent) 90%, black 10%);
  border-color: color-mix(in oklab, var(--accent) 90%, black 10%);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

/* Hero */
.hero {
  padding-top: 7.5rem; /* offset fixed navbar */
}

.hero-kicker {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-avatar {
  display: block;
  width: 100%;
  height: auto;
}

.hero-card-body {
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.85rem;
  color: var(--muted);
}

.pill-soft {
  background: var(--bg-soft);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  text-decoration: none;
}

.icon-link:hover {
  color: var(--text);
}

.icon-link i {
  color: var(--accent);
}

/* Section titles */
.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 0;
}

/* Cards */
.card-soft {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.project-card {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(11, 18, 32, 0.16);
}

html[data-theme="dark"] .project-card:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.project-icon,
.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: radial-gradient(50% 60% at 30% 25%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(91, 124, 250, 0.25), rgba(34, 197, 94, 0.12));
  color: var(--text);
}

.project-icon i,
.service-icon i {
  color: var(--accent);
}

.tag {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.78rem;
}

.badge-skill {
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
}

/* Lists */
.list-check {
  list-style: none;
  padding-left: 0;
}

.list-check li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.list-check li:last-child {
  margin-bottom: 0;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 85%, white 15%);
  box-shadow: 0 0 0 4px rgba(91, 124, 250, 0.12);
}

/* Stats */
.stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--accent);
}

.stat-value {
  font-weight: 800;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.timeline-dot {
  position: absolute;
  left: 0.05rem;
  top: 1.2rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(91, 124, 250, 0.14);
}

.timeline-card {
  margin-left: 1.2rem;
}

/* Contact tiles */
.contact-tile {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: transform 150ms ease, background 150ms ease;
}

.contact-tile:hover {
  transform: translateY(-2px);
  background: var(--surface);
}

.contact-ico {
  width: 44px;
  height: 44px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--accent);
}
/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .footer {
  background: rgba(7, 10, 20, 0.75);
}

.footer-link {
  color: var(--muted);
  font-size: 1.1rem;
}

.footer-link:hover {
  color: var(--text);
}

/* Bootstrap theme alignment */
.text-secondary {
  color: var(--muted) !important;
}

.text-secondary-emphasis {
  color: color-mix(in oklab, var(--text) 88%, var(--muted) 12%) !important;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card,
  .contact-tile {
    transition: none;
  }
}
