@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-variable.woff2") format("woff2-variations"),
       url("/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

img, video, picture, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; }

html, body { min-height: 100%; }

body {
  background-color: var(--color-body-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p { line-height: var(--leading-loose); }
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-quick) var(--ease);
}
a:hover { color: var(--color-accent-hover); }

hr {
  border: none;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-6) 0;
}

::selection { background-color: rgba(194, 84, 42, 0.18); }

/* Eyebrow: small uppercase letter-spaced label used in many places */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-text);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
}
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 100; }

/* ============================================================
   PAGE CONTAINER — the centred light band on the dark body
   ============================================================ */
.page-container {
  max-width: var(--container);
  margin: 0 auto;
  background-color: var(--color-page-bg);
  border-left: 1px solid var(--color-page-border);
  border-right: 1px solid var(--color-page-border);
  box-shadow: var(--shadow-page);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.content { padding: var(--space-4); }
@media (min-width: 768px) {
  .content { padding: var(--space-6); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  background-color: var(--color-page-bg);
  border-bottom: 1px solid var(--color-rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  gap: var(--space-4);
}
.nav__brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.78);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.nav__brand:hover { color: #000; }

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 36px;
  padding: 0;
  cursor: pointer;
}
.nav__toggle svg { margin: 0 auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}
.nav__link {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-md);
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid transparent;
  transition: color var(--duration-quick) var(--ease),
              border-color var(--duration-quick) var(--ease);
}
.nav__link:hover { color: #000; }
.nav__link[aria-current="page"] {
  color: #000;
  border-bottom-color: rgba(0, 0, 0, 0.7);
}

@media (max-width: 767px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-page-bg);
    border-bottom: 1px solid var(--color-rule);
    padding: var(--space-3) var(--space-6);
    gap: var(--space-1);
    z-index: 50;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__inner { position: relative; }
  .nav__link {
    border-bottom: none;
    padding-left: var(--space-4);
    border-left: 3px solid transparent;
  }
  .nav__link[aria-current="page"] {
    border-bottom: none;
    border-left-color: rgba(0, 0, 0, 0.7);
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
}
.hero__video {
  width: 100%;
  height: auto;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.hero__caption {
  position: absolute;
  z-index: 1;
  left: clamp(var(--space-4), 4vw, 2.5rem);
  bottom: clamp(var(--space-4), 4vw, 2.5rem);
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  max-width: min(60ch, 85%);
}
.hero__eyebrow {
  font-size: clamp(0.65rem, 1.4vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.4rem;
  display: block;
}
.hero__title {
  font-weight: 800;
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: #fff;
}

/* ============================================================
   TAB BAR
   ============================================================ */
.tab-bar-wrap {
  position: relative;
  background: var(--color-tab-bar-bg);
  border-bottom: 1px solid var(--color-rule);
  overflow: hidden;
}
.tab-bar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0 var(--space-4);
  min-width: max-content;
}
.tab-bar__link {
  display: block;
  padding: 14px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-soft);
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-quick) var(--ease),
              border-color var(--duration-quick) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.tab-bar__link:hover { color: var(--color-text); }
.tab-bar__link.is-active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
.tab-scroll-hint {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--color-tab-bar-bg) 80%);
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}
.tab-scroll-hint.is-visible { display: flex; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ============================================================
   GRID PRIMITIVES
   ============================================================ */
.grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 576px) {
  .grid { gap: var(--space-6); }
}
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}
.grid--3-card { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--photos { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  .grid--photos { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   CARD (white box on the page-container)
   ============================================================ */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  height: 100%;
}
@media (min-width: 768px) {
  .card { padding: var(--space-8); }
}
.card--padded-lg { padding: var(--space-8); }
.card--full { grid-column: 1 / -1; }

.error-card {
  max-width: var(--container-narrow, 720px);
  margin: var(--space-12) auto;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}
.error-card__title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}
.error-card .prose p { max-width: 52ch; margin-inline: auto; }

.card__media {
  width: 100%;
  display: block;
  margin: 0 0 var(--space-6) 0;
  border-radius: var(--radius-sm);
}

.card__title {
  font-size: var(--text-h5);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.card__title--lg { font-size: 1.25rem; margin-bottom: var(--space-6); }

.prose p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-loose);
}
.prose p + p { margin-top: var(--space-4); }
.prose em { font-style: italic; }
.prose strong { color: var(--color-text); font-weight: 700; }
.prose hr {
  border: none;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-6) 0;
}

/* ============================================================
   PHOTO CARD (Personal / Photos tab)
   ============================================================ */
.photo-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.photo-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.photo-card__body { padding: 0.9rem 1rem; }
.photo-card__caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

/* ============================================================
   ARTICLE CARD (Woodhouse / Learnings)
   ============================================================ */
.article-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: inherit;
  padding: 0;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.article-card__img {
  width: 100%;
  display: block;
  filter: grayscale(100%);
  transition: filter 300ms var(--ease);
}
.article-card:hover .article-card__img { filter: grayscale(0%); }
.article-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card__tag {
  font-size: var(--text-tiny);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.2rem;
}
.article-card__date {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: 0.5rem;
}
.article-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.article-card__summary {
  font-size: 0.87rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: var(--space-4);
  line-height: var(--leading-loose);
}
.article-card__more {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.3px;
}

/* ============================================================
   CAREER TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: var(--color-rule);
}
.timeline__item {
  position: relative;
  margin-bottom: 28px;
}
.timeline__item:last-child { margin-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-card-bg);
  border: 2px solid var(--color-text-faint);
}
.timeline__period {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.timeline__role {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1px;
}
.timeline__company {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.timeline__desc {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  line-height: var(--leading-snug);
}

/* ============================================================
   LINKEDIN BUTTON
   ============================================================ */
.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #f0f7ff;
  border: 1px solid #c8e0f8;
  border-radius: var(--radius-md);
  color: #0A66C2;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background var(--duration-quick) var(--ease),
              box-shadow var(--duration-quick) var(--ease);
}
.linkedin:hover {
  background: #dceefb;
  box-shadow: 0 2px 8px rgba(10, 102, 194, 0.15);
  color: #0A66C2;
}

/* ============================================================
   INTEGRATIONS (Woodhouse Overview)
   ============================================================ */
.integration-list p { color: var(--color-text-muted); margin-bottom: 0.5rem; }
.integration-list p:last-child { margin-bottom: 0; }
.integration-list strong { color: var(--color-text); font-weight: 700; }
.integration-image {
  width: 100%;
  max-width: 600px;
  margin: 1rem auto;
  display: block;
}
.ai-models { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-top: var(--space-2); }
@media (min-width: 600px) { .ai-models { grid-template-columns: repeat(3, 1fr); } }
.ai-models__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 4px;
}
.ai-models__name { font-weight: 700; margin-bottom: 2px; }
.ai-models__desc { font-size: 0.85rem; color: var(--color-text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-page-bg);
  padding: 32px 24px;
  border-top: 1px solid var(--color-rule);
}
.footer__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.footer__left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-rule);
  padding-left: var(--space-6);
  padding-right: var(--space-8);
}
.footer__top {
  display: flex;
  gap: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: var(--space-6);
}
.footer__col { flex: 1; }
.footer__bottom { flex: 1; text-align: center; }
.footer__right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: var(--space-8);
  padding-right: var(--space-6);
}
.footer__graphic {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}
.footer__text {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  line-height: 2;
}
.footer__text a { color: var(--color-text-soft); }
.footer__text a:hover { color: var(--color-text); text-decoration: underline; }
.footer__fact {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--color-text-soft);
  line-height: 1.6;
}

@media (max-width: 767px) {
  .footer__layout { grid-template-columns: 1fr; }
  .footer__left {
    border-right: none;
    border-bottom: 1px solid var(--color-rule);
    padding-left: 0;
    padding-right: 0;
    padding-bottom: var(--space-6);
  }
  .footer__top {
    flex-direction: column;
    gap: 0;
    align-items: center;
    text-align: center;
  }
  .footer__col {
    border-bottom: 1px solid var(--color-rule);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    width: 100%;
    text-align: center;
  }
  .footer__col:last-child { border-bottom: none; margin-bottom: 0; }
  .footer__right {
    padding: var(--space-6) 0 0 0;
  }
}

/* ============================================================
   DIALOG (lightbox + article modal)
   ============================================================ */
/* The native <dialog> element handles top-layer stacking, focus
   management, and Escape-to-close. We reset its default chrome and
   style the ::backdrop pseudo-element for the dimmed overlay. */
dialog.lightbox,
dialog.modal {
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  margin: 0;
  inset: 0;
  overflow: visible;
}

/* ----- Lightbox ----- */
dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}
.lightbox__stage {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 80vw;
}
.lightbox__img {
  display: block;
  max-width: 80vw;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.lightbox__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 60%, transparent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  color: #fff;
  font-size: 0.88rem;
  line-height: var(--leading-snug);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.lightbox__btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 12px;
  line-height: 1;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__btn--prev { left: 20px; }
.lightbox__btn--next { right: 20px; }
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
}

/* ----- Article modal ----- */
dialog.modal[open] {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  overflow-y: auto;
}
dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.modal__dialog {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  max-width: 900px;
  width: 100%;
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.7rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
}
.modal__close:hover { color: var(--color-text); }
.modal__body { padding: var(--space-8); }
.modal__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: var(--space-6);
}
@media (min-width: 700px) {
  .modal__header { grid-template-columns: 1fr 1fr; align-items: center; }
}
.modal__img { width: 100%; display: block; border-radius: var(--radius-sm); }
.modal__tag {
  font-size: var(--text-tiny);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.4rem;
}
.modal__date { font-size: var(--text-sm); color: var(--color-text-faint); margin-bottom: var(--space-4); }
.modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}
.modal__summary {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
}
.modal__content p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: var(--space-4);
}
.modal__content p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__video { display: none; }
}
