@media (prefers-color-scheme: light) {
  :root {
    --text-50: hsl(240, 54%, 95%);
    --text-100: hsl(240, 53%, 90%);
    --text-200: hsl(240, 55%, 80%);
    --text-300: hsl(240, 54%, 70%);
    --text-400: hsl(240, 54%, 60%);
    --text-500: hsl(240, 54%, 50%);
    --text-600: hsl(240, 54%, 40%);
    --text-700: hsl(240, 54%, 30%);
    --text-800: hsl(240, 55%, 20%);
    --text-900: hsl(240, 53%, 10%);
    --text-950: hsl(240, 54%, 5%);

    --background-50: hsl(240, 54%, 95%);
    --background-100: hsl(240, 57%, 90%);
    --background-200: hsl(240, 57%, 80%);
    --background-300: hsl(240, 56%, 70%);
    --background-400: hsl(240, 56%, 60%);
    --background-500: hsl(240, 56%, 50%);
    --background-600: hsl(240, 56%, 40%);
    --background-700: hsl(240, 56%, 30%);
    --background-800: hsl(240, 57%, 20%);
    --background-900: hsl(240, 57%, 10%);
    --background-950: hsl(240, 54%, 5%);

    --primary-50: hsl(240, 54%, 95%);
    --primary-100: hsl(240, 53%, 90%);
    --primary-200: hsl(240, 53%, 80%);
    --primary-300: hsl(240, 53%, 70%);
    --primary-400: hsl(240, 53%, 60%);
    --primary-500: hsl(240, 53%, 50%);
    --primary-600: hsl(240, 53%, 40%);
    --primary-700: hsl(240, 53%, 30%);
    --primary-800: hsl(240, 53%, 20%);
    --primary-900: hsl(240, 53%, 10%);
    --primary-950: hsl(240, 54%, 5%);

    --secondary-50: hsl(43, 54%, 95%);
    --secondary-100: hsl(40, 53%, 90%);
    --secondary-200: hsl(40, 53%, 80%);
    --secondary-300: hsl(40, 53%, 70%);
    --secondary-400: hsl(40, 53%, 60%);
    --secondary-500: hsl(40, 53%, 50%);
    --secondary-600: hsl(40, 53%, 40%);
    --secondary-700: hsl(40, 53%, 30%);
    --secondary-800: hsl(40, 53%, 20%);
    --secondary-900: hsl(40, 53%, 10%);
    --secondary-950: hsl(39, 54%, 5%);

    --accent-50: hsl(90, 54%, 95%);
    --accent-100: hsl(89, 53%, 90%);
    --accent-200: hsl(89, 53%, 80%);
    --accent-300: hsl(89, 53%, 70%);
    --accent-400: hsl(89, 53%, 60%);
    --accent-500: hsl(89, 53%, 50%);
    --accent-600: hsl(89, 53%, 40%);
    --accent-700: hsl(89, 53%, 30%);
    --accent-800: hsl(89, 53%, 20%);
    --accent-900: hsl(89, 53%, 10%);
    --accent-950: hsl(90, 54%, 5%);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-50: hsl(240, 52%, 5%);
    --text-100: hsl(240, 49%, 10%);
    --text-200: hsl(240, 51%, 20%);
    --text-300: hsl(240, 50%, 30%);
    --text-400: hsl(240, 50%, 40%);
    --text-500: hsl(240, 50%, 50%);
    --text-600: hsl(240, 50%, 60%);
    --text-700: hsl(240, 50%, 70%);
    --text-800: hsl(240, 50%, 80%);
    --text-900: hsl(240, 49%, 90%);
    --text-950: hsl(240, 52%, 95%);

    --background-50: hsl(240, 60%, 5%);
    --background-100: hsl(240, 61%, 10%);
    --background-200: hsl(240, 61%, 20%);
    --background-300: hsl(240, 59%, 30%);
    --background-400: hsl(240, 60%, 40%);
    --background-500: hsl(240, 60%, 50%);
    --background-600: hsl(240, 60%, 60%);
    --background-700: hsl(240, 59%, 70%);
    --background-800: hsl(240, 61%, 80%);
    --background-900: hsl(240, 61%, 90%);
    --background-950: hsl(240, 60%, 95%);

    --primary-50: hsl(240, 54%, 5%);
    --primary-100: hsl(240, 53%, 10%);
    --primary-200: hsl(240, 53%, 20%);
    --primary-300: hsl(240, 53%, 30%);
    --primary-400: hsl(240, 53%, 40%);
    --primary-500: hsl(240, 53%, 50%);
    --primary-600: hsl(240, 53%, 60%);
    --primary-700: hsl(240, 53%, 70%);
    --primary-800: hsl(240, 53%, 80%);
    --primary-900: hsl(240, 53%, 90%);
    --primary-950: hsl(240, 54%, 95%);

    --secondary-50: hsl(39, 54%, 5%);
    --secondary-100: hsl(40, 53%, 10%);
    --secondary-200: hsl(40, 53%, 20%);
    --secondary-300: hsl(40, 53%, 30%);
    --secondary-400: hsl(40, 53%, 40%);
    --secondary-500: hsl(40, 53%, 50%);
    --secondary-600: hsl(40, 53%, 60%);
    --secondary-700: hsl(40, 53%, 70%);
    --secondary-800: hsl(40, 53%, 80%);
    --secondary-900: hsl(40, 53%, 90%);
    --secondary-950: hsl(43, 54%, 95%);

    --accent-50: hsl(90, 54%, 5%);
    --accent-100: hsl(89, 53%, 10%);
    --accent-200: hsl(89, 53%, 20%);
    --accent-300: hsl(89, 53%, 30%);
    --accent-400: hsl(89, 53%, 40%);
    --accent-500: hsl(89, 53%, 50%);
    --accent-600: hsl(89, 53%, 60%);
    --accent-700: hsl(89, 53%, 70%);
    --accent-800: hsl(89, 53%, 80%);
    --accent-900: hsl(89, 53%, 90%);
    --accent-950: hsl(90, 54%, 95%);
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--background-50);
    --bg-card: white;
    --fg: var(--text-900);
    --fg-muted: var(--text-600);
    --fg-subtle: var(--text-400);
    --border: var(--background-200);
    --pill-bg: var(--primary-100);
    --pill-fg: var(--primary-700);
    --hero-accent: var(--primary-600);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--background-50);
    --bg-card: var(--background-100);
    --fg: var(--text-950);
    --fg-muted: var(--text-700);
    --fg-subtle: var(--text-500);
    --border: var(--background-200);
    --pill-bg: var(--primary-200);
    --pill-fg: var(--primary-900);
    --hero-accent: var(--primary-600);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  line-height: 1.15;
}

a {
  color: var(--hero-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.72;
}

/* ─── Navbar ────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-nav.scrolled {
  box-shadow: 0 4px 24px color-mix(in srgb, var(--primary-500) 12%, transparent);
}

.nav-brand {
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  color: var(--fg) !important;
  letter-spacing: -0.01em;
}

.nav-brand span {
  color: var(--hero-accent);
}

.nav-link-item {
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem !important;
  transition: color 0.2s;
}

.nav-link-item:hover {
  color: var(--fg) !important;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  background: color-mix(in srgb, var(--primary-500) 18%, transparent);
  top: -120px;
  right: -160px;
}

.hero::after {
  width: 380px;
  height: 380px;
  background: color-mix(in srgb, var(--accent-500) 12%, transparent);
  bottom: 40px;
  left: -100px;
}

/* ─── Hero Photo ────────────────────────────────────────────── */
.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-photo-ring {
  position: relative;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.hero-photo-ring img,
.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.hero-photo-placeholder {
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--fg-subtle);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-photo-placeholder i {
  font-size: 2.5rem;
  color: var(--fg-subtle);
}

/* glow ring */
.hero-photo-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  opacity: 0.15;
  filter: blur(16px);
  z-index: -1;
}

@media (max-width: 991px) {
  .hero-photo-wrap {
    margin-bottom: 2.5rem;
  }

  .hero-photo-ring {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 767px) {
  .hero-photo-ring {
    width: 160px;
    height: 160px;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hero-accent);
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--fg-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.hero-bio {
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 2.25rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--hero-accent);
  color: #fff;
  border: 1.5px solid var(--hero-accent);
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
}

.btn-primary-custom:hover {
  background: var(--primary-400);
  border-color: var(--primary-400);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-500) 30%, transparent);
}

.btn-ghost-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}

.btn-ghost-custom:hover {
  border-color: var(--hero-accent);
  color: var(--hero-accent);
  background: color-mix(in srgb, var(--primary-500) 6%, transparent);
  transform: translateY(-1px);
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--fg-subtle);
  margin-top: 2rem;
}

/* ─── Section Shared ────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 3rem;
  color: var(--fg);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card-custom {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
  height: 100%;
}

.card-custom:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px
    color-mix(in srgb, var(--primary-500) 14%, transparent);
  border-color: color-mix(in srgb, var(--primary-500) 40%, transparent);
}

/* ─── Project Image ─────────────────────────────────────────── */
.project-img-wrap {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
}

.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-custom:hover .project-img-wrap img {
  transform: scale(1.04);
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--fg-subtle);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-img-placeholder i {
  font-size: 1.8rem;
}

/* ─── Experience ────────────────────────────────────────────── */
.exp-item {
  position: relative;
  padding-left: 1.5rem;
}

.exp-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hero-accent);
}

.exp-item + .exp-item {
  margin-top: 2.5rem;
}

.exp-item::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 1.4rem;
  width: 1px;
  bottom: -2.5rem;
  background: var(--border);
}

.exp-item:last-child::after {
  display: none;
}

.exp-company {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hero-accent);
}

.exp-role {
  font-family: "DM Serif Display", serif;
  font-size: 1.25rem;
  color: var(--fg);
  margin: 0.2rem 0 0.1rem;
}

.exp-date {
  font-size: 0.78rem;
  color: var(--fg-subtle);
  margin-bottom: 0.75rem;
}

.exp-bullets {
  font-size: 0.9rem;
  padding-left: 1.1rem;
}

.exp-bullets li + li {
  margin-top: 0.35rem;
}

/* ─── Projects ──────────────────────────────────────────────── */
.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-fg);
  letter-spacing: 0.03em;
}

.project-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  color: var(--fg);
  margin: 0.6rem 0 0.4rem;
}

.project-desc {
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
  flex: 1;
}

.project-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.proj-link:hover {
  color: var(--hero-accent);
  border-color: var(--hero-accent);
  background: color-mix(in srgb, var(--primary-500) 6%, transparent);
}

/* ─── Skills ────────────────────────────────────────────────── */
.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 400;
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.15s;
}

.skill-pill:hover {
  background: var(--pill-bg);
  color: var(--pill-fg);
  border-color: color-mix(in srgb, var(--primary-500) 40%, transparent);
  transform: translateY(-2px);
}

/* ─── Education & Cert ──────────────────────────────────────── */
.edu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pill-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pill-fg);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-name {
  font-family: "DM Serif Display", serif;
  font-size: 1.5rem;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin: 0.25rem 0.6rem;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--hero-accent);
}

.footer-copy {
  font-size: 0.85rem;
}

/* ─── Scroll Fade In ────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Bootstrap overrides ───────────────────────────────────── */
.navbar-toggler {
  border-color: var(--border);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%237c7fbd' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 767px) {
  .hero {
    padding-top: 6.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero-bio {
    font-size: 0.95rem;
  }
}
