/* ============================================================
   DESIGN SYSTEM
   Fonts: Bricolage Grotesque (display) + DM Sans (body)
   Palette: Apple-adjacent — #fbfbfd light / #1d1d1f dark
   ============================================================ */

:root {
  /* — Colors — */
  --c-bg:           #fbfbfd;
  --c-bg-alt:       #f5f5f7;
  --c-bg-dark:      #1d1d1f;
  --c-bg-dark-2:    #2a2a2c;
  --c-text:         #1d1d1f;
  --c-text-sub:     #6e6e73;
  --c-white:        #f5f5f7;
  --c-white-sub:    #a1a1a6;
  --c-accent:       #7e22ce;
  --c-accent-hi:    #9333ea;
  --c-border:       rgba(0,0,0,0.08);
  --c-border-dark:  rgba(255,255,255,0.10);

  /* — Typography — */
  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-body:    'DM Sans', sans-serif;

  /* — Spacing (8px grid) — */
  --s-1: 0.5rem;    /* 8 */
  --s-2: 1rem;      /* 16 */
  --s-3: 1.5rem;    /* 24 */
  --s-4: 2rem;      /* 32 */
  --s-6: 3rem;      /* 48 */
  --s-8: 4rem;      /* 64 */
  --s-12: 6rem;     /* 96 */
  --s-20: 10rem;    /* 160 */

  /* — Layout — */
  --max-w:  1160px;
  --nav-h:  52px;
  --radius: 20px;

  /* — Motion — */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea { font-family: inherit; font-size: inherit; }


/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
.t-hero {
  font-family: var(--f-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.t-section {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.t-card {
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 2.5vw, 1.625rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.t-eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-text-sub);
}

.t-body-lg {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-4);
}

.section      { padding: var(--s-20) 0; }
.section--alt { background: var(--c-bg-alt); }
.section--dark {
  background: var(--c-bg-dark);
  color: var(--c-white);
}

.section-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto var(--s-12);
}
.section-intro .t-eyebrow { display: block; margin-bottom: var(--s-3); color: var(--c-accent); }
.section-intro .t-section  { margin-bottom: var(--s-3); }
.section-intro p           { color: var(--c-text-sub); font-weight: 300; line-height: 1.65; }
.section-intro--dark p     { color: var(--c-white-sub); }
.section-intro--dark .t-section { color: var(--c-white); }

@media (max-width: 768px) {
  .container { padding: 0 var(--s-3); }
  .section   { padding: var(--s-12) 0; }
}


/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(251,251,253,.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-border);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.nav.is-dark {
  background: rgba(29,29,31,.88);
  border-bottom-color: var(--c-border-dark);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-4);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
  transition: color .25s var(--ease);
}
.nav.is-dark .nav__logo { color: var(--c-white); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--c-text);
  position: relative;
  transition: opacity .2s;
}
.nav.is-dark .nav__links a { color: var(--c-white); }
.nav__links a:hover { opacity: .6; }

/* Underline active link */
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: currentColor;
}

/* Pill CTA */
.nav__links .nav__cta {
  font-weight: 500;
  padding: .4em 1.1em;
  border-radius: 980px;
  background: var(--c-accent);
  color: #fff !important;
  transition: background .2s var(--ease), transform .15s;
}
.nav__links .nav__cta:hover { background: var(--c-accent-hi); transform: scale(1.03); opacity: 1; }
.nav__links .nav__cta.active::after { display: none; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: var(--nav-h);
}
.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease), background .25s;
}
.nav.is-dark .nav__toggle span { background: var(--c-white); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(29,29,31,.97);
  backdrop-filter: blur(20px);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.nav-overlay.is-open { opacity: 1; pointer-events: all; }
.nav-overlay a {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: -0.025em;
  transition: opacity .2s;
}
.nav-overlay a:hover { opacity: .55; }

@media (max-width: 768px) {
  .nav__links  { display: none; }
  .nav__toggle { display: flex; }
  .nav-overlay { display: flex; }
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-bg-dark);
  color: var(--c-white);
  padding: var(--s-8) 0 var(--s-6);
}
.footer__inner { display: flex; flex-direction: column; gap: var(--s-6); }
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer__name {
  font-family: var(--f-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.footer__tagline {
  font-size: 0.875rem;
  color: var(--c-white-sub);
  margin-top: .2rem;
}
.footer__nav { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; }
.footer__nav a {
  font-size: 0.875rem;
  color: var(--c-white-sub);
  transition: color .2s;
}
.footer__nav a:hover { color: var(--c-white); }
.footer__rule { height: 1px; background: var(--c-border-dark); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--c-white-sub);
}
.footer__social { display: flex; gap: var(--s-3); }
.footer__social a { color: var(--c-white-sub); font-size: 0.8125rem; transition: color .2s; }
.footer__social a:hover { color: var(--c-white); }


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  font-weight: 400;
  padding: .75em 1.5em;
  border-radius: 980px;
  transition: all .2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-hi); transform: scale(1.02); }
.btn--outline {
  background: transparent;
  color: var(--c-accent);
  box-shadow: inset 0 0 0 1.5px var(--c-accent);
}
.btn--outline:hover { background: var(--c-accent); color: #fff; }
.btn--outline-white {
  background: transparent;
  color: var(--c-white);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
}
.btn--outline-white:hover { background: rgba(255,255,255,.12); }
.btn--full { width: 100%; justify-content: center; }


/* ============================================================
   HERO  (index.html)
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + var(--s-12)) var(--s-4) var(--s-20);
  background: var(--c-bg-dark);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}

/* Soft glow orb */
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -65%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(0,102,204,.16) 0%, transparent 68%);
  pointer-events: none;
}

.hero__content { position: relative; max-width: 920px; }

.hero__eyebrow {
  display: block;
  color: var(--c-white);
  margin-bottom: var(--s-4);
  animation: riseIn .8s var(--ease-out) both;
}
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: var(--s-4);
  animation: riseIn .8s .1s var(--ease-out) both;
}
.hero__sub {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--c-white);
  max-width: 520px;
  margin: 0 auto var(--s-8);
  line-height: 1.5;
  animation: riseIn .8s .2s var(--ease-out) both;
}
.hero__ctas {
  display: flex;
  gap: var(--s-2);
  justify-content: center;
  flex-wrap: wrap;
  animation: riseIn .8s .3s var(--ease-out) both;
}
.hero__scroll-hint {
  position: absolute;
  bottom: var(--s-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  color: var(--c-white-sub);
  font-size: 0.75rem;
  letter-spacing: .06em;
  animation: fadeIn 2s 1.2s both;
}
.hero__scroll-hint::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--c-white-sub), transparent);
  animation: breathe 2.2s ease-in-out infinite;
}


/* ============================================================
   PAGE HEADER  (non-home pages)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-h) + var(--s-12)) 0 var(--s-8);
  background: var(--c-bg-dark);
  color: var(--c-white);
  text-align: center;
}
.page-header__eyebrow { display: block; color: var(--c-white-sub); margin-bottom: var(--s-3); }
.page-header__title {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: var(--s-3);
}
.page-header__sub {
  color: var(--c-white-sub);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}


/* ============================================================
   WORK CARDS + GRIDS
   ============================================================ */

/* Featured 2-up grid (home) */
.grid--featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.grid--featured .card--span-2 { grid-column: 1 / -1; }

/* Standard portfolio 2-col grid */
.grid--portfolio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}

@media (max-width: 768px) {
  .grid--featured,
  .grid--portfolio { grid-template-columns: 1fr; }
  .grid--featured .card--span-2 { grid-column: 1; }
}

/* Card base */
.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg-alt);
  transition: transform .4s var(--ease-out);
  cursor: pointer;
}
.card:hover { transform: translateY(-4px) scale(1.005); }

/* Card image or placeholder */
.card__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease-out);
}
.card:hover .card__thumb { transform: scale(1.04); }

.card__placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,.07);
  user-select: none;
  overflow: hidden;
  position: relative;
  transition: transform .5s var(--ease-out);
}
.card:hover .card__placeholder { transform: scale(1.04); }

/* Full-span card uses a wider aspect ratio */
.card--span-2 .card__placeholder,
.card--span-2 .card__thumb { aspect-ratio: 21/9; }

@media (max-width: 768px) {
  .card--span-2 .card__placeholder,
  .card--span-2 .card__thumb { aspect-ratio: 16/9; }
}

/* Card body */
.card__body {
  padding: var(--s-4);
  background: var(--c-bg-dark-2);
  color: var(--c-white);
}
.card__body--light {
  background: var(--c-bg-alt);
  color: var(--c-text);
}

.card__tags { display: flex; gap: var(--s-1); flex-wrap: wrap; margin-bottom: var(--s-2); }
.card__tag {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25em .8em;
  border-radius: 980px;
  background: rgba(180,200,240,0.12);   /* blue-tinted, less white bleed */
  color: #b8c6e2;                        /* 6.3:1 on dark card bg — was failing */
}
.card__body--light .card__tag {
  background: transparent;              /* text directly on card bg = better contrast */
  color: #505060;                        /* 7.0:1 on #f5f5f7 — was #6e6e73 which failed */
  border: 1px solid rgba(0,0,0,0.14);
}

.card__title {
  font-family: var(--f-display);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-1);
}
.card__desc {
  font-size: .9375rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--c-white-sub);
}
.card__body--light .card__desc { color: var(--c-text-sub); }

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-top: var(--s-3);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--c-accent);
  transition: gap .25s var(--ease);
}
.card:hover .card__cta { gap: .75em; }
.card__cta::after { content: '→'; }
/* Lighter purple for CTAs on dark card bodies */
.card__body:not(.card__body--light) .card__cta { color: #c084fc; }

/* Hidden state for filter */
.card.is-hidden { display: none; }


/* ============================================================
   ABOUT SPLIT (home + optionally resume)
   ============================================================ */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: center;
}
@media (max-width: 768px) {
  .about-split { grid-template-columns: 1fr; gap: var(--s-8); }
}

.about-split__photo-wrap {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--c-bg-alt);
}
.about-split__photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.about-split__photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2a2a2c 0%, #1a1a1c 100%);
  font-family: var(--f-display);
  font-size: 6rem; font-weight: 800;
  color: rgba(255,255,255,.05);
  letter-spacing: -0.04em;
}

.about-split__content .t-eyebrow { display: block; color: var(--c-accent); margin-bottom: var(--s-3); }
.about-split__content .t-section  { margin-bottom: var(--s-4); }
.about-split__content p {
  color: var(--c-text-sub);
  font-weight: 300;
  line-height: 1.7;
  font-size: 1.0625rem;
  margin-bottom: var(--s-3);
}
.about-split__content p:last-of-type { margin-bottom: var(--s-6); }


/* ============================================================
   CAPABILITY TILES  (home — dark section)
   ============================================================ */
.caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
@media (max-width: 900px) { .caps-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .caps-grid { grid-template-columns: 1fr; } }

.cap-tile {
  padding: var(--s-6) var(--s-4) var(--s-4);
  border-radius: var(--radius);
  background: var(--c-bg-dark-2);
  border: 1px solid var(--c-border-dark);
  transition: border-color .3s var(--ease), transform .35s var(--ease-out);
}
.cap-tile:hover { border-color: rgba(255,255,255,.22); transform: translateY(-5px); }
.cap-tile__icon { font-size: 1.75rem; display: block; margin-bottom: var(--s-3); }
.cap-tile__name {
  font-family: var(--f-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}
.cap-tile__body { font-size: .9375rem; color: var(--c-white-sub); font-weight: 300; line-height: 1.6; }


/* ============================================================
   TESTIMONIALS
   ============================================================ */

/* Full-page grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.testimonials-grid .tcard--featured { grid-column: 1 / -1; }
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-grid .tcard--featured { grid-column: 1; }
}

.tcard {
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.tcard--featured {
  background: var(--c-bg-dark);
  color: var(--c-white);
}

.tcard__mark {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--c-accent);
  display: block;
  margin-bottom: calc(-1 * var(--s-4));
}
.tcard__quote {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  line-height: 1.7;
  flex: 1;
  color: var(--c-text);
}
.tcard--featured .tcard__quote {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--c-white);
}
.tcard__attr {
  display: flex; align-items: center; gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-border);
}
.tcard--featured .tcard__attr { border-top-color: var(--c-border-dark); }

.tcard__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; overflow: hidden; flex-shrink: 0;
  background: var(--c-bg-dark-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: .875rem; font-weight: 700;
  color: rgba(255,255,255,.5);
}
.tcard__name {
  font-family: var(--f-display);
  font-size: .9375rem; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.tcard--featured .tcard__name { color: var(--c-white); }
.tcard__role { font-size: .8125rem; color: var(--c-text-sub); margin-top: .15rem; }
.tcard--featured .tcard__role { color: var(--c-white-sub); }

/* Mini testimonials (home) */
.mini-tlist { max-width: 760px; margin: 0 auto; }
.mini-t {
  display: flex; gap: var(--s-6); align-items: flex-start;
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--c-border);
}
.mini-t:last-child { border-bottom: none; }
.mini-t__avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #e0e0e4, #d0d0d4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: .875rem; font-weight: 700; color: rgba(0,0,0,.2);
  overflow: hidden;
}
.mini-t__avatar img { width: 52px; height: 52px; object-fit: cover; display: block; }
.mini-t__quote {
  font-size: 1.0625rem; font-weight: 300; line-height: 1.65;
  color: var(--c-text); margin-bottom: var(--s-2);
}
.mini-t__name { font-family: var(--f-display); font-size: .9375rem; font-weight: 700; }
.mini-t__role { font-size: .875rem; color: var(--c-text-sub); }
@media (max-width: 560px) { .mini-t { flex-direction: column; gap: var(--s-3); } }


/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--c-bg-dark);
  color: var(--c-white);
  text-align: center;
  padding: var(--s-20) var(--s-4);
}
.cta-banner .t-section { max-width: 600px; margin: 0 auto var(--s-3); }
.cta-banner__sub {
  color: var(--c-white-sub);
  font-size: 1.125rem; font-weight: 300;
  max-width: 440px; margin: 0 auto var(--s-8);
  line-height: 1.6;
}
.cta-banner__actions {
  display: flex; gap: var(--s-2);
  justify-content: center; flex-wrap: wrap;
}


/* ============================================================
   PORTFOLIO: FILTER BAR
   ============================================================ */
.filter-bar { display: flex; gap: var(--s-1); flex-wrap: wrap; margin-bottom: var(--s-8); }
.filter-btn {
  font-family: var(--f-body);
  font-size: .875rem; font-weight: 500;
  padding: .5em 1.2em;
  border-radius: 980px;
  border: 1.5px solid var(--c-border);
  color: var(--c-text-sub);
  background: transparent;
  transition: all .2s var(--ease);
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--c-text); color: var(--c-text); }
.filter-btn.is-active {
  background: var(--c-text);
  border-color: var(--c-text);
  color: var(--c-bg);
}


/* ============================================================
   RESUME PAGE
   ============================================================ */
.resume-intro {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--c-text-sub);
  max-width: 680px;
  margin-bottom: var(--s-12);
}

.resume-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--s-12);
  align-items: start;
}
@media (max-width: 900px) { .resume-layout { grid-template-columns: 1fr; } }

/* Section heading */
.resume-h {
  font-family: var(--f-display);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 1.5px solid var(--c-border);
}

/* Role entry */
.role {
  margin-bottom: var(--s-8);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--c-border);
}
.role:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.role__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: .2rem;
}
.role__company { font-family: var(--f-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.role__dates   { font-size: .875rem; color: var(--c-text-sub); white-space: nowrap; }
.role__title   { font-size: 1rem; font-weight: 500; color: var(--c-accent); margin-bottom: .2rem; }
.role__location { font-size: .875rem; color: var(--c-text-sub); margin-bottom: var(--s-3); }
.role__summary {
  font-size: .9375rem; font-weight: 300;
  line-height: 1.65; color: var(--c-text-sub);
  margin-bottom: var(--s-3);
}
.role__bullets  { display: flex; flex-direction: column; gap: var(--s-2); }
.role__bullets li {
  font-size: .9375rem; font-weight: 300;
  line-height: 1.55; color: var(--c-text-sub);
  padding-left: 1.25rem;
  position: relative;
}
.role__bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: .55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
}

/* Aside cards */
.aside-card {
  background: var(--c-bg-alt);
  border-radius: 16px;
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.aside-card:last-child { margin-bottom: 0; }
.aside-card__h {
  font-family: var(--f-display);
  font-size: 1rem; font-weight: 700;
  margin-bottom: var(--s-3);
  letter-spacing: -0.01em;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.skill-tag {
  font-size: .8rem; font-weight: 500;
  padding: .3em .85em;
  border-radius: 980px;
  background: #fff;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}
.edu-entry { margin-bottom: var(--s-3); }
.edu-entry:last-child { margin-bottom: 0; }
.edu-entry__school { font-family: var(--f-display); font-size: .9375rem; font-weight: 700; }
.edu-entry__degree { font-size: .875rem; color: var(--c-text-sub); margin-top: .2rem; }
.edu-entry__years  { font-size: .8125rem; color: var(--c-text-sub); }

/* Resume section grouping */
.resume-section { margin-bottom: var(--s-12); }
.resume-section:last-child { margin-bottom: 0; }


/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: start;
}
@media (max-width: 768px) { .contact-split { grid-template-columns: 1fr; } }

.contact-info .t-section  { margin-bottom: var(--s-4); }
.contact-info__body {
  font-size: 1.0625rem; font-weight: 300;
  line-height: 1.7; color: var(--c-text-sub);
  margin-bottom: var(--s-6);
}
.contact-details { display: flex; flex-direction: column; gap: var(--s-3); }
.contact-item__label {
  font-size: .75rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--c-text-sub);
  display: block; margin-bottom: .25rem;
}
.contact-item__value { font-size: 1rem; }
.contact-item__value a { color: var(--c-accent); transition: opacity .2s; }
.contact-item__value a:hover { opacity: .7; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: var(--s-3); }
.form-field   { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: 24px; }
.form-field label { font-size: .875rem; font-weight: 500; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .875rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--c-text);
  background: var(--c-bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  outline: none;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}
.form-field textarea { min-height: 160px; }
.form-submit { display: flex; justify-content: flex-end; }
.form-note { font-size: .8125rem; color: var(--c-text-sub); margin-top: var(--s-1); }


/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }


/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes breathe {
  0%, 100% { opacity: .3; transform: scaleY(1); }
  50%       { opacity: .8; transform: scaleY(1.1) translateY(4px); }
}


/* ============================================================
   UTILITY
   ============================================================ */
.mt-8  { margin-top: var(--s-8); }
.mt-4  { margin-top: var(--s-4); }
.text-center { text-align: center; }
.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;
}


/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-8) var(--s-8) var(--s-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  user-select: none;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.lightbox__caption {
  margin-top: var(--s-3);
  color: rgba(255,255,255,.5);
  font-size: .875rem;
  text-align: center;
  max-width: 600px;
}
.lightbox__counter {
  position: absolute;
  top: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.4);
  font-size: .8125rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.lightbox__close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--f-body);
}
.lightbox__close:hover { background: rgba(255,255,255,.2); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
  user-select: none;
  font-family: var(--f-body);
}
.lightbox__prev { left: var(--s-4); }
.lightbox__next { right: var(--s-4); }
.lightbox__prev:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.08); }
.lightbox__next:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.08); }

@media (max-width: 640px) {
  .lightbox__prev { left: var(--s-2); }
  .lightbox__next { right: var(--s-2); }
}

/* Gallery images — show zoom cursor */
.cs-gallery figure {
  cursor: zoom-in;
}

/* ============================================================
   DARK MODE  —  follows system preference automatically
   ============================================================ */
@media (prefers-color-scheme: dark) {

  html {
    color-scheme: dark;

    /* ── Indigo-black palette ──────────────────────────────
       Not gray — a very faint blue-black tint that reads as
       a deliberate atmosphere rather than dimmed light mode.
    ─────────────────────────────────────────────────────── */
    --c-bg:        #060810;   /* near-black, ghost of indigo   */
    --c-bg-alt:    #0d1020;   /* midnight blue — card surfaces  */
    --c-bg-dark:   #030407;   /* almost pure black for hero/CTA */
    --c-bg-dark-2: #111826;   /* deep slate for tiles/avatars   */
    --c-text:      #dde3f5;   /* cool blue-tinted off-white     */
    --c-text-sub:  #7a87b5;   /* periwinkle-gray for secondary  */
    --c-white:     #dde3f5;   /* alias — matches --c-text       */
    --c-white-sub: #7a87b5;   /* alias — matches --c-text-sub   */
    --c-accent:    #c084fc;   /* soft plum — dark mode */
    --c-accent-hi: #d8b4fe;   /* hover — lighter plum */
    --c-border:    rgba(80, 110, 200, 0.14);
    --c-border-dark: rgba(100, 130, 220, 0.12);
  }

  /* Smooth palette transitions */
  body, .nav, .card, .card__body, .card__body--light,
  .tcard, .aside-card, .cap-tile, .cs-meta-item,
  .filter-btn, .form-field input, .form-field textarea {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
  }

  /* ── Nav ─────────────────────────────────────── */
  .nav {
    background: rgba(4, 5, 10, 0.92);  /* deep indigo-black glass */
    border-bottom-color: rgba(100,130,220,0.12);
  }
  .nav__logo         { color: #dde3f5; }
  .nav__links a      { color: #dde3f5; }
  .nav__toggle span  { background: #dde3f5; }

  /* ── Cards ───────────────────────────────────── */
  .card               { background: #0d1020; }
  .card__body--light  { background: #0d1020; color: #dde3f5; }
  .card__body--light .card__title { color: #dde3f5; }
  .card__body--light .card__desc  { color: #7a87b5; }
  .card__body--light .card__tag   {
    background: rgba(80,110,200,0.2);
    color: #9fb3d8;                      /* 8.9:1 on #0d1020 — was 4.4:1 */
    border-color: rgba(80,110,200,0.3);
  }
  /* Dark card body tags in dark mode also need a bump */
  .card__tag { color: #9fb3d8; background: rgba(80,110,200,0.18); }

  /* ── About ───────────────────────────────────── */
  .about-split__content p { color: #7a87b5; }

  /* ── Testimonials — cards stay light in dark mode ── */
  .mini-t             { border-bottom-color: rgba(100,130,220,0.12); }
  .mini-t__quote      { color: #dde3f5; }
  .mini-t__role       { color: #7a87b5; }

  /* ── Portfolio filter ────────────────────────── */
  .filter-btn           { border-color: rgba(100,130,220,0.12); color: #7a87b5; }
  .filter-btn:hover     { border-color: #dde3f5; color: #dde3f5; }
  .filter-btn.is-active { background: #dde3f5; border-color: #dde3f5; color: #1a1a1c; }

  /* ── Resume ──────────────────────────────────── */
  .resume-h          { border-bottom-color: rgba(100,130,220,0.12); }
  .role              { border-bottom-color: rgba(100,130,220,0.12); }
  .aside-card        { background: #0d1020; }
  .skill-tag         { background: #030407; border-color: rgba(100,130,220,.12); color: #dde3f5; }
  .edu-entry__school { color: #dde3f5; }

  /* ── Contact ─────────────────────────────────── */
  .form-field label     { color: #dde3f5; }
  .form-field input,
  .form-field textarea  { background: #0d1020; border-color: rgba(100,130,220,.12); color: #dde3f5; }
  .form-field input::placeholder,
  .form-field textarea::placeholder { color: #7a87b5; }

  /* ── Case study ──────────────────────────────── */
  .cs-gallery figure    { background: #0d1020; }
  .cs-gallery figcaption { border-top-color: rgba(100,130,220,0.12); }
  .cs-nav               { border-top-color: rgba(100,130,220,0.12); }

}


/* ============================================================
   AURORA BACKGROUND  (dark mode only)
   Adapted from Sylvain Garnot's rainbow CodePen.
   On dark backgrounds, the "white" edges are dropped and the
   pure colour beams become an aurora borealis effect.
   ============================================================ */

.bg-aurora {
  display: none;
  position: absolute;   /* scoped inside .hero — not page-wide */
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* .hero already has position:relative + overflow:hidden, so aurora is clipped to it */

/* The beam elements — populated by JS */
.rainbow {
  height: 100%;
  width: 0;
  top: 0;
  position: absolute;
  transform: rotate(10deg);
  transform-origin: top right;
  will-change: right;
}

/* Corner vignettes — darken edges so aurora reads as light from within */
.aurora-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 0% 100%,  rgba(3,4,7,.8) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(3,4,7,.8) 0%, transparent 70%),
    radial-gradient(ellipse 100% 30% at 50% 100%, rgba(3,4,7,.9) 0%, transparent 60%);
  pointer-events: none;
}

@keyframes slide {
  from { right: -25%; }
  to   { right: 125%; }
}

/* Aurora always visible — hero is always dark-backgrounded */
.bg-aurora { display: block; }

/* Hero content must sit above the aurora layer */
.hero__content, .hero__scroll-hint { position: relative; z-index: 1; }


/* ============================================================
   DARK MODE — COMPREHENSIVE SWEEP
   Explicit overrides for every element that might show a light
   background or dark text in dark mode. Belt-and-suspenders
   on top of the CSS variable system.
   ============================================================ */
@media (prefers-color-scheme: dark) {

  /* ── Foundation ───────────────────────────────────────── */
  body           { background: #060810 !important; color: #dde3f5 !important; }
  .section       { background: #060810 !important; }
  .section--alt  { background: #0d1020 !important; }

  /* ── All headings inherit body colour ─────────────────── */
  h1, h2, h3, h4, h5, h6 { color: #dde3f5; }

  /* ── Section intros ───────────────────────────────────── */
  .section-intro .t-section  { color: #dde3f5; }
  .section-intro p           { color: #7a87b5; }

  /* ── About split ──────────────────────────────────────── */
  .about-split__content .t-section { color: #dde3f5; }
  .about-split__content p          { color: #7a87b5; }

  /* ── Mini testimonials (home) ─────────────────────────── */
  .mini-t__quote { color: #dde3f5; }
  .mini-t__name  { color: #dde3f5; }
  .mini-t__role  { color: #7a87b5; }

  /* ── Resume ───────────────────────────────────────────── */
  .resume-intro         { color: #7a87b5; }
  .role__company        { color: #dde3f5; }
  .role__location       { color: #7a87b5; }
  .role__summary        { color: #7a87b5; }
  .role__bullets li     { color: #7a87b5; }
  .edu-entry__degree    { color: #7a87b5; }
  .edu-entry__years     { color: #7a87b5; }
  .aside-card__h        { color: #dde3f5; }

  /* ── Contact ──────────────────────────────────────────── */
  .contact-info .t-section  { color: #dde3f5; }
  .contact-info__body        { color: #7a87b5; }
  .contact-item__label       { color: #7a87b5; }
  .contact-item__value       { color: #dde3f5; }

  /* ── Portfolio filter bar ─────────────────────────────── */
  .filter-btn { color: #7a87b5; border-color: rgba(100,130,220,0.12); }

  /* ── Case study pages (work/*.html) ──────────────────── */
  .cs-meta-item            { background: #0d1020; }
  .cs-meta-item__label     { color: #7a87b5; }
  .cs-meta-item__value     { color: #dde3f5; }
  .cs-body p               { color: #7a87b5; }
  .cs-gallery figure       { background: #0d1020; }
  .cs-gallery figcaption   { color: #7a87b5; border-top-color: rgba(100,130,220,0.12); }
  .cs-nav                  { border-top-color: rgba(100,130,220,0.12); }
  .cs-nav__dir             { color: #7a87b5; }
  .cs-nav__title           { color: #c084fc; }

  /* ── Page header (inner pages) ────────────────────────── */
  .page-header { background: #030407; }
  .page-header__title { color: #dde3f5; }
  .page-header__sub   { color: #7a87b5; }

  /* ── CTA banner ───────────────────────────────────────── */
  .cta-banner .t-section { color: #dde3f5; }
  .cta-banner__sub       { color: #7a87b5; }


  /* ── Toolbox — keep cards light in dark mode ── */

  /* ── Footer ───────────────────────────────────────────── */
  .footer { background: #030407; }

}

/* ── Toolbox section ──────────────────────────────────────── */
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-6) var(--s-4);
  margin-top: var(--s-10);
}
@media (max-width: 900px) { .toolbox-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .toolbox-grid { grid-template-columns: repeat(3, 1fr); } }

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  cursor: default;
}
.tool-item__logo {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.tool-item:hover .tool-item__logo {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.tool-item__logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.tool-item__name {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--c-text-sub);
  text-align: center;
}


