/* ==========================================================
   Anie Arakelyan — Portfolio
   Brand: Minimal & clean · Soft pastel (Muted Sage)
   ========================================================== */

:root {
  --bg: #FAF7F2;
  --bg-alt: #F3EFE7;
  --accent: #C9D5C5;
  --accent-dark: #3D4A38;
  --text: #1F1F1F;
  --text-muted: #6B6B6B;
  --border: #E6E2D7;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; }

p { color: var(--text); }
.muted { color: var(--text-muted); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

/* Visually-hidden utility for screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 12vw, 140px) 0 clamp(60px, 10vw, 120px);
}
.hero h1 {
  max-width: 14ch;
  margin-bottom: 28px;
}
.hero .lede {
  font-size: clamp(18px, 2vw, 22px);
  max-width: 36ch;
  color: var(--text-muted);
  line-height: 1.5;
}
.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--accent);
  color: var(--accent-dark);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}
.status-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-dark); display: inline-block;
}

/* ---------- Section ---------- */
section { padding: clamp(60px, 8vw, 100px) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* ---------- Project grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.work-card {
  display: block;
  /* No overflow:hidden / border-radius here \u2014 the thumb has its own rounded
     corners, and clipping the whole card was cutting off descenders (p, y, g)
     in the description text at the bottom-left rounded corner. */
  transition: transform var(--transition);
}
.work-card:hover { transform: translateY(-4px); }
.work-card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--accent-dark);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  /* White frame to lift the card off the cream page background — same
     technique as the case-study image frames, scaled to the card. */
  border: 6px solid #fff;
  box-shadow:
    0 1px 2px rgba(31, 31, 31, 0.04),
    0 10px 28px rgba(31, 31, 31, 0.06);
}
.work-card:hover .thumb {
  box-shadow:
    0 2px 6px rgba(31, 31, 31, 0.06),
    0 18px 40px rgba(31, 31, 31, 0.1);
}
.work-card .thumb.alt-1 { background: #E8D5CC; color: #5A3B33; }
.work-card .thumb.alt-2 { background: #1F1F1F; color: var(--bg); }
.work-card .thumb.alt-3 { background: var(--bg-alt); color: var(--text-muted); }
.work-card .thumb.alt-4 { background: #D8D4E8; color: #3F3A5A; }
.work-card .thumb.alt-5 { background: #F0E4C2; color: #5C4A1F; }

/* Image-backed thumbs — show a real asset instead of a numeral */
.work-card .thumb.thumb-image {
  font-size: 0;
  padding: 0;
}
.work-card .thumb.thumb-image .thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  z-index: 1;
  transition: transform 500ms cubic-bezier(0.4,0,0.2,1);
}
.work-card:hover .thumb.thumb-image .thumb-img {
  transform: scale(1.03);
}
/* Decorative blob/sparkles from script.js would clash with a real screenshot */
.work-card .thumb.thumb-image .thumb-blob { display: none; }
.work-card .thumb.thumb-image .thumb-sparkle { z-index: 2; }

/* Renderforest-specific card colorway */
.work-card .thumb.thumb-renderforest {
  background: #EEF5FF;
  color: #1F1F1F;
}
.work-card .thumb.thumb-renderforest-seats {
  background: #D2D2D2;
  color: #1F1F1F;
}
.work-card .thumb.thumb-renderforest-landings {
  background: #ECECFA;
  color: #1F1F1F;
}
.work-card .thumb.thumb-karma-luck {
  background: #2D2D2F;
  color: #F6F4EF;
}
.work-card .thumb.thumb-easydmarc-tools {
  background: #EBF0FF;
  color: #1F1F1F;
}
.work-card .thumb.thumb-edscanner {
  background: #F5F7FF;
  color: #1F1F1F;
}
.work-card .thumb.thumb-easydmarc {
  background: #0b1023;
  color: #F6F4EF;
}
.work-card .thumb.thumb-easysender {
  background: #101736;
  color: #F6F8FF;
}
.work-card .thumb.thumb-estools {
  background: #eef1fa;
  color: #1F1F1F;
}
.work-card .thumb.thumb-mummies {
  background: #3a2470;
  color: #F6F4EF;
}
.work-card .thumb.thumb-workshop {
  background: #E8E9FB;
  color: #1F1F1F;
}
.work-card .thumb.thumb-edresearch {
  background: #e9eefb;
  color: #1F1F1F;
}
.work-card .thumb.thumb-squaresigns {
  background: #F2F2F4;
  color: #1F1F1F;
}
.work-card .thumb.thumb-squaresigns .thumb-img {
  object-fit: contain;
}
.work-card .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 18px;
  gap: 6px;
}
.work-card h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.work-card .meta .tags {
  font-size: 13px;
  color: var(--text-muted);
}
.work-card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- About teaser ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.about-teaser .portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 80px;
  color: var(--accent-dark);
  font-weight: 500;
  position: sticky;
  top: 100px;
  align-self: start;
}
.about-teaser p {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin-top: 48px;
}
.skill h4 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.skill ul { list-style: none; }
.skill li {
  font-size: 15px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* ---------- CTA banner ---------- */
.cta {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 80px);
  text-align: center;
  color: var(--accent-dark);
}
.cta h2 { color: var(--accent-dark); margin-bottom: 16px; }
/* Opacity removed: 0.85 blended the text into the sage background and
   dropped contrast below WCAG AA. Use full-strength accent-dark instead. */
.cta p { color: var(--accent-dark); max-width: 50ch; margin: 0 auto 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-secondary:hover { background: var(--text); color: var(--bg); }
/* Live case-study count chip inside the "View all" button — uses currentColor
   so it inverts cleanly with the button text on hover. */
.work-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.5em;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.8em;
  font-weight: 500;
  line-height: 1;
  opacity: 0.85;
}
.btn-on-accent {
  background: var(--accent-dark);
  color: var(--accent);
}
.btn-on-accent:hover { background: var(--text); color: var(--bg); }
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(4px); }

/* Keyboard focus — visible ring for all interactive controls */
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 100px;
}
.btn-on-accent:focus-visible { outline-color: var(--bg); }
.work-card:focus-visible { outline-offset: 6px; border-radius: var(--radius-lg); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ---------- About page ---------- */
.page-head {
  padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 5vw, 64px);
}
.page-head .eyebrow { margin-bottom: 18px; }
.page-head h1 { max-width: 18ch; }
.page-head .breadcrumbs {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.page-head .breadcrumbs a {
  transition: color var(--transition);
}
.page-head .breadcrumbs a:hover { color: var(--text); }

.about-body {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: clamp(40px, 6vw, 80px);
  margin-top: 24px;
}
.about-body .portrait {
  aspect-ratio: 4 / 5;
  max-width: 320px;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 100px;
  color: var(--accent-dark);
  font-weight: 500;
  position: sticky;
  top: 100px;
  align-self: start;
}
.about-body .copy h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}
.about-body .copy h2:first-child { margin-top: 0; }
.about-body .copy p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--text);
}

/* ---------- Experience timeline ---------- */
.experience { margin-top: 24px; }
.exp-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: 1px solid var(--border); }
.exp-item .when { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.exp-item .what h4 { font-size: 17px; margin-bottom: 4px; }
.exp-item .what .where { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.exp-item .what p { font-size: 15px; color: var(--text-muted); }

/* Current role — gentle highlight. */
.exp-item.is-current {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  margin-top: 8px;
}
.exp-item.is-current + .exp-item {
  border-top-color: var(--border);
  margin-top: 24px;
  padding-top: 28px;
}
.exp-item.is-current .when {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.exp-item.is-current .now-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent-dark);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.exp-item.is-current .now-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C9D5C5;
  box-shadow: 0 0 0 0 rgba(201, 213, 197, 0.6);
  animation: nowPulse 2.2s ease-in-out infinite;
}
@keyframes nowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 213, 197, 0.6); }
  50% { box-shadow: 0 0 0 5px rgba(201, 213, 197, 0); }
}
.exp-item.is-current .what h4 { color: var(--text); }

/* ---------- Case Study ---------- */
.cs-hero {
  padding: clamp(40px, 6vw, 80px) 0;
}
.cs-hero .breadcrumbs {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.cs-hero .breadcrumbs a:hover { color: var(--text); }
.cs-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 22ch;
  margin-bottom: 24px;
}
.cs-hero .lede {
  font-size: clamp(18px, 2vw, 22px);
  max-width: 50ch;
  color: var(--text-muted);
  line-height: 1.5;
}
.cs-hero-image {
  margin-top: 64px;
  aspect-ratio: 16 / 9;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 120px;
  color: var(--accent-dark);
  font-weight: 500;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.cs-meta .item .label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cs-meta .item .value {
  font-size: 15px;
  color: var(--text);
}

.cs-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(48px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--border);
}
.cs-section .label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 6px 12px 6px 0;
  transition: color 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 400ms cubic-bezier(0.4, 0, 0.2, 1),
              letter-spacing 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cs-section.is-stuck .label {
  color: var(--text);
  transform: translateX(2px);
  letter-spacing: 0.18em;
}
@media (max-width: 720px) {
  .cs-section .label {
    position: static;
    top: auto;
  }
}
.cs-section .body { max-width: 65ch; }
.cs-section .body h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 24px;
}
.cs-section .body p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.cs-section .body ul {
  list-style: none;
  margin: 16px 0 24px;
}
.cs-section .body li {
  font-size: 17px;
  line-height: 1.6;
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text);
}
.cs-section .body li::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  transition: transform 360ms cubic-bezier(0.34,1.56,0.64,1), background 200ms, border-radius 360ms;
}
.cs-section .body li:hover::before {
  background: var(--accent-dark);
  transform: scale(1.5) rotate(45deg);
  border-radius: 30%;
}

/* ---------- Generic dot-bullet list (matches .skill li hover) ---------- */
.dot-list {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
}
.dot-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 17px;
  color: var(--text);
}
.dot-list .dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transition: transform 360ms cubic-bezier(0.34,1.56,0.64,1), background 200ms, border-radius 360ms;
}
.dot-list li:hover .dot {
  background: var(--accent-dark);
  transform: scale(1.5) rotate(45deg);
  border-radius: 30%;
}

/* Let images and grids break out of the 65ch text column and fill the
   full body grid column so screenshots are actually readable. */
.cs-section .body > .cs-image,
.cs-section .body > .cs-image-grid,
.cs-section .body > .cs-caption,
.cs-section .body > .cs-callout {
  max-width: none;
  width: 100%;
}
.cs-image-grid > * { min-width: 0; }
@media (min-width: 900px) {
  .cs-section .body > .cs-image,
  .cs-section .body > .cs-image-grid,
  .cs-section .body > .cs-caption {
    width: calc(100% + 200px);
  }
}
.cs-callout {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
  border-left: 3px solid var(--accent);
}
.cs-callout p {
  font-size: 16px;
  font-style: italic;
  color: var(--text-muted);
}
.cs-image {
  background: var(--accent);
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-size: 14px;
}

/* Case-study images: real <img> variants */
.cs-image.has-img,
.cs-hero-image.has-img {
  padding: 4px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 31, 31, 0.04), 0 8px 24px rgba(31, 31, 31, 0.06);
}
.cs-image.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 4px);
}
.cs-hero-image.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-lg) - 4px);
}
.cs-image.has-img.contain img,
.cs-hero-image.has-img.contain img {
  object-fit: contain;
  background: #fff;
}
.cs-image.dark {
  background: #1F1F1F;
  color: var(--bg);
}
.cs-image.dark.has-img {
  background: #fff;
}
.cs-image.dark.has-img.contain img {
  background: #fff;
}

/* Multi-image grids in case studies */
.cs-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.cs-image-grid > .cs-image { margin: 0; }
.cs-image-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .cs-image-grid { grid-template-columns: 1fr; }
  .cs-image-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

.cs-caption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  margin: -8px 0 24px;
}

/* Fallback when an image fails to load — shows alt text on a striped placeholder */
.cs-image .cs-image-fallback,
.cs-hero-image .cs-image-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  font-style: normal;
  color: var(--accent-dark);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 10px,
    rgba(0,0,0,0.04) 10px 11px
  );
  border-radius: inherit;
}
.cs-image.dark .cs-image-fallback {
  color: rgba(255,255,255,0.7);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 10px,
    rgba(255,255,255,0.05) 10px 11px
  );
}
.cs-image-fallback span {
  max-width: 36ch;
  display: block;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.outcome {
  background: var(--bg-alt);
  padding: 24px;
  border-radius: var(--radius);
  text-align: left;
}
.outcome .stat {
  font-family: 'Inter Tight', sans-serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.outcome .stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.contact-card {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--transition);
}
.contact-card:hover { background: var(--accent); }
.contact-card .label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-card .value {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px var(--gutter);
    gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform var(--transition);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 18px; }

  .work-grid { grid-template-columns: 1fr; }
  .about-teaser, .about-body { grid-template-columns: 1fr; }
  .about-body .portrait { position: static; max-width: 280px; margin: 0 auto; }
  .skills, .cs-meta, .outcomes, .contact-grid { grid-template-columns: 1fr; }
  .cs-section { grid-template-columns: 1fr; gap: 16px; }
  .exp-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.4,0,0.2,1);
}
.reveal.in { opacity: 1; transform: none; }


/* ==========================================================
   Creative cute layer — floating doodles & micro-motion
   Additive: extends the minimal sage system, doesn't replace it.
   ========================================================== */

:root {
  --peach: #E8D5CC;
  --lavender: #D8D4E8;
  --butter: #F0E4C2;
  --sage-deep: #8FA68A;
}

/* Global -- hide native cursor swap helpers on touch */
@media (hover: none) {
  .cursor-buddy { display: none !important; }
}

/* ---------- Morphing logo dot ---------- */
.logo-dot {
  animation: blobMorph 9s ease-in-out infinite;
  transition: transform 600ms cubic-bezier(0.4,0,0.2,1);
}
.logo:hover .logo-dot {
  animation: blobMorph 9s ease-in-out infinite, dotSpin 800ms ease-in-out;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 50%; }
  25%      { border-radius: 62% 38% 50% 50% / 50% 62% 38% 50%; }
  50%      { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
  75%      { border-radius: 55% 45% 38% 62% / 45% 55% 45% 55%; }
}
@keyframes dotSpin {
  0%, 100% { transform: rotate(0) scale(1); }
  50%      { transform: rotate(180deg) scale(1.35); }
}

/* ---------- Nav link wiggle ---------- */
.nav-links a {
  display: inline-block;
  transition: color var(--transition), transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-links a:hover { transform: translateY(-2px) rotate(-2deg); }

/* ---------- Status pill: pulsing dot ---------- */
.status-pill::before {
  animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(61, 74, 56, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(61, 74, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 74, 56, 0); }
}

/* ---------- Hero: floating doodles ---------- */
.hero, .page-head { position: relative; overflow: hidden; }
.hero .container, .page-head .container { position: relative; z-index: 2; }

.doodle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.doodle {
  position: absolute;
  display: block;
  will-change: transform;
}
.doodle svg { width: 100%; height: 100%; display: block; }

.doodle--blob-sage   { top: 10%; right: 5%; width: 150px; height: 150px; animation: drift1 16s ease-in-out infinite; }
.doodle--blob-peach  { bottom: 12%; left: 3%; width: 120px; height: 120px; animation: drift2 19s ease-in-out infinite; }
.doodle--blob-lav    { top: 58%; right: 14%; width: 90px;  height: 90px;  animation: drift3 14s ease-in-out infinite; }
.doodle--star-1      { top: 40%; right: 22%; width: 34px;  height: 34px;  animation: spin 14s linear infinite, twinkle 3.2s ease-in-out infinite; }
.doodle--star-2      { bottom: 32%; left: 36%; width: 22px; height: 22px; animation: spin 18s linear infinite reverse, twinkle 2.6s ease-in-out infinite 1s; }
.doodle--star-3      { top: 18%; left: 18%; width: 16px;  height: 16px;  animation: spin 22s linear infinite, twinkle 4s ease-in-out infinite 1.6s; }
.doodle--squiggle    { top: 64%; right: 30%; width: 88px;  height: 18px;  animation: drift4 13s ease-in-out infinite; opacity: 0.75; }
.doodle--flower      { top: 24%; left: 8%; width: 30px;  height: 30px;  animation: bobble 5s ease-in-out infinite; }

/* page-head variant (smaller density) */
.page-head .doodle--blob-sage  { top: 8%; right: 6%; width: 110px; height: 110px; }
.page-head .doodle--blob-peach { top: 60%; left: 4%; width: 80px; height: 80px; bottom: auto; }
.page-head .doodle--star-1     { top: 28%; right: 22%; }
.page-head .doodle--squiggle   { top: 70%; right: 12%; }

@keyframes drift1 {
  0%, 100% { transform: translate(0,0) rotate(0); }
  33%      { transform: translate(-22px, 18px) rotate(8deg); }
  66%      { transform: translate(16px, -12px) rotate(-6deg); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0) rotate(0); }
  50%      { transform: translate(24px, -20px) rotate(-12deg); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0,0) rotate(-6deg); }
  50%      { transform: translate(-18px, 22px) rotate(10deg); }
}
@keyframes drift4 {
  0%, 100% { transform: translate(0,0) rotate(-6deg); }
  50%      { transform: translate(-14px, 10px) rotate(10deg); }
}
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes bobble  {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-14px) rotate(10deg); }
}

/* ---------- Hero h1: drawn squiggle underline ---------- */
.hero h1 { position: relative; }
.squiggle-under {
  display: block;
  width: clamp(180px, 28vw, 320px);
  height: 16px;
  margin-top: 12px;
  color: var(--sage-deep);
  overflow: visible;
}
.squiggle-under path {
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: drawSquiggle 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.5s forwards;
}
@keyframes drawSquiggle {
  to { stroke-dashoffset: 0; }
}

/* ---------- Hero hello tag ---------- */
.hello-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.hello-tag .wave {
  display: inline-block;
  font-size: 18px;
  transform-origin: 70% 70%;
  animation: wave 2.6s ease-in-out infinite;
  color: var(--accent-dark);
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%      { transform: rotate(16deg); }
  20%, 40%      { transform: rotate(-10deg); }
}

/* ---------- Work cards: cute hover sparkles ---------- */
.work-card .thumb {
  transition: background var(--transition), transform 500ms cubic-bezier(0.4,0,0.2,1);
}
.work-card:hover .thumb { transform: rotate(-1.5deg); }

.work-card .thumb .thumb-sparkle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  color: currentColor;
  transition: opacity 400ms ease, transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.work-card .thumb .thumb-sparkle--a { top: 14px; right: 18px; width: 24px; height: 24px; transform: scale(0.4) rotate(-30deg); }
.work-card .thumb .thumb-sparkle--b { bottom: 18px; left: 18px; width: 18px; height: 18px; transform: scale(0.4) rotate(30deg); }
.work-card .thumb .thumb-sparkle--c { top: 50%; left: 14px; width: 12px; height: 12px; transform: scale(0.4); }
.work-card:hover .thumb .thumb-sparkle {
  opacity: 0.55;
  transform: scale(1) rotate(0);
}
.work-card:hover .thumb .thumb-sparkle--c { transform: scale(1) rotate(45deg); }

/* Optional bg blob behind number */
.work-card .thumb .thumb-blob {
  position: absolute;
  width: 70%;
  height: 70%;
  top: 15%; left: 15%;
  opacity: 0;
  transition: opacity 500ms ease, transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.6);
  pointer-events: none;
  color: currentColor;
}
.work-card:hover .thumb .thumb-blob {
  opacity: 0.18;
  transform: scale(1) rotate(20deg);
}

/* ---------- CTA: bouncing background shapes + scattered cute elements ---------- */
.cta { position: relative; overflow: hidden; }
.cta::before, .cta::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--accent-dark);
  opacity: 0.10;
  pointer-events: none;
}
.cta::before {
  width: 120px; height: 120px;
  top: -32px; left: -32px;
  animation: orbitA 18s ease-in-out infinite;
}
.cta::after {
  width: 180px; height: 180px;
  bottom: -60px; right: -60px;
  animation: orbitB 22s ease-in-out infinite;
}
@keyframes orbitA {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(28px, 18px) scale(1.18); }
}
@keyframes orbitB {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-24px, -16px) scale(1.12); }
}
.cta > * { position: relative; z-index: 1; }

/* --- decorative sparkles, flower, squiggle, dots inside CTA --- */
.cta-doodle {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  color: var(--accent-dark);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-doodle svg { width: 100%; height: 100%; display: block; }
.cta.in .cta-doodle { opacity: 1; transform: scale(1); }

.cta-doodle--star-tl   { top: 28px; left: 38px;  width: 24px; height: 24px; animation: spin 14s linear infinite, twinkle 3s   ease-in-out infinite; transition-delay: 100ms; }
.cta-doodle--star-tr   { top: 44px; right: 52px; width: 18px; height: 18px; animation: spin 18s linear infinite reverse, twinkle 2.6s ease-in-out infinite 0.8s; transition-delay: 280ms; }
.cta-doodle--star-bl   { bottom: 56px; left: 64px; width: 14px; height: 14px; animation: spin 22s linear infinite, twinkle 3.2s ease-in-out infinite 1.2s; transition-delay: 460ms; }
.cta-doodle--star-br   { bottom: 40px; right: 80px; width: 20px; height: 20px; animation: spin 16s linear infinite, twinkle 3.4s ease-in-out infinite 1.6s; transition-delay: 360ms; }
.cta-doodle--flower    { bottom: 28px; left: 28px; width: 30px; height: 30px; animation: bobble 5.5s ease-in-out infinite; transition-delay: 540ms; }
.cta-doodle--flower-2  { top: 32px; right: 28px;  width: 22px; height: 22px; animation: bobble 6.8s ease-in-out infinite 0.6s; transition-delay: 640ms; }
.cta-doodle--squiggle  { top: 18px; left: 50%;    width: 90px; height: 16px; transform: translateX(-50%) scale(0.6); animation: floatY 7s ease-in-out infinite; transition-delay: 720ms; }
.cta.in .cta-doodle--squiggle { transform: translateX(-50%) scale(1); }
.cta-doodle--dots {
  bottom: 28px; left: 50%; width: 56px; height: 8px;
  transform: translateX(-50%) scale(0.6);
  display: flex; justify-content: space-between; align-items: center;
  transition-delay: 800ms;
}
.cta.in .cta-doodle--dots { transform: translateX(-50%) scale(1); }
.cta-doodle--dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-dark);
  opacity: 0.7;
  animation: dotPulse 2.4s ease-in-out infinite;
}
.cta-doodle--dots span:nth-child(2) { animation-delay: 0.3s; }
.cta-doodle--dots span:nth-child(3) { animation-delay: 0.6s; }
.cta-doodle--dots span:nth-child(4) { animation-delay: 0.9s; }
.cta-doodle--dots span:nth-child(5) { animation-delay: 1.2s; }
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.6); opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* H2 inside CTA gets its own drawn squiggle underline */
.cta h2 { position: relative; display: inline-block; }
.cta-h2-underline {
  display: block;
  margin: 8px auto 0;
  width: 100px; height: 12px;
  color: var(--accent-dark);
  overflow: visible;
}
.cta-h2-underline path {
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
}
.cta.in .cta-h2-underline path { animation: drawSquiggle 1.5s cubic-bezier(0.65,0,0.35,1) 0.4s forwards; }

/* Button gets a sparkle that pops on hover */
.cta .btn { position: relative; overflow: visible; }
.cta .btn::before {
  content: '';
  position: absolute;
  top: -10px; right: -8px;
  width: 16px; height: 16px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4) rotate(-30deg);
  transition: opacity 300ms ease, transform 500ms cubic-bezier(0.34,1.56,0.64,1);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
}
.cta .btn:hover::before { opacity: 1; transform: scale(1) rotate(0); }

/* ---------- Button arrow: bouncing slide ---------- */
.btn:hover .arrow {
  animation: arrowBounce 700ms ease-in-out infinite;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateX(4px); }
  50%      { transform: translateX(9px); }
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 24px;
  padding: 3px;
  background: var(--bg-alt);
  border-radius: 100px;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  min-width: 34px;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.is-active {
  background: var(--text);
  color: var(--bg);
}
.lang-switch button:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .lang-switch { margin-left: 12px; }
  .lang-switch button { padding: 5px 8px; font-size: 11px; min-width: 30px; }
}

/* ---------- Portrait: gentle nod + sparkle ---------- */
/* Note: position is set to `sticky` in the base rules above; we deliberately
   don't reset it here so the portrait can pin while scrolling. */
.about-teaser .portrait,
.about-body .portrait {
  overflow: hidden;
  transition: transform 400ms cubic-bezier(0.4,0,0.2,1);
}
.about-teaser .portrait img,
.about-body .portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-teaser .portrait:hover,
.about-body .portrait:hover {
  transform: rotate(-2deg) scale(1.015);
}
/* Small star in the bottom-left corner — appears on hover alongside the top-right one. */
.about-teaser .portrait::before,
.about-body .portrait::before {
  content: '';
  position: absolute;
  bottom: 14px; left: 16px;
  width: 14px; height: 14px;
  background: #ffffff;
  opacity: 0;
  transform: scale(0.7) rotate(12deg);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 2;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
}
.about-teaser .portrait:hover::before,
.about-body .portrait:hover::before {
  opacity: 0.85;
  transform: scale(1) rotate(0deg);
  animation: twinkle 3s ease-in-out infinite;
}

/* The larger top-right star only appears on hover. */
.about-teaser .portrait::after,
.about-body .portrait::after {
  content: '';
  position: absolute;
  top: 18px; right: 20px;
  width: 22px; height: 22px;
  background: #ffffff;
  opacity: 0;
  transform: scale(0.7) rotate(-12deg);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 2;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
}
.about-teaser .portrait:hover::after,
.about-body .portrait:hover::after {
  opacity: 0.9;
  transform: scale(1) rotate(0deg);
  animation: twinkle 3s ease-in-out infinite 280ms;
}

/* ---------- Cursor companion ---------- */
.cursor-buddy {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-dark);
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.32;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: width 240ms ease, height 240ms ease, opacity 240ms ease, background 240ms ease, border-radius 600ms ease;
}
.cursor-buddy.is-hover {
  width: 44px; height: 44px;
  opacity: 0.22;
  background: var(--sage-deep);
  border-radius: 62% 38% 50% 50% / 50% 62% 38% 50%;
}

/* ---------- Click sparkle ---------- */
.spark {
  position: fixed;
  width: 14px; height: 14px;
  pointer-events: none;
  z-index: 9998;
  background: var(--accent-dark);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
  transform: translate(-50%, -50%);
  animation: sparkPop 750ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes sparkPop {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1) rotate(140deg); opacity: 0; }
}

/* ---------- Footer doodle line ---------- */
.footer-doodle {
  display: block;
  width: 60px; height: 14px;
  margin-bottom: 18px;
  color: var(--sage-deep);
}
.footer-doodle path {
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}
footer { position: relative; overflow: hidden; }
footer::before {
  content: '';
  position: absolute;
  left: -40px; bottom: -40px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.25;
  animation: orbitA 20s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Contact cards: cute pulse on hover ---------- */
.contact-card {
  position: relative;
  overflow: hidden;
  transition: background var(--transition), transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-card:hover { transform: translateY(-3px) rotate(-0.6deg); }
.contact-card::after {
  content: '';
  position: absolute;
  top: 16px; right: 18px;
  width: 18px; height: 18px;
  background: var(--accent-dark);
  opacity: 0;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 C 12.8 7 17 11.2 23 12 C 17 12.8 12.8 17 12 23 C 11.2 17 7 12.8 1 12 C 7 11.2 11.2 7 12 1 Z'/></svg>") center/contain no-repeat;
  transition: opacity 300ms ease, transform 600ms cubic-bezier(0.34,1.56,0.64,1);
  transform: scale(0.5);
}
.contact-card:hover::after { opacity: 0.55; transform: scale(1) rotate(45deg); }

/* ---------- Skill list: tiny bullet sparkle ---------- */
.skill li { position: relative; padding-left: 18px; }
.skill li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 360ms cubic-bezier(0.34,1.56,0.64,1), background 200ms;
}
.skill li:hover::before {
  background: var(--accent-dark);
  transform: scale(1.5) rotate(45deg);
  border-radius: 30%;
}

/* ---------- Reveal animations: small adds ---------- */
.reveal.in .doodle { /* no-op, doodles are not reveal-gated */ }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .squiggle-under path { stroke-dashoffset: 0 !important; }
}


/* ---------- Inline icons in links ---------- */
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-links .ic {
  flex: 0 0 auto;
  opacity: 0.7;
  transition: opacity var(--transition), transform var(--transition);
}
.footer-links a:hover .ic { opacity: 1; transform: translateY(-1px); }

.contact-card .ic-card {
  display: block;
  margin-bottom: 20px;
  opacity: 0.75;
  transition: opacity var(--transition), transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-card:hover .ic-card {
  opacity: 1;
  transform: rotate(-6deg) scale(1.08);
}


/* ---------- Contact card: copied state ---------- */
.contact-card.is-copied {
  background: var(--accent);
}
.contact-card.is-copied .label {
  color: var(--accent-dark);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.contact-card.is-copied .ic-card {
  transform: rotate(-6deg) scale(1.12);
  opacity: 1;
}


/* ---------- CTA tangle: knot of thoughts unspooling ---------- */
.cta-tangle {
  position: absolute;
  top: 50%;
  right: -210px;
  transform: translateY(-50%);
  width: 200px;
  height: 110px;
  color: var(--accent-dark);
  opacity: 0.78;
  pointer-events: none;
}
.cta-tangle .t-mess {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}
.cta.in .cta-tangle .t-mess {
  animation: tangleDraw 3.4s cubic-bezier(0.55, 0, 0.25, 1) 0.3s forwards;
}
@keyframes tangleDraw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 1100px) {
  .cta-tangle {
    width: 150px;
    height: 82px;
    right: -160px;
  }
}
@media (max-width: 900px) {
  .cta-tangle {
    position: relative;
    top: auto; right: auto;
    transform: none;
    display: block;
    margin: 0 auto 8px;
    width: 160px;
    height: 88px;
    opacity: 0.65;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cta-tangle .t-mess { stroke-dashoffset: 0; }
}


/* ---------- CTA: slow color cycle through brand palette ---------- */
/* All stations stay light bg + dark text — never inverts. */
/* Cycle:
   0%   sage         #C9D5C5  + #3D4A38
   25%  dusty rose   #E8D5CC  + #5A3B33
   50%  lavender     #D8D4E8  + #3F3A5A
   75%  cream        #F3EFE7  + #5A3B33
   100% back to sage
*/
.cta {
  animation: ctaBgCycle 60s ease-in-out infinite;
}
.cta h2,
.cta p {
  animation: ctaTextCycle 60s ease-in-out infinite;
}
.cta .btn-on-accent {
  animation: ctaBtnCycle 60s ease-in-out infinite;
  /* Override the static accent transition so the cycle takes over */
  transition: transform var(--transition);
}
.cta-tangle {
  animation: ctaTangleCycle 60s ease-in-out infinite;
}

@keyframes ctaBgCycle {
  0%,
  100% { background-color: #C9D5C5; }
  25%  { background-color: #E8D5CC; }
  50%  { background-color: #D8D4E8; }
  75%  { background-color: #F3EFE7; }
}
@keyframes ctaTextCycle {
  0%,
  100% { color: #3D4A38; }
  25%  { color: #5A3B33; }
  50%  { color: #3F3A5A; }
  75%  { color: #5A3B33; }
}
@keyframes ctaBtnCycle {
  0%,
  100% { background-color: #3D4A38; color: #C9D5C5; }
  25%  { background-color: #5A3B33; color: #E8D5CC; }
  50%  { background-color: #3F3A5A; color: #D8D4E8; }
  75%  { background-color: #5A3B33; color: #F3EFE7; }
}
@keyframes ctaTangleCycle {
  0%,
  100% { color: #3D4A38; }
  25%  { color: #5A3B33; }
  50%  { color: #3F3A5A; }
  75%  { color: #5A3B33; }
}

/* Hover on the button should still feel responsive — pause the color cycle for a moment so the hover state reads cleanly */
.cta .btn-on-accent:hover {
  animation-play-state: paused;
  filter: brightness(0.92);
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .cta h2,
  .cta p,
  .cta .btn-on-accent,
  .cta-tangle { animation: none; }
}


/* ==========================================================
   Image lightbox
   ========================================================== */

/* Zoom affordance on case-study images */
.cs-image.is-zoomable,
.cs-hero-image.is-zoomable {
  cursor: zoom-in;
  position: relative;
}
.cs-image.is-zoomable::after,
.cs-hero-image.is-zoomable::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.65) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/><path d='M11 8v6M8 11h6'/></svg>") center / 18px 18px no-repeat;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: 2;
}
.cs-image.is-zoomable:hover::after,
.cs-hero-image.is-zoomable:hover::after {
  opacity: 1;
}
.cs-image.is-zoomable img,
.cs-hero-image.is-zoomable img {
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cs-image.is-zoomable:hover img,
.cs-hero-image.is-zoomable:hover img {
  transform: scale(1.01);
}

/* The overlay */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px clamp(16px, 4vw, 48px) 64px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.lb-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Crop the zoom transform to the stage so panned content doesn't paint over chrome */
  overflow: hidden;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  background: #111;
  transform: scale(0.97);
  transform-origin: center center;
  transition: transform 280ms cubic-bezier(0.34, 1.4, 0.64, 1);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-img.is-zoomed { cursor: grab; }
.lb-img.is-panning { cursor: grabbing; transition: none; }
/* While the user is wheel-zooming we kill the transition so it tracks the pointer */
.lb-img.is-wheeling { transition: none; }
.lb-overlay.is-open .lb-img {
  transform: translate(var(--lb-tx, 0px), var(--lb-ty, 0px)) scale(var(--lb-scale, 1));
}

/* Close button */
.lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  z-index: 2;
}
.lb-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

/* Prev / next navigation */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  cursor: pointer;
  transition: background var(--transition);
  z-index: 2;
}
.lb-nav:hover { background: rgba(255,255,255,0.2); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

@media (max-width: 720px) {
  .lb-prev, .lb-next { display: none !important; }
  .lb-overlay { padding: 56px 16px; }
}

/* Caption + counter */
.lb-caption {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(640px, calc(100% - 120px));
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  z-index: 2;
}
.lb-counter {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter Tight', sans-serif;
  z-index: 2;
}


/* ==========================================================
   Resume PDF viewer modal
   ========================================================== */
.pdf-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.pdf-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}
.pdf-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 31, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pdf-viewer__panel {
  position: relative;
  width: min(960px, 100%);
  height: min(92vh, 1200px);
  background: var(--bg, #FAF7F2);
  border-radius: var(--radius-lg, 20px);
  border: 1px solid var(--border, #E6E2D7);
  box-shadow: 0 30px 80px rgba(31, 31, 31, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.985);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.pdf-viewer.is-open .pdf-viewer__panel {
  transform: translateY(0) scale(1);
}
.pdf-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-alt, #F3EFE7);
  border-bottom: 1px solid var(--border, #E6E2D7);
}
.pdf-viewer__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1F1F1F);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-viewer__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdf-viewer__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border, #E6E2D7);
  background: var(--bg, #FAF7F2);
  color: var(--text, #1F1F1F);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.pdf-viewer__btn:hover {
  background: var(--accent, #C9D5C5);
  border-color: var(--accent, #C9D5C5);
}
.pdf-viewer__btn--primary {
  background: var(--accent-dark, #3D4A38);
  border-color: var(--accent-dark, #3D4A38);
  color: var(--bg, #FAF7F2);
}
.pdf-viewer__btn--primary:hover {
  background: #2c3528;
  border-color: #2c3528;
  color: var(--bg, #FAF7F2);
}
.pdf-viewer__close {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.pdf-viewer__frame-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #2a2a2a;
}
.pdf-viewer__frame-wrap::before {
  content: "Loading…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
.pdf-viewer.is-loading .pdf-viewer__frame-wrap::before { opacity: 1; }
.pdf-viewer__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #2a2a2a;
}

@media (max-width: 640px) {
  .pdf-viewer { padding: 0; }
  .pdf-viewer__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: 0;
  }
  .pdf-viewer__title { font-size: 13px; }
}


/* ---------- Mobile fixes ---------- */
@media (max-width: 820px) {
  .nav { position: -webkit-sticky; position: sticky; top: 0; z-index: 500; background: rgba(250,247,242,0.96); }
  .nav-links {
    position: absolute; inset: auto; top: 100%; left: 0; right: 0;
    transform: none; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
    box-shadow: 0 12px 24px rgba(31,31,31,0.06);
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .about-teaser .portrait,
  .about-body .portrait { position: relative; top: auto; max-width: 220px; width: 100%; margin: 0 0 8px; }
}
