/* ---------- Tokens ---------- */
:root {
  --background: 220 6% 96%;
  --foreground: 240 10% 4%;
  --muted: 220 6% 86%;
  --muted-foreground: 240 5% 28%;
  --border: 240 6% 85%;
  --card: 0 0% 100%;
  --primary: 187 74% 28%;
  --primary-foreground: 0 0% 100%;
  --accent: 270 70% 38%;
  --accent-foreground: 0 0% 100%;
  --gradient-from: 187 86% 53%;
  --gradient-to: 270 91% 65%;
  --dot-grid: 240 5% 35%;
  --hero-orb-primary: 187 74% 28% / 0.15;
  --hero-orb-accent: 270 70% 38% / 0.12;

  --font-body: "DM Sans", "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Bogart", "Inter", system-ui, sans-serif;

  --max-width: 960px;
  --radius: 1rem;
}

:root[data-theme="dark"] {
  --background: 240 6% 10%;
  --foreground: 0 0% 93%;
  --muted: 240 4% 14%;
  --muted-foreground: 240 5% 65%;
  --border: 240 4% 20%;
  --card: 240 5% 13%;
  --primary: 187 86% 53%;
  --primary-foreground: 240 10% 4%;
  --accent: 270 91% 70%;
  --accent-foreground: 0 0% 100%;
  --gradient-from: 187 86% 53%;
  --gradient-to: 270 91% 78%;
  --dot-grid: 240 5% 65%;
  --hero-orb-primary: 187 86% 53% / 0.08;
  --hero-orb-accent: 270 91% 70% / 0.10;
}

@font-face {
  font-family: "Bogart";
  src: url("../fonts/bogart.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(circle at 20% 10%, hsl(var(--primary) / 0.12), transparent 28rem),
    radial-gradient(circle at 80% 0%, hsl(var(--accent) / 0.1), transparent 30rem),
    radial-gradient(circle, hsl(var(--dot-grid) / 0.25) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(14px);
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 45px hsl(var(--foreground) / 0.12);
  transition: background-color 0.3s ease, border-color 0.2s ease;
}
.theme-toggle:hover { border-color: hsl(var(--primary) / 0.5); }
.theme-toggle__icon { width: 1.25rem; height: 1.25rem; }
.theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

/* ---------- Left sitemap (scroll-spy) ---------- */
.sitemap {
  position: fixed;
  top: 8rem;
  left: 2.5rem;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sitemap.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.sitemap__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-left: 1.5rem;
}
.sitemap__list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: hsl(var(--border));
}
.sitemap__link {
  position: relative;
  text-decoration: none;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}
.sitemap__dot {
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid hsl(var(--border));
  background: hsl(var(--card));
  transition: background 0.2s ease, border-color 0.2s ease;
}
.sitemap__item.is-active .sitemap__link {
  color: hsl(var(--primary));
  font-weight: 600;
}
.sitemap__item.is-active .sitemap__dot {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

@media (max-width: 1600px) {
  .sitemap { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: center;
}
.hero__snakes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero__tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.05) 55%, transparent);
}
.hero__orb {
  position: absolute;
  z-index: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}
.hero__orb--primary {
  top: 0;
  right: max(0px, calc(50% - 30rem));
  background: hsl(var(--hero-orb-primary));
  animation: hero-glow-primary 8s ease-in-out infinite;
}
.hero__orb--accent {
  bottom: 0;
  left: max(0px, calc(50% - 30rem));
  width: 380px;
  height: 380px;
  background: hsl(var(--hero-orb-accent));
  animation: hero-glow-accent 11s ease-in-out infinite reverse;
}
@keyframes hero-glow-primary {
  0%, 100% { transform: translate(33%, -33%) scale(1); opacity: 0.6; }
  50% { transform: translate(33%, -33%) scale(1.12); opacity: 1; }
}
@keyframes hero-glow-accent {
  0%, 100% { transform: translate(-33%, 33%) scale(1); opacity: 0.6; }
  50% { transform: translate(-33%, 33%) scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__orb { animation-name: none; }
}
@media (max-width: 640px) {
  .hero__orb { display: none; }
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: left;
}
.hero__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 80px hsl(var(--primary) / 0.16), 0 0 0 10px hsl(var(--card) / 0.75);
}
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__eyebrow {
  margin: 0 0 0.5rem;
  color: hsl(var(--primary));
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.06em;
  margin-bottom: 0;
  min-height: 1.2em;
}
.hero__role {
  background: linear-gradient(90deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__role::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: hsl(var(--gradient-from));
  margin-left: 2px;
  border-radius: 2px;
  transform: translateY(2px);
  animation: hero-blink 1s steps(1) infinite;
}
@keyframes hero-blink { 50% { opacity: 0; } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.role-pills {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.role-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.78);
  backdrop-filter: blur(14px);
  color: hsl(var(--muted-foreground));
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.role-pill.is-active {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--gradient-from) / 0.18), hsl(var(--gradient-to) / 0.16));
  color: hsl(var(--foreground));
  font-weight: 600;
  transform: scale(1.05);
}

.hero__sub {
  max-width: 860px;
  margin: 0 auto;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-wrap: balance;
}
.hero__sub--lead {
  max-width: 860px;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}
.hero__sub-highlight {
  background: linear-gradient(90deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: inherit;
  font-weight: 600;
}
.hero__sub-strong {
  color: hsl(var(--foreground));
  font: inherit;
  font-weight: 600;
}
.hero__sub-accent {
  background: linear-gradient(90deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: inherit;
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero__inner { flex-direction: column; text-align: center; }
  .role-pills { justify-content: center; }
}

/* ---------- Intro ---------- */
.intro {
  text-align: center;
  padding-top: 0;
}
.intro .section__inner {
  display: grid;
  gap: 1.25rem;
  max-width: 960px;
}

.pill-nav {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.pill-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: hsl(var(--card) / 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 14px 40px hsl(var(--foreground) / 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pill-nav__link:hover {
  border-color: hsl(var(--primary) / 0.5);
  transform: translateY(-2px);
  box-shadow: 0 20px 55px hsl(var(--primary) / 0.12);
}
.pill-nav__link--accent {
  background: linear-gradient(135deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  color: hsl(var(--primary-foreground));
  border-color: transparent;
}

.pill-nav__icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.pill-nav__icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- Sections ---------- */
.section { padding: 4.75rem 1.5rem; }
.section--muted {
  background: hsl(var(--muted) / 0.42);
  border-top: 1px solid hsl(var(--border) / 0.65);
  border-bottom: 1px solid hsl(var(--border) / 0.65);
}
.section__inner { max-width: var(--max-width); margin: 0 auto; }
#experience .section__inner,
#projects .section__inner,
#credentials .section__inner,
#skills .section__inner {
  max-width: 1120px;
}
.section__inner--center { text-align: center; }
.section__inner--center .section__lede { margin-left: auto; margin-right: auto; }
.section__title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section__lede {
  color: hsl(var(--muted-foreground));
  margin-bottom: 2.5rem;
  max-width: 720px;
}

/* draft/placeholder content marker */
[data-draft="true"] {
  outline: 2px dashed hsl(38 90% 50% / 0.6);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* ---------- Experience ---------- */
.experience__inner {
  max-width: 1120px;
}
.experience__head {
  justify-content: center;
  margin-bottom: 2.75rem;
}
.experience__lede {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: hsl(var(--muted-foreground));
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  text-align: center;
}
.experience__lede strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}
.experience-capabilities {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 760px;
  margin: 0 auto 4.5rem;
}
.experience-capability {
  min-height: 9rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 0.9);
  background: hsl(var(--card) / 0.54);
  padding: 1rem;
}
.experience-capability__icon {
  display: inline-flex;
  align-items: center;
  color: hsl(var(--primary));
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0.45rem 1rem 0;
  vertical-align: middle;
}
.experience-capability h3 {
  display: inline;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  vertical-align: middle;
}
.experience-capability p {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  max-width: 100%;
  margin: 0 auto;
}
.experience-role {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
}
.experience-role__marker {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 32px hsl(var(--primary) / 0.22);
}
.experience-role__body {
  min-width: 0;
}
.experience-role__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.experience-role__company {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
}
.experience-role__title {
  color: hsl(var(--primary));
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.experience-role__meta {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}
.experience-role__summary {
  color: hsl(var(--foreground));
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.experience-role__bullets {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
}
.experience-role__bullets li {
  position: relative;
  color: hsl(var(--muted-foreground));
  font-size: 0.96rem;
  line-height: 1.55;
  padding-left: 1rem;
}
.experience-role__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: hsl(var(--primary));
}

/* --- Experience project card styles --- */
.experience-projects {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.experience-project {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 13.25rem;
  padding: 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 0.9);
  background: hsl(var(--card) / 0.82);
  box-shadow: 0 18px 55px hsl(var(--foreground) / 0.06);
}
.experience-project--featured {
  grid-column: span 3;
  min-height: 20rem;
  background: transparent;
  box-shadow: none;
}
.experience-project--wide {
  grid-column: span 3;
  min-height: 10.5rem;
  border-color: hsl(140 48% 48% / 0.32);
  background: linear-gradient(135deg, hsl(140 48% 48% / 0.08), hsl(var(--card) / 0.8));
}
.experience-project--accent {
  border-color: hsl(var(--accent) / 0.3);
}
.experience-project__top,
.experience-project__mini-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.experience-project__top {
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.experience-project__mini-head {
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.experience-project__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  flex-shrink: 0;
}
.experience-project--accent .experience-project__icon {
  background: hsl(var(--accent) / 0.12);
  color: hsl(var(--accent));
}
.experience-project__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}
.experience-project--compact .experience-project__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  background: transparent;
}
.experience-project__mini-head .experience-project__icon {
  margin-bottom: 0;
}
.experience-project__mini-head .experience-project__pill {
  margin-left: auto;
}
.experience-project__pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.65rem;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.experience-project__top .experience-project__pill,
.experience-project__mini-head .experience-project__pill {
  margin: 0;
}
.experience-project--accent .experience-project__pill {
  background: hsl(var(--accent) / 0.12);
  color: hsl(var(--accent));
}
.experience-project__title {
  color: hsl(var(--foreground));
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}
.experience-project--featured .experience-project__title {
  font-size: 1.35rem;
}
.experience-project__desc {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}
.experience-project__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1rem 0 1.25rem;
}
.experience-project__list li {
  position: relative;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  line-height: 1.45;
  padding-left: 1rem;
}
.experience-project__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: currentColor;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
}
.experience-project__desc + .project-tags {
  margin-top: 1.1rem;
}
.project-tags + .project-code-link {
  margin-top: 0;
}
.experience-project__button,
.experience-project__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  color: hsl(var(--primary));
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.experience-project__button {
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid hsl(var(--primary) / 0.32);
  border-radius: 0.45rem;
  background: hsl(var(--primary) / 0.08);
  font-size: 0.9rem;
}
.experience-project--accent .experience-project__button,
.experience-project--accent .experience-project__link {
  color: hsl(var(--accent));
}
.experience-project--accent .experience-project__button {
  border-color: hsl(var(--accent) / 0.32);
  background: hsl(var(--accent) / 0.08);
}

.experience-project__button:hover,
.experience-project__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-code-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  color: hsl(var(--primary));
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.project-code-link:hover {
  color: hsl(var(--primary));
  text-decoration: none;
}
.project-code-link__github,
.project-code-link__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.project-code-link__github img,
.project-code-link__github svg,
.project-code-link__stat svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  object-fit: contain;
}
.project-code-link__github {
  color: hsl(var(--primary));
}
.project-code-link__stat {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}
.project-code-link__stat--star svg {
  color: #f5b400;
}
.experience-project__button.project-code-link,
.experience-project__link.project-code-link {
  align-self: flex-start;
  margin-top: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@media (min-width: 720px) {
  .experience-capabilities {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .experience-role {
    gap: 1.25rem;
  }
}

@media (max-width: 719px) {
  .experience__head {
    justify-content: flex-start;
    margin-bottom: 1.75rem;
  }
  .experience__lede {
    text-align: left;
    margin-bottom: 1.5rem;
  }
  .experience-capabilities {
    margin-bottom: 3rem;
  }
  .experience-role {
    grid-template-columns: 1fr;
  }
  .experience-role__marker {
    width: 2.25rem;
    height: 2.25rem;
  }
  .experience-projects {
    grid-template-columns: 1fr;
  }
  .experience-project,
  .experience-project--featured,
  .experience-project--wide {
    grid-column: auto;
    min-height: auto;
  }
}

/* ---------- Projects ---------- */
#projects .section__head {
  margin-bottom: 3rem;
}

.section__head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section__head-main {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.section__github {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.section__github img,
.section__github svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  object-fit: contain;
}

.section__github:hover {
  color: hsl(var(--primary));
}
#projects .section__lede {
  margin-bottom: 2rem;
}
.agent-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.5rem;
  padding: 1.5rem;
  border: 1px solid hsl(38 50% 56% / 0.35);
  border-radius: calc(var(--radius) * 1.1);
  background:
    linear-gradient(135deg, hsl(38 60% 80% / 0.22), hsl(var(--card) / 0.74)),
    hsl(var(--card) / 0.72);
  box-shadow: 0 24px 80px hsl(var(--foreground) / 0.06);
}
.agent-card__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.agent-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  background: hsl(38 75% 45% / 0.14);
  color: hsl(38 78% 34%);
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
}
.agent-card__title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 0.35rem;
}
.agent-card__desc {
  max-width: 820px;
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}
.agent-card__orchestrator {
  position: relative;
  min-height: 4.5rem;
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid hsl(38 55% 52% / 0.22);
  border-radius: calc(var(--radius) * 0.75);
  background: hsl(38 70% 76% / 0.16);
}
.agent-card__label {
  position: absolute;
  top: -0.55rem;
  left: 1rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: hsl(38 70% 76% / 0.75);
  color: hsl(38 78% 34%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.agent-card__orchestrator-body { display: flex; align-items: flex-start; gap: 0.85rem; }
.agent-card__orchestrator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: hsl(38 75% 45% / 0.16);
  color: hsl(38 78% 34%);
  flex-shrink: 0;
}
.agent-card__orchestrator-icon svg { width: 1.3rem; height: 1.3rem; }
.agent-card__orchestrator h4,
.agent-mini h4 {
  color: hsl(var(--foreground));
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}
.agent-private {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.agent-card__orchestrator p,
.agent-mini p {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0;
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.agent-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 5.25rem;
  padding: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.9);
  border-radius: calc(var(--radius) * 0.7);
  background: hsl(var(--card) / 0.7);
}
.agent-mini > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: hsl(var(--muted) / 0.75);
  color: hsl(var(--primary));
  font-size: 0.9rem;
  font-weight: 800;
}
#projects .experience-projects {
  margin-top: 0;
  margin-bottom: 1.5rem;
}
#projects .experience-project--featured {
  padding-top: 1.75rem;
}
.tiles--restored {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border) / 0.65);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.tile {
  text-decoration: none;
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 22px 70px hsl(var(--foreground) / 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tile--with-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tile__main-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.tile__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid hsl(var(--border) / 0.75);
  color: hsl(var(--muted-foreground));
  font-size: 0.88rem;
  line-height: 1.2;
}

.tile__reddit-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}
.tile__reddit-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  white-space: nowrap;
}
.tile__reddit-stat svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 1rem;
}
.tile__footer a {
  color: hsl(var(--primary));
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tile__footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tile:hover {
  border-color: hsl(var(--primary) / 0.4);
  transform: translateY(-3px);
  box-shadow: 0 28px 90px hsl(var(--primary) / 0.1);
}
.tile__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}
.tile__title { font-size: 1.125rem; margin: 0.35rem 0 0.75rem; }

.tile__img-wrap {
  border-radius: calc(var(--radius) - 0.25rem);
  overflow: hidden;
}

.claude-power-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid hsl(var(--accent) / 0.25);
  border-radius: calc(var(--radius) * 1.35);
  background: hsl(var(--card) / 0.68);
  box-shadow: 0 24px 70px hsl(var(--accent) / 0.08);
}
.claude-power-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: hsl(var(--accent) / 0.16);
  color: hsl(var(--accent));
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.claude-power-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.claude-power-card__head h3 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.claude-power-card__head span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: hsl(var(--accent) / 0.13);
  color: hsl(var(--accent));
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}
.claude-power-card__body > p {
  max-width: 76rem;
  margin: 0 0 1.2rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.5;
}
.claude-power-card__list {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  line-height: 1.45;
}
.claude-power-card__list li {
  position: relative;
  padding-left: 1.15rem;
}
.claude-power-card__list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: hsl(var(--accent));
  font-weight: 900;
}
.claude-power-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.claude-power-card__badges span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  background: hsl(var(--accent) / 0.12);
  color: hsl(var(--muted-foreground));
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
}

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


@media (max-width: 640px) {
  .section__head--split {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 2rem;
  }
  .agent-card {
    padding: 1rem;
  }
  .agent-card__head {
    flex-direction: column;
  }
  .agent-grid,
  .tiles {
    grid-template-columns: 1fr;
  }
  .claude-power-card {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
  .claude-power-card__icon {
    width: 2.8rem;
    height: 2.8rem;
  }
}

/* ---------- Section header icon (Skills/Education/Certifications) ---------- */
.section__head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 3rem; }
.section__head .section__title { margin-bottom: 0; }
.section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, hsl(var(--gradient-from) / 0.18), hsl(var(--gradient-to) / 0.14));
  color: hsl(var(--primary));
}
.section__icon svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Skills ---------- */
.skills-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.skills-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.skills-col__title { font-size: 1rem; margin-bottom: 0.75rem; }
.skills-col__title--icon { display: flex; align-items: center; gap: 0.5rem; }
.skills-col__icon { display: inline-flex; color: hsl(var(--primary)); }
.skills-col__icon svg { width: 1.1rem; height: 1.1rem; }

.lang-list { display: flex; flex-direction: column; gap: 0.85rem; }
.lang-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.lang-row__name { font-weight: 600; }
.lang-row__level { color: hsl(var(--muted-foreground)); font-size: 0.875rem; }
.lang-row__level--native { color: hsl(var(--primary)); font-weight: 600; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}
.badge__icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.badge--accent {
  background: hsl(var(--accent) / 0.12);
  color: hsl(var(--accent));
  border-color: transparent;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: start;
  gap: 1.25rem;
}
.tech-card {
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 22px 70px hsl(var(--foreground) / 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tech-card:hover {
  border-color: hsl(var(--primary) / 0.32);
  transform: translateY(-2px);
  box-shadow: 0 28px 90px hsl(var(--primary) / 0.1);
}
.tech-card__title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  background: linear-gradient(90deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 1rem;
}

@media (max-width: 700px) {
  .skills-layout { grid-template-columns: 1fr; gap: 2rem; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .tech-grid { grid-template-columns: 1fr; }
}

/* ---------- Education & Certifications ---------- */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.credentials-col__head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.credentials-col__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
}
.credentials-col__icon svg { width: 1.25rem; height: 1.25rem; }
.credentials-col__icon--edu { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); }
.credentials-col__icon--cert { background: hsl(var(--accent) / 0.12); color: hsl(var(--accent)); }
.credentials-col__title { font-size: 1.375rem; font-weight: 700; margin: 0; }

@media (max-width: 700px) {
  .credentials-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- Education ---------- */
.edu-list { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 22px 70px hsl(var(--foreground) / 0.06);
}
.edu-card__meta { margin: 0 0 0.5rem; font-size: 0.8125rem; color: hsl(var(--primary)); font-weight: 600; }
.edu-card__title { font-size: 1.125rem; margin-bottom: 0.5rem; }
.edu-card__desc { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }
.edu-card__link {
  display: inline-block;
  margin-top: 0.5rem;
  color: hsl(var(--primary));
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---------- Certifications ---------- */
.cert-card {
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 70px hsl(var(--foreground) / 0.06);
}
.cert-list { display: flex; flex-direction: column; }
.cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
}
.cert-row:last-child { border-bottom: none; }
.cert-row__main { display: flex; align-items: baseline; gap: 1.25rem; }
.cert-row__year { font-family: monospace; color: hsl(var(--primary)); flex-shrink: 0; }
.cert-row__name { margin: 0; font-weight: 600; }
.cert-row__issuer { margin: 0.15rem 0 0; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.cert-row__mark {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

/* ---------- Contact ---------- */
.contact__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}
.btn {
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  color: hsl(var(--primary-foreground));
  border-color: transparent;
}
.btn:hover {
  border-color: hsl(var(--primary) / 0.5);
  transform: translateY(-2px);
  box-shadow: 0 20px 55px hsl(var(--primary) / 0.12);
}
.footer__copyright {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}
.footer__link {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__link:hover { color: hsl(var(--primary)); }


/* ---------- Legal / prose pages ---------- */
.page-header {
  max-width: 768px;
  margin: 0 auto;
  padding: 2rem 1rem 0;
}
.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--primary));
  text-decoration: none;
  margin-bottom: 2rem;
}
.page-header__back:hover { text-decoration: underline; text-underline-offset: 2px; }
.page-header__title {
  font-size: 1.875rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.page-header__updated {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 2.5rem;
}
.page-header__lede {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.625;
  letter-spacing: 0;
  margin: 0 0 2rem;
}

.legal {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 1rem 4rem;
}
.legal__block {
  background: transparent;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.legal__title {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.legal__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.legal__list:last-child { margin-bottom: 0; }
.legal__list li {
  position: relative;
  padding-left: 1.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.5;
}
.legal__list li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0.05rem;
  color: hsl(var(--primary));
  font-size: 0.85rem;
  line-height: 1.5;
}
.legal__block p {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.625;
  margin: 0 0 1rem;
}
.legal__block p:last-child { margin-bottom: 0; }
.legal__block a {
  color: hsl(var(--primary));
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal__block a:hover { color: hsl(var(--primary) / 0.8); }

@media (min-width: 640px) {
  .page-header { padding: 2rem 1.5rem 0; }
  .legal { padding: 0 1.5rem 4.5rem; }
}

@media (min-width: 768px) {
  .page-header__title { font-size: 2.25rem; }
  .page-header__lede { font-size: 1.125rem; }
}

@media (min-width: 1024px) {
  .page-header { padding: 3rem 2rem 0; }
  .legal { padding: 0 2rem 5rem; }
}
