/* ===================================================
   Kael Payette – Portfolio Design System
   =================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --navy:        #0f172a;
  --navy-mid:    #1e293b;
  --accent:      #38bdf8;
  --accent-dark: #0284c7;
  --accent-hover:#0ea5e9;
  --surface:     #f8fafc;
  --surface-alt: #f1f5f9;
  --card:        #ffffff;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --radius:      .5rem;
  --radius-lg:   1rem;
  --transition:  .2s ease;
  --header-h:    64px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

ul { list-style: none; }

/* ---------- Typography Scale ---------- */
h1 { font-size: clamp(1.75rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { margin-bottom: .9rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section        { padding: 5rem 0; }
.section-alt    { background: var(--surface-alt); }
.section-dark   { background: var(--navy); color: #fff; }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .5rem;
}

.section-title {
  margin-bottom: 2.5rem;
  color: var(--navy);
}
.section-dark .section-title { color: #fff; }

/* ---------- Site Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo span  { color: var(--accent); }

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

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Site Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding: 2.5rem 0;
  font-size: .875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: .875rem;
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(56,189,248,.12) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero .breadcrumb {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.6); }
.page-hero .breadcrumb a:hover { color: var(--accent); }

.page-hero h1 { color: #fff; margin-bottom: .75rem; }

.page-hero .hero-sub {
  color: rgba(255,255,255,.72);
  font-size: 1.1rem;
  max-width: 640px;
}

.page-hero .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

/* ---------- Home Hero ---------- */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3a5c 100%);
  color: #fff;
  min-height: min(76vh, 680px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3.75rem 0;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(56,189,248,.15) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(56,189,248,.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.home-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1rem;
}
.home-hero h1 span { color: var(--accent); }

.hero-statement {
  font-size: 1.25rem;
  color: rgba(255,255,255,.78);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.75);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}
.btn-ghost:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .3rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(56,189,248,.12);
  color: var(--accent-dark);
  border: 1px solid rgba(56,189,248,.25);
  white-space: nowrap;
}

.tag-dark {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.2);
}

.tag-web    { background: rgba(16,185,129,.1);  color: #059669; border-color: rgba(16,185,129,.25); }
.tag-mobile { background: rgba(139,92,246,.1);  color: #7c3aed; border-color: rgba(139,92,246,.25); }
.tag-game   { background: rgba(245,158,11,.1);  color: #d97706; border-color: rgba(245,158,11,.25); }
.tag-team   { background: rgba(236,72,153,.1);  color: #db2777; border-color: rgba(236,72,153,.25); }

/* ---------- Project Cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-badge {
  padding: .4rem .85rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-flagship { background: var(--navy); color: var(--accent); }
.badge-game     { background: #78350f; color: #fde68a; }
.badge-mobile   { background: #4c1d95; color: #ddd6fe; }

.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-alt);
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .8rem;
}

.placeholder-icon {
  font-size: 2.5rem;
  line-height: 1;
}

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

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: .9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}

.card-link {
  align-self: flex-start;
  font-size: .875rem;
  font-weight: 600;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.card-link:hover { gap: .6rem; }

/* ---------- Featured Flagship Card ---------- */
.flagship-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition);
}
.flagship-card:hover { box-shadow: var(--shadow-lg); }

.flagship-media {
  aspect-ratio: 4/3;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flagship-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flagship-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .75rem;
}

.flagship-body h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: .75rem;
}

.flagship-body p {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}

/* ---------- At A Glance Panel ---------- */
.at-a-glance {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.at-a-glance h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

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

.glance-item {}
.glance-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: .3rem;
}
.glance-value {
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  font-weight: 500;
}

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

/* ---------- Case Study Layout ---------- */
.case-study-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.case-study-main {}

.case-study-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-links { display: flex; flex-direction: column; gap: .6rem; }
.sidebar-links a {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  padding: .5rem .75rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.sidebar-links a:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.tech-list { display: flex; flex-direction: column; gap: .5rem; }
.tech-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .875rem;
  color: var(--text);
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.tech-item:last-child { border-bottom: none; }
.tech-item strong { color: var(--navy); }

/* ---------- Case Study Content Sections ---------- */
.cs-section {
  margin-bottom: 3.5rem;
}

.cs-section h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}

.cs-section h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: .75rem;
  margin-top: 1.5rem;
}
.cs-section h3:first-child { margin-top: 0; }

.cs-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.cs-section ul li { margin-bottom: .4rem; }

.cs-section ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.cs-section ol li { margin-bottom: .4rem; }

.highlight-box {
  background: rgba(56,189,248,.07);
  border-left: 3px solid var(--accent-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  color: var(--text);
  font-size: .95rem;
}

.contributions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.contribution-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.contribution-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.contribution-text strong {
  display: block;
  font-size: .875rem;
  color: var(--navy);
  margin-bottom: .2rem;
}

.contribution-text span {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ---------- Evidence Gallery ---------- */
.evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.evidence-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.evidence-img {
  aspect-ratio: 4/3;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.evidence-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.evidence-placeholder .ph-icon {
  font-size: 2.5rem;
  line-height: 1;
  opacity: .5;
}

.evidence-placeholder .ph-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .6;
}

.evidence-caption {
  padding: .9rem 1rem;
}

.evidence-caption strong {
  display: block;
  font-size: .875rem;
  color: var(--navy);
  margin-bottom: .25rem;
}

.evidence-caption p {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
}

.evidence-proof {
  display: inline-block;
  margin-top: .4rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}

.filter-bar-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: .25rem;
}

.filter-btn {
  padding: .4rem .9rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ---------- About / Generic Content ---------- */
.content-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.profile-placeholder {
  aspect-ratio: 1;
  background: var(--surface-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .875rem;
}

.about-intro-centered {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.about-intro-centered .section-label {
  justify-content: center;
}

.about-intro-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  display: block;
}

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

.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.skill-group h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

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

/* ---------- Timeline ---------- */
.timeline-v2 { position: relative; padding-left: 2rem; }
.timeline-v2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  margin-bottom: 2rem;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: .35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--accent-dark);
}

.tl-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin-bottom: .25rem;
}

.tl-item h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .15rem;
}

.tl-item .org {
  font-size: .875rem;
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: .5rem;
}

.tl-item p, .tl-item li {
  font-size: .9rem;
  color: var(--text-muted);
}

/* ---------- Contact Cards ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-dark);
  color: var(--text);
}

.contact-card .c-icon {
  font-size: 2rem;
  line-height: 1;
}
.contact-card h3 {
  font-size: .95rem;
  color: var(--navy);
}
.contact-card p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Resume Page ---------- */
.resume-pdf-placeholder {
  background: var(--surface-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  margin-bottom: 2rem;
}

.resume-pdf-placeholder .pdf-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.resume-section {
  margin-bottom: 2.5rem;
}

.resume-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
}

.resume-entry {
  margin-bottom: 1.5rem;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .25rem;
  margin-bottom: .3rem;
}

.resume-entry h3 {
  font-size: 1rem;
  color: var(--navy);
}

.resume-entry .date {
  font-size: .82rem;
  color: var(--text-muted);
}

.resume-entry .org {
  font-size: .875rem;
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: .4rem;
}

.resume-entry ul {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: .9rem;
  color: var(--text);
}
.resume-entry ul li { margin-bottom: .25rem; }

/* ---------- Growth Page ---------- */
.growth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.growth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.growth-card .g-icon {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.growth-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .6rem;
}

.growth-card p {
  font-size: .875rem;
  color: var(--text-muted);
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-dark); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .case-study-layout {
    grid-template-columns: 1fr;
  }
  .case-study-sidebar {
    position: static;
    order: -1;
  }
  .flagship-card {
    grid-template-columns: 1fr;
  }
  .flagship-media {
    aspect-ratio: 16/9;
  }
  .content-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: .8rem 1.5rem;
  }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 3.5rem 0; }
  .at-a-glance { padding: 1.5rem; }
  .flagship-body { padding: 1.5rem; }
  .glance-grid { grid-template-columns: 1fr 1fr; }
  .contributions-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.65rem; }
  .hero-statement { font-size: 1rem; }
  .evidence-gallery { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .glance-grid { grid-template-columns: 1fr; }
}

/* ---------- Theme Toggle Button ---------- */
.theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: .35rem .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-left: .75rem;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* CSS-driven icon visibility so no flash on load */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Image Modal / Lightbox ---------- */
.img-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.img-modal-backdrop.open { display: flex; }

.img-modal-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.img-modal-img {
  max-width: 100%;
  max-height: calc(88vh - 60px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: block;
}

.img-modal-caption {
  margin-top: .75rem;
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

.img-modal-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  line-height: 1;
}
.img-modal-close:hover { background: rgba(255,255,255,.3); }
.img-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Make clickable image wrappers feel interactive */
.evidence-img.modal-trigger,
.card-img-wrap.modal-trigger,
.flagship-media.modal-trigger {
  cursor: zoom-in;
  position: relative;
}
.evidence-img.modal-trigger::after,
.card-img-wrap.modal-trigger::after,
.flagship-media.modal-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
  pointer-events: none;
}
.evidence-img.modal-trigger:hover::after,
.card-img-wrap.modal-trigger:hover::after,
.flagship-media.modal-trigger:hover::after {
  background: rgba(0,0,0,.12);
}
.evidence-img.modal-trigger:focus-visible,
.card-img-wrap.modal-trigger:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

/* ---------- Contact icon SVG ---------- */
.contact-card .c-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
}
.contact-card .c-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --surface:     #0f172a;
  --surface-alt: #192238;
  --card:        #1e293b;
  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --border:      #334155;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.4),  0 1px 2px rgba(0,0,0,.3);
  --shadow-md:   0 4px 12px rgba(0,0,0,.45), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg:   0 10px 30px rgba(0,0,0,.5), 0 4px 8px rgba(0,0,0,.3);
}

/* Headings that hardcode var(--navy) for text colour */
[data-theme="dark"] .section-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .flagship-body h3,
[data-theme="dark"] .cs-section h2,
[data-theme="dark"] .cs-section h3,
[data-theme="dark"] .contribution-text strong,
[data-theme="dark"] .evidence-caption strong,
[data-theme="dark"] .tech-item strong,
[data-theme="dark"] .contact-card h3,
[data-theme="dark"] .resume-section h2,
[data-theme="dark"] .resume-entry h3,
[data-theme="dark"] .growth-card h3,
[data-theme="dark"] .tl-item h3 { color: #e2e8f0; }

/* Generic utility for inline navy-coloured headings */
[data-theme="dark"] .heading-navy { color: #e2e8f0 !important; }

[data-theme="dark"] .highlight-box { background: rgba(56,189,248,.1); }

[data-theme="dark"] .filter-btn {
  background: var(--card);
  color: var(--text-muted);
  border-color: var(--border);
}
[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

[data-theme="dark"] .btn-ghost {
  color: var(--accent);
  border-color: var(--accent);
}
[data-theme="dark"] .btn-ghost:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

[data-theme="dark"] .resume-pdf-placeholder {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .profile-placeholder {
  background: var(--surface-alt);
  border-color: var(--border);
}
