/* ----------------------------------------------------------
   Jesse Becker � Personal Site  |  style.css
---------------------------------------------------------- */

/* -- Reset & Base ----------------------------------------- */

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

:root {
  --blue:          #3B82F6;
  --blue-dark:     #1D4ED8;
  --blue-deeper:   #1E3A8A;
  --violet:        #8B5CF6;
  --violet-dark:   #6D28D9;
  --violet-deeper: #4C1D95;
  --teal:          #14B8A6;
  --teal-dark:     #0D9488;
  --cyan:          #06B6D4;
  --cyan-dark:     #0E7490;
  --orange:        #F97316;
  --orange-dark:   #EA580C;

  --grad-hero:    linear-gradient(135deg, #1E3A8A 0%, #4C1D95 55%, #0E7490 100%);
  --grad-banner:  linear-gradient(135deg, #1E3A8A 0%, #312E81 55%, #0C4A6E 100%);
  --grad-blue:    linear-gradient(135deg, #1D4ED8, #3B82F6);
  --grad-violet:  linear-gradient(135deg, #6D28D9, #8B5CF6);
  --grad-teal:    linear-gradient(135deg, #0D9488, #14B8A6);
  --grad-cyan:    linear-gradient(135deg, #0E7490, #06B6D4);
  --grad-text:    linear-gradient(135deg, #3B82F6, #8B5CF6);
  --grad-orange:  linear-gradient(135deg, #EA580C, #F97316);

  --page-bg:      #EEF2FF;
  --surface:      rgba(255, 255, 255, 0.88);
  --surface-solid:#FFFFFF;

  --shadow-sm:    0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.05);
  --shadow-card:  0 4px 24px rgba(30,58,138,.09), 0 1px 6px rgba(30,58,138,.07);
  --shadow-hover: 0 12px 40px rgba(30,58,138,.18), 0 4px 12px rgba(30,58,138,.10);
  --shadow-nav:   0 1px 24px rgba(15,23,42,.10);
  --shadow-float: 0 20px 60px rgba(30,58,138,.18), 0 4px 16px rgba(30,58,138,.10);

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;
  --border:         rgba(148,163,184,.20);
  --border-card:    rgba(255,255,255,.75);

  --r-sm:   .375rem;
  --r-md:   .75rem;
  --r-lg:   1rem;
  --r-xl:   1.5rem;
  --r-2xl:  2rem;
  --r-full: 999px;

  --nav-h:  4rem;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--page-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--text-primary);
}

p { color: var(--text-secondary); line-height: 1.7; }

#projects,
.project-card[id] {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

/* -- Navbar ----------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(238,242,255,.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--grad-hero);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.nav-logo-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-link {
  padding: .4rem .85rem;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s, background .2s;
}

.nav-link:hover { color: var(--text-primary); background: rgba(59,130,246,.08); }

.nav-link.active {
  color: var(--blue-dark);
  background: rgba(59,130,246,.12);
  font-weight: 600;
}

/* Resume nav link � subtle gradient pill */
.nav-link-resume {
  background: var(--grad-blue);
  color: #fff !important;
  padding: .38rem .9rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(59,130,246,.3);
  transition: transform .2s, box-shadow .2s;
}

.nav-link-resume:hover {
  background: var(--grad-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,.4);
}

.nav-link-resume.active {
  background: var(--grad-blue);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: background .2s;
}

.nav-toggle:hover { background: rgba(59,130,246,.08); }

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -- Background Orbs -------------------------------------- */

.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
}

.orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #3B82F6, transparent 70%);
  top: -250px; left: -200px;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8B5CF6, transparent 70%);
  top: 5%; right: -200px;
}

.orb-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #06B6D4, transparent 70%);
  bottom: -80px; left: 35%;
}

/* -- Homepage Hero ---------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  background: var(--grad-hero);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 6rem;
    overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255,255,255,.04), transparent);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

/* -- Page Banner (inner pages) ---------------------------- */

.page-banner {
  position: relative;
  z-index: 1;
  background: var(--grad-banner);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(255,255,255,.04), transparent);
  pointer-events: none;
}

.page-banner-inner { position: relative; max-width: 720px; margin: 0 auto; }

.page-banner-icon {
  display: block;
  margin-bottom: .4rem;
  color: rgba(255,255,255,.65);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: .01em;
  line-height: 1;
}

.page-banner h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: #fff;
  margin-bottom: .75rem;
}

.page-banner p {
  font-size: clamp(.9rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin: 0 auto;
}

/* Breadcrumb on deep-dive / case-study pages (sits in the dark banner) */
.cs-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .78rem;
}

.cs-crumbs a { color: rgba(255,255,255,.78); font-weight: 600; transition: color .2s; }
.cs-crumbs a:hover { color: #fff; text-decoration: underline; }
.cs-crumbs .cs-crumbs-current { color: rgba(255,255,255,.95); font-weight: 600; }
.cs-crumbs .cs-crumbs-sep { color: rgba(255,255,255,.4); }

/* Deep-dive banner: breadcrumb, project identity, then supporting metadata. */
.cs-page-banner {
  padding-top: 2.5rem;
  padding-bottom: 2.75rem;
}

.cs-page-banner .page-banner-inner { max-width: 780px; }

.cs-page-banner .cs-crumbs {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.35rem;
  padding: .45rem .8rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-full);
  background: rgba(255,255,255,.07);
  font-size: .72rem;
}

.cs-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .65rem;
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}

.cs-hero-kicker span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}

.cs-page-banner h1 {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
}

.cs-page-banner > .page-banner-inner > p:not(.cs-anonymized-note) {
  max-width: 650px;
}

.cs-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.15rem;
}

.page-banner.cs-page-banner .cs-anonymized-note {
  margin-top: 1.25rem;
  border-color: transparent;
  background: rgba(255,255,255,.06);
  font-size: .7rem;
}

/* -- Buttons ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.5rem;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: #fff;
  color: var(--blue-deeper);
  box-shadow: 0 4px 20px rgba(0,0,0,.16);
}

.btn-primary:hover { box-shadow: 0 8px 28px rgba(0,0,0,.22); }

.btn-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.38);
  backdrop-filter: blur(8px);
}

.btn-outline:hover { background: rgba(255,255,255,.20); }

.btn-blue {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,.35);
}

.btn-blue:hover { box-shadow: 0 8px 24px rgba(59,130,246,.45); }

.btn-violet {
  background: var(--grad-violet);
  color: #fff;
  box-shadow: 0 4px 16px rgba(109,40,217,.3);
}

.btn-violet:hover { box-shadow: 0 8px 24px rgba(109,40,217,.42); }

.btn-sm {
  padding: .45rem 1rem;
  font-size: .8rem;
}

/* -- Layout ----------------------------------------------- */

.container { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }

.section-alt {
  background: rgba(255,255,255,.50);
  backdrop-filter: blur(8px);
}

.section-header { text-align: center; margin-bottom: 3rem; }

.section-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .75rem;
}

.section-title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: .75rem; }

.section-subtitle { font-size: 1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

.section-note {
  font-size: .8rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 1rem auto 0;
  font-style: italic;
}

/* -- Stats Bar � Floating Card ---------------------------- */

.stats-bar {
  position: relative;
  z-index: 3;
  padding: 0 1.5rem;
  margin-top: -1.75rem;
  background: transparent;
}

.stats-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface-solid);
  border-radius: var(--r-xl);
  box-shadow: 0 8px 40px rgba(15,23,42,.22), 0 2px 12px rgba(15,23,42,.12);
  border: 1px solid rgba(255,255,255,.95);
  overflow: hidden;
}

.stat-item {
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-label { font-size: .78rem; color: var(--text-secondary); font-weight: 600; }
.stat-note { display: block; margin-top: .2rem; font-size: .66rem; font-weight: 400; color: var(--text-muted); letter-spacing: 0; line-height: 1.35; }

/* -- Card accent bars ------------------------------------- */

.card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.accent-blue   { background: var(--grad-blue); }
.accent-violet { background: var(--grad-violet); }
.accent-teal   { background: var(--grad-teal); }
.accent-cyan   { background: var(--grad-cyan); }
.accent-orange { background: var(--grad-orange); }
.accent-multi  { background: var(--grad-hero); }

/* -- Hero content ----------------------------------------- */

.hero-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,255,255,.32);
  backdrop-filter: blur(8px);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .05em;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.20);
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,.85);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: clamp(.9rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.65);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero-actions-primary {
  margin-bottom: 2.75rem;
}

.hero-actions-primary .btn {
  min-width: 155px;
  justify-content: center;
  border-radius: .5rem;
  box-shadow: 0 8px 22px rgba(15,23,42,.22);
}

.hero-actions-primary .btn-outline {
  background: rgba(15,23,42,.28);
  border-color: rgba(255,255,255,.68);
  box-shadow: 0 8px 22px rgba(15,23,42,.2);
}

.hero-actions-primary .btn-outline:hover {
  background: rgba(15,23,42,.42);
  border-color: rgba(255,255,255,.9);
}

.hero-actions-primary .btn span {
  font-size: 1rem;
  line-height: 1;
  transition: transform .2s;
}

.hero-actions-primary .btn:hover span {
  transform: translateX(3px);
}

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.pill {
  padding: .35rem .9rem;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.90);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
}

/* -- Summary Section -------------------------------------- */

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.summary-text h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.25rem; }
.summary-text p  { font-size: .95rem; margin-bottom: 1rem; }
.summary-text p:last-of-type { margin-bottom: 1.5rem; }

.summary-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.summary-mini {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .2s;
}

.summary-mini:hover { transform: translateY(-3px); }
.summary-mini-icon  { font-size: 1.2rem; font-weight: 800; letter-spacing: .06em; margin-bottom: .5rem; }
.summary-mini-label { font-size: .78rem; font-weight: 600; color: var(--text-secondary); }

/* -- Homepage "At a glance" snapshot ---------------------- */

.snapshot-section { padding-top: 4rem; padding-bottom: 1rem; }

.snapshot {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  border: 1px solid var(--border-card);
  border-radius: var(--r-2xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.snapshot::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-hero);
}

.snapshot-main h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); margin-bottom: .9rem; }
.snapshot-main p { font-size: .95rem; margin-bottom: 1.5rem; }

.snapshot-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.snapshot-facts {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding-left: 2.5rem;
  border-left: 1px solid var(--border);
}

.snapshot-facts li { display: flex; flex-direction: column; gap: .15rem; }

.snapshot-fact-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.snapshot-fact-value { font-size: .9rem; font-weight: 600; color: var(--text-secondary); }

@media (max-width: 768px) {
  .snapshot { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.75rem; }
  .snapshot-facts { padding-left: 0; border-left: none; padding-top: 1.5rem; border-top: 1px solid var(--border); }
}

/* -- Skills ----------------------------------------------- */

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }

.skill-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}

.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.skill-card-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.si-blue   { background: rgba(59,130,246,.12); }
.si-violet { background: rgba(139,92,246,.12); }
.si-teal   { background: rgba(20,184,166,.12); }
.si-cyan   { background: rgba(6,182,212,.12); }
.si-orange { background: rgba(249,115,22,.12); }
.si-green  { background: rgba(34,197,94,.12); }

.skill-card h3 { font-size: .95rem; font-weight: 600; }

.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.skill-tag {
  padding: .22rem .6rem;
  border-radius: var(--r-full);
  background: rgba(59,130,246,.08);
  color: var(--blue-dark);
  font-size: .72rem;
  font-weight: 500;
  border: 1px solid rgba(59,130,246,.14);
}

/* -- Featured Cards (Home) -------------------------------- */

.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.featured-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}

.featured-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.featured-card-img {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  flex-shrink: 0;
  /* Frosted glass text - stroke rendered under fill to hide counter artifacts */
  color: rgba(255,255,255,.38);
  -webkit-text-stroke: 2px rgba(255,255,255,.78);
  paint-order: stroke fill;
  text-shadow:
    0 0 28px rgba(255,255,255,.45),
    0 2px 8px rgba(0,0,0,.18);
}

.fci-blue   { background: linear-gradient(135deg, #1E3A8A, #3B82F6); }
.fci-violet { background: linear-gradient(135deg, #4C1D95, #8B5CF6); }
.fci-teal   { background: linear-gradient(135deg, #0E7490, #14B8A6); }
.fci-orange { background: linear-gradient(135deg, #C2410C, #F97316); }

.featured-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }

.featured-card h3 { font-size: 1.05rem; }

.featured-card p { font-size: .875rem; flex: 1; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .825rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-top: .5rem;
  transition: gap .2s;
}

.card-link:hover { gap: .55rem; }

/* -- Tags & Badges ---------------------------------------- */

.tag {
  display: inline-block;
  padding: .22rem .6rem;
  border-radius: var(--r-full);
  background: rgba(100,116,139,.09);
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 500;
  border: 1px solid rgba(100,116,139,.14);
}

.tag-blue   { background: rgba(59,130,246,.09); color: var(--blue-dark); border-color: rgba(59,130,246,.17); }
.tag-violet { background: rgba(139,92,246,.09); color: var(--violet-dark); border-color: rgba(139,92,246,.17); }
.tag-teal   { background: rgba(20,184,166,.09); color: var(--teal-dark); border-color: rgba(20,184,166,.17); }
.tag-cyan   { background: rgba(6,182,212,.09); color: var(--cyan-dark); border-color: rgba(6,182,212,.17); }
.tag-orange { background: rgba(249,115,22,.09); color: #C2410C; border-color: rgba(249,115,22,.17); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-blue   { background: rgba(59,130,246,.14); color: var(--blue-dark); }
.badge-violet { background: rgba(139,92,246,.14); color: var(--violet-dark); }
.badge-teal   { background: rgba(20,184,166,.14); color: var(--teal-dark); }
.badge-cyan   { background: rgba(6,182,212,.14); color: var(--cyan-dark); }
.badge-orange { background: rgba(249,115,22,.14); color: #C2410C; }

.badge-deep-dive {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(15,23,42,.055);
  border: 1px solid rgba(100,116,139,.16);
  color: var(--text-secondary);
}

.badge-deep-dive::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--violet);
}

/* -- Portfolio Filter Tabs -------------------------------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-tab {
  padding: .45rem 1rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--surface);
  background-clip: padding-box;
  color: var(--text-secondary);
  font-size: .825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  backdrop-filter: blur(8px);
}

.filter-tab:hover { border-color: var(--blue); color: var(--blue-dark); }

.filter-tab.active {
  background: var(--grad-blue);
  background-clip: border-box;
  border-color: var(--blue-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59,130,246,.35);
}

/* -- Project Cards (Portfolio) ---------------------------- */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }

.project-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: transform .25s, box-shadow .25s;
  overflow: hidden;
  position: relative;
}

.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.project-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

.project-title {
  font-size: 1.14rem;
  font-weight: 750;
  letter-spacing: -.018em;
  line-height: 1.25;
}

.project-summary {
  font-size: .875rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

.project-card .tags {
  gap: .32rem;
  padding-top: .05rem;
}

.project-card .tag {
  padding: .2rem .52rem;
  color: var(--text-muted);
  font-size: .69rem;
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem .85rem;
  padding: .9rem;
  background: rgba(241,245,249,.72);
  border: 1px solid rgba(148,163,184,.11);
  border-radius: var(--r-md);
  margin-top: auto;
}

.project-meta > div { min-width: 0; }

.meta-label {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7890B4;
  margin-bottom: .28rem;
}

.meta-value {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* Full-width outcome row beneath the two meta columns */
.project-meta .meta-full {
  grid-column: 1 / -1;
  padding-top: .7rem;
  border-top: 1px solid rgba(148,163,184,.18);
}

.project-meta .meta-full .meta-label { color: var(--teal-dark); }

.project-meta .meta-full .meta-value {
  color: var(--text-primary);
  font-weight: 600;
}

.project-card .card-link {
  margin-top: .05rem;
  padding-top: .15rem;
}

/* -- CTA Section ------------------------------------------ */

.cta-section {
  position: relative;
  z-index: 1;
  background: var(--grad-hero);
  padding: 5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,255,255,.05), transparent);
  pointer-events: none;
}

.cta-inner { position: relative; max-width: 600px; margin: 0 auto; }

.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); color: #fff; margin-bottom: 1rem; }

.cta-section p { color: rgba(255,255,255,.72); margin-bottom: 2rem; font-size: 1rem; }

/* -- Personal Page ---------------------------------------- */

.personal-intro-section { padding-bottom: 2rem; }

.personal-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 860px;
  padding: 2.25rem;
  margin: 0 auto;
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: left;
}

.personal-intro h2 { margin-bottom: 1rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.personal-intro p { margin-top: .75rem; font-size: .95rem; }

.personal-intro-figure {
  width: 100%;
  max-width: 760px;
  margin: 0;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}

.personal-intro-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.personal-intro-figure figcaption {
  padding: .65rem .75rem .75rem;
  color: var(--text-muted);
  font-size: .72rem;
  font-style: italic;
  line-height: 1.45;
}

.personal-section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
.personal-section:last-child { border-bottom: none; }

.personal-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }

.personal-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.phi-blue   { background: rgba(59,130,246,.12); }
.phi-violet { background: rgba(139,92,246,.12); }
.phi-teal   { background: rgba(20,184,166,.12); }
.phi-cyan   { background: rgba(6,182,212,.12); }
.phi-orange { background: rgba(249,115,22,.12); }

.personal-header-text h2 { font-size: 1.5rem; }
.personal-header-text p { font-size: .875rem; color: var(--text-muted); margin-top: .1rem; }

.personal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }

.personal-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.personal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.personal-card-icon { font-size: 1.75rem; margin-bottom: .85rem; line-height: 1; }
.personal-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.personal-card p { font-size: .85rem; line-height: 1.65; }

.personal-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: .35rem .5rem;
  border-radius: var(--r-md);
  background: rgba(59,130,246,.09);
  color: var(--blue-dark);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.personal-grid-featured { grid-template-columns: repeat(3, 1fr); }
.personal-card-wide { grid-column: span 2; }

.writing-feature {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 2fr;
  margin-bottom: 1.5rem;
  transition: transform .25s, box-shadow .25s;
}

.writing-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.writing-feature-visual {
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem;
  text-align: center;
  min-height: 200px;
  opacity: .9;
}

.writing-feature-visual strong {
  color: #fff;
  font-size: 4.5rem;
  letter-spacing: -.08em;
  line-height: 1;
}

.writing-feature-visual span {
  color: rgba(255,255,255,.76);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.writing-feature-visual .writing-feature-kicker {
  color: rgba(255,255,255,.9);
  font-size: .65rem;
}

.writing-feature-body { padding: 2rem; }

.writing-feature-body .badge { margin-bottom: .75rem; }

.writing-feature-body h3 { font-size: 1.2rem; margin-bottom: .6rem; }

.writing-feature-body p { font-size: .9rem; margin-bottom: 1rem; }

.personal-callout {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.personal-callout h3 { margin-bottom: .4rem; font-size: 1rem; }
.personal-callout p { font-size: .9rem; }

/* -- Photo Gallery ----------------------------------------- */

.personal-lead {
  max-width: 70ch;
  margin-bottom: 2rem;
  font-size: .95rem;
  color: var(--text-secondary);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.photo-card {
  margin: 0;
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}

.photo-card:hover,
.photo-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.photo-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.photo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-card figcaption {
  padding: .65rem .75rem .75rem;
  color: var(--text-muted);
  font-size: .72rem;
  font-style: italic;
  line-height: 1.45;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(15, 23, 42, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .25s ease;
}

.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  max-width: 90vw;
}

.lightbox-figure img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
}

.lightbox-caption {
  color: rgba(255, 255, 255, .85);
  font-size: .8rem;
  font-style: italic;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}

.lightbox-close:hover,
.lightbox-close:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
  .photo-card { transition: none; }
}

/* -- Resume Page ------------------------------------------ */

/* Top action row */
.resume-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.resume-actions-left h2 { font-size: 1.1rem; margin-bottom: .2rem; }
.resume-actions-left p  { font-size: .82rem; color: var(--text-muted); }

.resume-contact,
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-size: .78rem;
}

.resume-contact {
  justify-content: flex-start;
  margin-top: .55rem;
}

.resume-contact a,
.footer-contact a {
  color: var(--blue-dark);
  font-weight: 600;
  transition: color .2s;
}

.resume-contact a:hover,
.footer-contact a:hover {
  color: var(--violet-dark);
}

.resume-contact span,
.footer-contact span {
  color: var(--text-muted);
}

.resume-contact small,
.footer-contact small {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 500;
}

/* Two-column layout */
.resume-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

/* Summary block */
.resume-summary {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.resume-summary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-hero);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.resume-summary h3 { font-size: 1rem; margin-bottom: .75rem; }
.resume-summary p  { font-size: .9rem; }

/* Section heading within resume */
.resume-section-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.resume-section-heading h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.resume-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.rsi-blue   { background: rgba(59,130,246,.12); }
.rsi-violet { background: rgba(139,92,246,.12); }
.rsi-teal   { background: rgba(20,184,166,.12); }
.rsi-orange { background: rgba(249,115,22,.12); }

.resume-section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Experience timeline */
.experience-list { display: flex; flex-direction: column; gap: 1.5rem; }

.experience-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.experience-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.experience-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.experience-role { font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.experience-company {
  font-size: .875rem;
  font-weight: 600;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  flex-shrink: 0;
}

.experience-date {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.15);
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.experience-location {
  font-size: .72rem;
  color: var(--text-muted);
}

.experience-summary {
  font-size: .875rem;
  margin-bottom: 1rem;
}

.experience-highlights { display: flex; flex-direction: column; gap: .4rem; }

.experience-highlight {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.experience-highlight::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-blue);
  flex-shrink: 0;
  margin-top: .45rem;
}

/* Resume sidebar */
.resume-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.sidebar-card h3 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Skills in sidebar */
.sidebar-skill-group { margin-bottom: 1.25rem; }
.sidebar-skill-group:last-child { margin-bottom: 0; }

.sidebar-skill-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.sidebar-tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.sidebar-tag {
  padding: .18rem .55rem;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 500;
  background: rgba(59,130,246,.08);
  color: var(--blue-dark);
  border: 1px solid rgba(59,130,246,.14);
}

/* Education entries */
.edu-entry {
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.edu-entry:last-child { border-bottom: none; padding-bottom: 0; }

.edu-degree { font-size: .875rem; font-weight: 600; margin-bottom: .15rem; }
.edu-school { font-size: .8rem; color: var(--text-secondary); }
.edu-year   { font-size: .72rem; color: var(--text-muted); margin-top: .1rem; }

/* Certification entries */
.cert-entry {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.cert-entry:last-child { border-bottom: none; padding-bottom: 0; }

.cert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: rgba(59,130,246,.10);
  font-size: .9rem;
  flex-shrink: 0;
}

.cert-name { font-size: .8rem; font-weight: 600; margin-bottom: .1rem; }
.cert-org  { font-size: .72rem; color: var(--text-muted); }

/* -- Footer ----------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--surface-solid);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.footer-inner { max-width: 600px; margin: 0 auto; }

.footer-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--grad-hero);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.footer-name  { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.footer-tag   { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }

.footer-contact { margin-bottom: 1.5rem; }

.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }

.footer-link { font-size: .825rem; font-weight: 500; color: var(--text-secondary); transition: color .2s; }
.footer-link:hover { color: var(--blue-dark); }

/* Footer LinkedIn link */
.footer-social {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: var(--r-full);
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.16);
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 600;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.footer-social a:hover {
  background: rgba(59,130,246,.14);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59,130,246,.22);
}

.footer-social svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.footer-copy { font-size: .75rem; color: var(--text-muted); }

/* -- Responsive ------------------------------------------- */

@media (max-width: 900px) {
  .resume-layout { grid-template-columns: 1fr; }
  .resume-sidebar { order: -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .cs-page-banner { padding-top: 2rem; padding-bottom: 2.25rem; }
  .cs-page-banner .cs-crumbs { border-radius: var(--r-lg); }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(238,242,255,.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-nav);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: .25rem;
  }

  .nav-links.open { display: flex; }

  /* Increase gap to prevent Resume button shadow bleeding into adjacent items */
  .nav-links { gap: .5rem; padding: 1rem .75rem; }

  /* Ensure minimum 44px touch targets on all nav links */
  .nav-link {
    padding: .875rem 1rem;
    border-radius: var(--r-md);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Kill shadow on mobile - it overflows and creates visual overlap */
  .nav-link-resume {
    justify-content: center;
    box-shadow: none;
  }

  /* Larger tap target for the hamburger toggle */
  .nav-toggle { width: 44px; height: 44px; }

  .hero { padding: 3.5rem 1.25rem 5rem; }

  .stats-bar { margin-top: -1.75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid var(--border); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--border); }

  .summary-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .summary-visual { order: -1; }

  .writing-feature { grid-template-columns: 1fr; }
  .writing-feature-visual { min-height: 140px; }
  .personal-grid-featured { grid-template-columns: 1fr; }
  .personal-card-wide { grid-column: auto; }

  .resume-actions { flex-direction: column; align-items: flex-start; }
  .resume-contact { align-items: flex-start; }
  .experience-card-header { flex-direction: column; }
  .experience-meta { align-items: flex-start; }
}

@media (max-width: 480px) {
  .section { padding: 3rem 0; }
  .project-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  .personal-intro { padding: 1.5rem; text-align: left; }
  .personal-callout { align-items: flex-start; padding: 1.5rem; }

  .filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

  .filter-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .55rem .5rem;
    font-size: .75rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  .project-meta { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); border-radius: var(--r-lg); }
}

/* -- Motion & Kinetics ------------------------------------ */

/* Hero entrance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-avatar  { animation: fadeInUp .55s         ease both; }
.hero h1      { animation: fadeInUp .55s  .10s   ease both; }
.hero-title   { animation: fadeInUp .55s  .20s   ease both; }
.hero-tagline { animation: fadeInUp .55s  .30s   ease both; }
.hero-actions { animation: fadeInUp .55s  .42s   ease both; }
.pill-row     { animation: fadeInUp .55s  .54s   ease both; }

/* Inner page banner entrance */
.page-banner-inner { animation: fadeInUp .5s ease both; }

/* Ambient orb drift */
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(22px, -16px); }
  66%       { transform: translate(-12px, 11px); }
}

.orb-1 { animation: orbDrift 28s ease-in-out infinite; }
.orb-2 { animation: orbDrift 23s ease-in-out infinite reverse; }
.orb-3 { animation: orbDrift 33s ease-in-out infinite 6s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease, box-shadow .25s;
}

/* Once revealed, restore snappy hover timings for interactive cards */
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s, opacity .55s ease;
}

/* Hero avatar - headshot (image applied via inline style on the element) */
.hero-avatar {
  width: 120px;
  height: 120px;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.25),
    0 0 22px 6px rgba(139,92,246,.45),
    0 0 44px 16px rgba(59,130,246,.18),
    0 8px 32px rgba(0,0,0,.20);
  transition: transform .35s ease, box-shadow .35s ease;
  cursor: default;
}

.hero-avatar:hover {
  transform: scale(1.06);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.35),
    0 0 32px 12px rgba(139,92,246,.60),
    0 0 60px 22px rgba(59,130,246,.28),
    0 12px 40px rgba(0,0,0,.24);
}

/* Cap hero height on large/tall screens so it doesn't feel too sparse */
@media (min-height: 800px) {
  .hero { max-height: 820px; }
}

/* Card hover consistency */
.summary-mini:hover { transform: translateY(-4px); }

/* Project card - add opacity to transition for filter fade */
.project-card { transition: transform .25s, box-shadow .25s, opacity .3s; }

/* Philippines photo in timeline card */
.tl-photo {
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 1rem 0;
}

.tl-photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.tl-photo:hover img { transform: scale(1.025); }

.tl-photo-caption {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .35rem;
  font-style: italic;
  text-align: right;
}

/* -- Accessibility ----------------------------------------- */

/* Skip-to-content link - visually hidden until focused */
.skip-link {
  position: fixed;
  top: .5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 200;
  padding: .6rem 1.1rem;
  border-radius: var(--r-full);
  background: var(--blue-deeper);
  color: #fff;
  font-size: .825rem;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateX(-50%) translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Consistent keyboard focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Reduced motion - respect user preference */
@media (prefers-reduced-motion: reduce) {
  .hero-avatar, .hero h1, .hero-title, .hero-tagline,
  .hero-actions, .pill-row, .page-banner-inner {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .orb-1, .orb-2, .orb-3 { animation: none; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -- Printable Resume ------------------------------------- */

@media print {
  @page { size: Letter; margin: .42in .48in; }

  body { background: #fff; color: #0F172A; font-size: 9pt; }

  .bg-orbs,
  .navbar,
  .page-banner,
  .cta-section,
  .site-footer,
  .resume-actions .btn,
  .resume-sidebar .sidebar-card:last-child {
    display: none !important;
  }

  .section { padding: 0; }
  .container { max-width: none; padding: 0; }

  .resume-actions {
    margin-bottom: .14in;
    padding: 0 0 .1in;
    border: none;
    border-bottom: 2px solid #93C5FD;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .resume-actions-left h2 { font-size: 18pt; letter-spacing: -.02em; }
  .resume-actions-left p { font-size: 8.5pt; margin-top: .02in; }
  .resume-contact { margin-top: .04in; font-size: 8pt; }
  .resume-contact small { font-size: 7pt; }

  .resume-layout { display: block; }

  .resume-summary {
    margin-bottom: .1in;
    padding: .1in .12in;
    border: 1px solid #DBEAFE;
    border-radius: 0;
    background: #F8FAFC;
    box-shadow: none;
  }

  .resume-summary::before { height: 2px; }
  .resume-summary h3 { margin-bottom: .04in; font-size: 9pt; }
  .resume-summary p { font-size: 8pt; line-height: 1.35; }

  .resume-section-heading {
    gap: .08in;
    margin: .1in 0 .06in;
  }

  .resume-section-icon {
    width: .26in;
    height: .26in;
    border-radius: .04in;
    font-size: 5.5pt;
  }

  .resume-section-heading h2 { font-size: 9.5pt; }
  .experience-list { gap: .08in; }

  .experience-card {
    break-inside: avoid;
    padding: .08in .1in;
    border: 1px solid #E2E8F0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .experience-card:hover { transform: none; box-shadow: none; }
  .experience-card .card-accent { height: 2px; }
  .experience-card-header { gap: .08in; margin-bottom: .05in; }
  .experience-role { font-size: 9pt; }
  .experience-company { font-size: 7.8pt; }
  .experience-date { padding: .01in .05in; font-size: 7pt; }
  .experience-location { font-size: 6.8pt; }
  .experience-summary { margin-bottom: .05in; font-size: 7.8pt; line-height: 1.3; }
  .experience-highlights { gap: .025in; }

  .experience-highlight {
    gap: .05in;
    font-size: 7.35pt;
    line-height: 1.28;
  }

  .experience-highlight::before {
    width: 4px;
    height: 4px;
    margin-top: .055in;
  }

  .experience-card .tags { display: none; }

  .resume-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .08in;
    margin-top: .1in;
  }

  .sidebar-card {
    break-inside: avoid;
    padding: .08in .1in;
    border: 1px solid #E2E8F0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .sidebar-card:first-child { grid-column: 1 / -1; }
  .sidebar-card .card-accent { height: 2px; }
  .sidebar-card h3 { margin-bottom: .06in; font-size: 8.5pt; }
  .sidebar-skill-group { margin-bottom: .045in; }
  .sidebar-skill-label { margin-bottom: .025in; font-size: 6.2pt; }
  .sidebar-tags { gap: .025in; }

  .sidebar-tag {
    padding: .015in .045in;
    border-radius: .06in;
    font-size: 6.2pt;
  }

  .edu-entry,
  .cert-entry { padding: .03in 0; }

  .edu-degree { font-size: 7.4pt; }
  .edu-school { font-size: 7pt; }
  .cert-entry { gap: .05in; }
  .cert-icon { width: .22in; height: .22in; font-size: 6.5pt; }
  .cert-name { font-size: 7pt; }
  .cert-org { font-size: 6.4pt; }
}
