:root {
  --bg:            #0f0d1e;
  --bg-surface:    #17152b;
  --bg-elevated:   #1e1b35;
  --text:          #f0eff8;
  --text-muted:    #9091a4;
  --accent:        #4f46e5;
  --accent-light:  #818cf8;
  --border:        rgba(129, 140, 248, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'Barlow', system-ui, sans-serif;
  --max-width:     960px;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overscroll-behavior-x: none;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */

h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}

h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.875rem;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

/* ── Skip Link ── */

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 9999;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 1rem;
}

/* ── Navigation ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  transition: background-color 0.3s var(--ease-out-quart), border-color 0.3s;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background-color: color-mix(in srgb, var(--bg) 97%, transparent);
  border-bottom-color: var(--border-subtle);
}

nav ul {
  list-style: none;
  gap: 2.5rem;
  align-items: center;
  display: none;
}

nav ul li a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--text);
}

.mobile-nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  margin-right: auto;
}

@media (max-width: 767px) {
  nav.nav-open #nav-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: color-mix(in srgb, var(--bg) 98%, transparent);
    padding: 1rem;
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  nav ul {
    display: flex;
  }

  .mobile-nav-toggle {
    display: none;
  }
}

/* ── Sections ── */

section {
  padding: clamp(2.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 2rem);
  max-width: var(--max-width);
  margin: 0 auto;
  scroll-margin-top: 64px;
}

section + section {
  position: relative;
}

section + section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  height: 1px;
  background: var(--border-subtle);
  pointer-events: none;
}

/* ── Hero ── */

section#home {
  padding-top: calc(64px + 1.5rem);
  padding-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  flex: 0 0 auto;
  max-width: 520px;
}

@media (max-width: 767px) {
  section#home {
    flex-direction: column;
  }
  .hero-content {
    max-width: 100%;
  }
}

.hero-eyebrow em {
  color: oklch(74% 0.05 265);
  font-style: normal;
}

.hero-eyebrow-accent {
  color: oklch(78% 0.13 55);
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}

.hero-content h1 {
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 2rem;
}

.hero-content h1 a {
  color: inherit;
}

.hero-summary {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-align: justify;
  hyphens: auto;
}


/* ── Expertise List ── */

.expertise-list {
  list-style: none;
  padding: 0;
}

.expertise-list li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 1rem;
  color: var(--text-muted);
}

.expertise-list li:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.expertise-list strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 600px) {
  .expertise-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ── AI Pivot ── */

section#ai-pivot {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
}

section#ai-pivot h2 {
  margin-bottom: 0.5rem;
}

/* ── AI Pivot intro ── */
.pivot-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: oklch(72% 0.14 55);
  margin-bottom: 1rem;
}

.pivot-body {
  margin-bottom: 0;
  text-align: justify;
  hyphens: auto;
}

.pivot-closer {
  color: oklch(72% 0.14 55);
  font-weight: 600;
}

@keyframes portrait-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-10px) rotate(-2deg); }
}

.hero-portrait-wrap {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  position: relative;
}

/* Indigo phosphor tint */
.hero-portrait-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: oklch(55% 0.22 265 / 0.08);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  border-radius: 3px;
}

/* Horizontal scanlines */
.hero-portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.2) 1px,
    rgba(0, 0, 0, 0.2) 2px
  );
  pointer-events: none;
  z-index: 2;
  border-radius: 3px;
}

.hero-portrait {
  width: 100%;
  height: auto;
  display: block;
  outline: 4px solid var(--text);
  border-radius: 3px;
  filter: grayscale(1) contrast(1.1) brightness(1.05);
  animation: portrait-float 5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.35s ease;
}

.hero-portrait:hover {
  animation-play-state: paused;
  transform: translateY(-12px) rotate(-1deg) scale(1.03);
  filter: grayscale(1) contrast(1.1) brightness(1.05)
          drop-shadow(0 0 24px oklch(65% 0.22 265 / 0.7));
}

@media (prefers-reduced-motion: reduce) {
  .hero-portrait { animation: none; transform: rotate(-3deg); }
}

@media (max-width: 767px) {
  .hero-portrait-wrap {
    order: -1;
    width: 180px;
    margin: 0 auto;
  }
}

@keyframes book-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(1deg); }
}

.pivot-book-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Horizontal scanlines */
.pivot-book-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.2) 1px,
    rgba(0, 0, 0, 0.2) 2px
  );
  pointer-events: none;
  z-index: 2;
}

.pivot-book-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1) contrast(1.1) brightness(1.05);
  animation: book-float 4s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.35s ease;
  cursor: pointer;
}

.pivot-book-wrap img:hover {
  animation-play-state: paused;
  transform: translateY(-12px) rotate(-2deg) scale(1.04);
  filter: grayscale(1) contrast(1.1) brightness(1.05)
          drop-shadow(0 0 24px oklch(65% 0.22 265 / 0.7));
}

@media (prefers-reduced-motion: reduce) {
  .pivot-book-wrap img {
    animation: none;
  }
}

@media (max-width: 600px) {
  section#ai-pivot {
    grid-template-columns: 1fr;
  }
  .pivot-book-wrap {
    width: 160px;
    margin: 0 auto;
  }
}


/* ── Resume ── */

section#resume,
section#testimonials,
section#content {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

section#resume h2 {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.resume-intro {
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 100%;
}


section#resume h3 {
  margin-top: 2rem;
}

section#resume h3:first-of-type {
  margin-top: 0;
}

h3:has(.expand-toggle) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.expand-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
}

.expand-toggle:hover {
  color: var(--text);
}

.job-meta {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.job-role {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.job-role:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.job-role-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.job-role-dates,
.job-role-note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.work-list details > div > p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.job-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.job-skills-label {
  width: 100%;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Work list skills — inline dot-separated, no boxes */
.work-list .job-skills {
  display: block;
  line-height: 1.7;
}

.work-list .job-skills-label {
  display: inline;
  margin-right: 0.5rem;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--accent-light);
}

.work-list .skill-tag {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.work-list .skill-tag + .skill-tag::before {
  content: ' · ';
  color: var(--border);
}

.job-acquisition-note {
  margin-top: 1.25rem;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--text-muted);
  opacity: 0.7;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.work-list details > div {
  padding: 1.25rem 1rem 1.5rem;
}

/* ── Education ── */

details {
  margin-bottom: 2px;
}

details summary {
  padding: 0.875rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: '+';
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent-light);
  width: 14px;
  flex-shrink: 0;
}

details[open] summary::before {
  content: '−';
}

details[open] summary,
details summary:hover {
  color: var(--text);
  border-color: var(--border);
}

details > div {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
}

details > div p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

/* ── Writing ── */

.writing-archive-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: oklch(98% 0.005 265);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.writing-archive-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.writing-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s var(--ease-out-quart);
}

.writing-body.open {
  grid-template-rows: 1fr;
}

.writing-body-inner {
  min-height: 0;
}

.writing-list {
  margin-top: 2rem;
}

.article-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.writing-list details > div p + p {
  margin-top: 1rem;
}

.edu-list details summary span:first-child {
  flex: 1;
}

.edu-year {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 1rem;
}

.edu-entry {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
}

.edu-entry-text {
  flex: 1;
  min-width: 0;
}

.cert-thumb {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-subtle);
  padding: 0;
  cursor: pointer;
  display: block;
  margin-top: 0.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.cert-thumb img {
  display: block;
  width: 110px;
  height: auto;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.cert-thumb::after {
  content: 'View';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 30, 0.6);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s;
}

.cert-thumb:hover {
  border-color: var(--accent);
}

.cert-thumb:hover img {
  opacity: 0.5;
}

.cert-thumb:hover::after {
  opacity: 1;
}

/* ── Image Modal ── */

.img-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out-quart);
}

.img-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.img-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 13, 30, 0.95);
}

.img-modal-container {
  position: relative;
  width: min(700px, 92vw);
  z-index: 1;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out-quart);
}

.img-modal.is-open .img-modal-container {
  transform: scale(1);
}

.img-modal-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.img-modal-frame {
  position: relative;
}

.img-modal-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-subtle);
}

.img-modal-close {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(15, 13, 30, 0.85);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-right: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  transition: background 0.15s, color 0.15s;
}

.img-modal-close:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.company-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--accent-light);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.company-link:hover {
  color: var(--text);
}

.article-source {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--accent-light);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.article-source:hover {
  color: var(--text);
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 2.125rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  text-transform: uppercase;
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.article-byline {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Lede — first body paragraph elevated */
.writing-list details > div > p:first-of-type {
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.72;
}

/* Drop cap */
.writing-list details > div > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.875rem;
  line-height: 0.78;
  float: left;
  margin-right: 0.08em;
  margin-top: 0.06em;
  color: var(--accent-light);
}

/* ── Skills Tags (job entries only) ── */

.skill-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Skills Matrix ── */

.section-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2rem 0 0;
}


/* ── Client Marquee ── */

.client-marquee-wrap {
  padding: 1.25rem 0 0.5rem;
  margin: 0 0 0.5rem;
}

.client-marquee-fade {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.client-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: logo-scroll 28s linear infinite;
}

.client-track:hover {
  animation-play-state: paused;
}

.client-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 3.5rem;
}

.client-logo {
  height: 32px;
  width: auto;
  filter: invert(1);
  opacity: 0.38;
  transition: opacity 0.2s ease;
}

.client-track:hover .client-logo {
  opacity: 0.6;
}

.client-link:hover .client-logo {
  opacity: 0.85;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .client-track { animation: none; }
}

/* ── Role KPIs ── */

.role-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0.875rem 0;
}

.role-kpi {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  color: oklch(72% 0.14 55);
  line-height: 1;
  flex-shrink: 0;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}

.kpi-note {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.7;
  white-space: normal;
  margin-left: auto;
  text-align: right;
}

@media (max-width: 600px) {
  .skill-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .skill-cat-name {
    align-self: auto;
  }
}

/* ── Video ── */

.video-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
}

.video-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.875rem 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.2s var(--ease-out-quart);
}

.video-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.video-row::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-quart);
}

.video-row:hover {
  background: color-mix(in srgb, var(--bg-surface) 70%, transparent);
}

.video-row:hover::after {
  transform: scaleX(1);
}

.video-row-thumb {
  position: relative;
  flex-shrink: 0;
  width: 148px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--text);
}

/* Horizontal scanlines */
.video-row-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.2) 1px,
    rgba(0, 0, 0, 0.2) 2px
  );
  pointer-events: none;
  z-index: 2;
}

.video-row-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.video-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.5) brightness(0.9);
  transition: filter 0.25s var(--ease-out-quart), transform 0.35s var(--ease-out-quart);
}

.video-row:hover .video-row-thumb img {
  filter: grayscale(0.5) brightness(0.8);
  transform: scale(1.04);
}

.video-row-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.75;
  z-index: 1;
  transition: color 0.2s, opacity 0.2s;
}

.video-row:hover .video-row-play {
  color: var(--accent-light);
  opacity: 1;
}

.video-row-title {
  font-family: var(--font-body);
  font-size: 1.175rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
  transition: color 0.2s;
}

.video-row:hover .video-row-title {
  color: var(--text);
}

/* ── Video Modal ── */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out-quart);
}

.video-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 13, 30, 0.95);
}

.video-modal-container {
  position: relative;
  width: min(860px, 90vw);
  z-index: 1;
  transform: scale(0.96);
  transition: transform 0.3s var(--ease-out-quart);
}

.video-modal.is-open .video-modal-container {
  transform: scale(1);
}

.video-modal-frame {
  position: relative;
}

.video-modal-player {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-player iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-modal-close {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(15, 13, 30, 0.85);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-right: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.video-modal-close:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ── Content (nested sections) ── */

#video {
  padding-bottom: 1rem;
  max-width: 100%;
}

#writing {
  padding-top: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.testimonials-list {
  margin-top: 2rem;
}

.testimonial-item summary .testimonial-author {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.testimonial-item summary .testimonial-role {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.testimonials-list details > div p {
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.72;
}

.testimonials-list details > div p + p {
  margin-top: 1rem;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem clamp(1.25rem, 4vw, 2rem);
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__pi {
  font-size: 1.125rem;
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: none;
  position: relative;
}
.footer__pi:hover { color: var(--accent-light); }
.footer__pi::before {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.footer__pi:hover::before { opacity: 1; }

footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: none;
  margin: 0;
}

.footer-copyright {
  font-size: 1.125rem;
}

/* ── Back to top ── */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent-light);
  font-size: 1.125rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out-quart), color 0.15s, border-color 0.15s, transform 0.2s var(--ease-out-quart);
  z-index: 200;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  color: var(--text);
  border-color: var(--accent-light);
  transform: translateY(-3px);
}

footer a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}

footer a:hover {
  color: var(--accent-light);
}

/* ── Scrollbar ── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Animations ── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes details-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero — staggered entrance */
#home .hero-eyebrow { animation: fade-up 0.7s var(--ease-out-quart) 0.05s both; }
#home h1            { animation: fade-up 0.8s var(--ease-out-quart) 0.2s  both; }
#home .hero-summary { animation: fade-up 0.65s var(--ease-out-quart) 0.38s both; }

/* Smooth details open */
details[open] > div {
  animation: details-reveal 0.28s var(--ease-out-quart) both;
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out-quart), transform 0.65s var(--ease-out-quart);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ────────────────────────────────────
   PRIVACY BAR
──────────────────────────────────── */
.note-bar {
  background: oklch(95% 0.02 265);
  border-top: 1px solid oklch(82% 0.05 265);
  border-bottom: 1px solid oklch(82% 0.05 265);
  scroll-margin-top: 64px;
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}


.note-bar__header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 52px;
}

.note-bar__label {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.note-bar__rule {
  width: 1px;
  height: 22px;
  background: oklch(72% 0.07 265);
  flex-shrink: 0;
}

.note-bar__text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: oklch(20% 0.025 265);
  line-height: 1.5;
  flex: 1;
  text-align: center;
}
.note-bar__text em {
  font-style: normal;
  font-weight: 500;
  color: oklch(38% 0.05 265);
}
.note-bar__text strong {
  font-weight: 600;
  color: oklch(20% 0.025 265);
}

.note-bar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 0;
  transition: color 0.15s;
  flex-shrink: 0;
}
.note-bar__toggle:hover { color: oklch(55% 0.18 265); }

.note-bar__toggle-icon {
  transition: transform 0.3s var(--ease-out-quart);
  display: block;
}
.note-bar__toggle[aria-expanded="true"] .note-bar__toggle-icon {
  transform: rotate(180deg);
}

.note-bar__expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--ease-out-quart);
}
.note-bar__expand.open {
  grid-template-rows: 1fr;
}
.note-bar__expand-inner {
  overflow: hidden;
}

.note-bar__detail {
  padding: 16px 0 24px;
  border-top: 1px solid oklch(82% 0.05 265);
}

.note-bar__linkedin-logo {
  height: 22px;
  width: auto;
  vertical-align: middle;
  position: relative;
  top: -2px;
  opacity: 0.75;
}

.note-bar__detail-body a {
  color: oklch(38% 0.18 265);
  text-decoration: none;
}
.note-bar__detail-body a:hover {
  color: oklch(28% 0.18 265);
}

.note-bar__detail-body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: oklch(32% 0.025 265);
  line-height: 1.72;
  max-width: 100%;
  text-align: justify;
}


/* ── Mobile Business Card ── */

#card-view  { display: none; }
.card-back-btn { display: none; }

@media (max-width: 767px) {

  /* Card mode defaults: hide site chrome */
  body:not(.site-mode) #nav,
  body:not(.site-mode) #main-content,
  body:not(.site-mode) .skip-link,
  body:not(.site-mode) #back-to-top {
    display: none !important;
  }

  /* Card container */
  #card-view {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100dvh;
    padding: 40px 28px 28px;
    background: var(--bg);
    position: fixed;
    inset: 0;
    z-index: 200;
  }

  /* Site mode: swap visibility */
  body.site-mode #card-view { display: none; }

  /* Back-to-card chip — hidden until re-enabled */
  body.site-mode .card-back-btn {
    display: none;
  }
}

/* Card internals — no media query needed, they only appear in the card */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-header-left {
  display: flex;
  flex-direction: column;
}

.card-avatar {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--accent-light);
}

.card-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0;
}

.card-role {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-top: 6px;
}

.card-contacts {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.card-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.2;
  transition: color 0.15s;
}

.card-contact svg {
  flex-shrink: 0;
  color: var(--accent-light);
  opacity: 0.75;
}

.card-contact:active { color: var(--text); }

.card-rule {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

.card-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.card-qr {
  display: block;
  border-radius: 4px;
}

.card-qr-label {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-site-btn {
  align-self: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.15s;
}

.card-site-btn:hover { color: var(--accent-light); }
