/* ============================================
   MTR Creative — Portfolio Styles
   Font: Satoshi (Fontshare)
   ============================================ */

/* --- Fonts loaded via <link> in HTML --- */

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

/* --- Tokens --- */
:root {
  /* Colors */
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --inset: #F2F1ED;
  --text: #111111;
  --text-secondary: #6B6860;
  --text-tertiary: #A8A49E;
  --accent: #C8F45A;
  --accent-hover: #B8E050;
  --accent-text: #4A5A00;
  --accent-tint: #F4F9E4;
  --border: #E8E7E3;

  /* Typography */
  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --weight-black: 900;
  --weight-bold: 700;
  --weight-semibold: 600;
  --weight-medium: 500;
  --weight-regular: 400;

  /* Spacing */
  --space-section: 80px;
  --space-lg: 40px;
  --space-md: 32px;
  --space-sm: 24px;
  --space-xs: 16px;
  --space-xxs: 12px;
  --space-xxxs: 8px;

  /* Layout */
  --max-width: 1200px;
  --page-width: 1360px;
  --page-padding: clamp(24px, 5vw, 80px);
  --radius-card: 16px;
  --radius-pill: 100px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --duration: 200ms;
  --duration-slow: 300ms;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-weight: var(--weight-regular);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
}


a {
  color: inherit;
  text-decoration: none;
}

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

/* --- Layout --- */
.page-width {
  max-width: calc(var(--page-width) + var(--page-padding) * 2);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.content-width {
  max-width: calc(var(--max-width) + var(--page-padding) * 2);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section--border-top {
  border-top: 1px solid var(--border);
}

.section--border-bottom {
  border-bottom: 1px solid var(--border);
}

.section--inset {
  background-color: var(--inset);
}

/* --- Typography --- */
.label {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text);
}

.label--muted {
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
}

.heading-xl {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.heading-lg {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.heading-md {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.heading-sm {
  font-size: 22px;
  font-weight: var(--weight-semibold);
  line-height: 1.3;
}

.body-lg {
  font-size: 20px;
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  line-height: 1.6;
}

.body-sm {
  font-size: 16px;
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  line-height: 1.6;
}

.meta {
  font-size: 16px;
  font-weight: var(--weight-regular);
  color: var(--text-tertiary);
}

/* --- Nav --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-size: 18px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__link {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
}

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

.nav__link--active {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  border: none;
  transition: background-color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              transform 160ms var(--ease-out);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--text);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

.btn--nav {
  padding: 10px 20px;
  font-size: 16px;
}

/* --- Tags --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Hero --- */
.hero {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-top: 60px;
  padding-bottom: var(--space-section);
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 880px;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.hero__photo {
  width: 320px;
  height: 480px;
  background-color: var(--bg);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero__photo-img,
.hero__photo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-card);
}

.hero__photo-placeholder {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

/* --- Section Header --- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-header.section-header--stacked {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.section-header__link {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--duration) var(--ease);
}

.section-header__link:hover {
  color: var(--text);
}

/* --- Case Study Cards --- */
/* --- Flagship Row --- */
.work-flagship {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
}

.work-intro-card {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--accent);
  border-radius: var(--radius-card);
  padding: 32px;
  min-height: 380px;
}

.work-intro-card__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--flagship .card__image {
  aspect-ratio: 16 / 10;
  padding: 16px;
}

.card--flagship .card__title {
  font-size: 24px;
}

.card--flagship .card__description {
  font-size: 16px;
  line-height: 1.5;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 4px;

  cursor: pointer;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
  background-color: var(--inset);
  border-radius: var(--radius-card);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 24px 24px 0;
  transition: box-shadow var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.card:hover .card__image {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

.card__screenshot {
  width: 90%;
  max-height: 85%;
  background-color: var(--surface);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card__screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card__image-placeholder {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 60px 0;
}

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

.card__image--type {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.card__image--mockup {
  align-items: center;
  padding: 24px;
}

.card__mockup-img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.card__company-label {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.card__title {
  font-size: 20px;
  font-weight: var(--weight-semibold);
}

.card__description {
  font-size: 16px;
  color: var(--text-secondary);
}

.card__meta {
  font-size: 16px;
  color: var(--text-tertiary);
}

/* --- Article Cards (Homepage Preview) --- */
.article-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background-color: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease),
              transform var(--duration) var(--ease-out);
}

.article-card:hover {
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}

.article-card__meta {
  display: flex;
  gap: 12px;
  font-size: 16px;
}

.article-card__tag {
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-text);
}

.article-card__date {
  color: var(--text-tertiary);
}

.article-card__title {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

.article-card__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Playground Cards --- */
.playground-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.playground-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background-color: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease),
              transform var(--duration) var(--ease-out);
}

.playground-card:hover {
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.badge--experiment {
  background-color: var(--accent);
  color: var(--text);
}

.badge--beta {
  background-color: var(--inset);
  color: var(--text-secondary);
}

.badge--live {
  background-color: var(--accent);
  color: var(--text);
}

.playground-card__embed {
  width: 100%;
  aspect-ratio: 353 / 140;
  background-color: var(--inset);
  border-radius: 12px;
  overflow: hidden;
}

.playground-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playground-card__title {
  font-size: 16px;
  font-weight: var(--weight-semibold);
}

.playground-card__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Areas of Focus --- */
.focus-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.focus-bar__label {
  font-size: 16px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.focus-bar__dot {
  color: var(--text-tertiary);
}

.focus-bar__item {
  font-size: 16px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

/* --- About + Contact Footer --- */
.footer-split {
  display: flex;
  border-top: 1px solid var(--border);
}

.footer-about {
  flex: 1;
  padding: var(--space-section);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-about__link {
  font-weight: var(--weight-semibold);
  color: var(--accent-text);
  transition: color var(--duration) var(--ease);
}

.footer-about__link:hover {
  color: var(--text);
}

.footer-contact {
  flex: 1;
  padding: var(--space-section);
  background-color: var(--inset);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-contact__buttons {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

/* --- Contact Form --- */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
  max-width: 720px;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__group--full {
  grid-column: 1 / -1;
}

.contact-form__label {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form__input,
.contact-form__textarea {
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--weight-regular);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color var(--duration) var(--ease);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form__submit {
  justify-self: start;
}

.contact-form__success {
  display: none;
  grid-column: 1 / -1;
  padding: 16px 20px;
  background: var(--accent-tint);
  border-radius: 8px;
  font-weight: var(--weight-medium);
  color: var(--accent-text);
}

/* --- Full-Width Contact Footer --- */
.footer-contact-full {
  border-top: 1px solid var(--border);
  background-color: var(--inset);
  padding: var(--space-section) var(--page-padding);
}

.footer-contact-full .content-width {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Case Study --- */
.cs-hero {
  padding-top: 40px;
  padding-bottom: var(--space-section);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero with image variant */
.cs-hero--with-image {
  flex-direction: row;
  gap: 64px;
  align-items: flex-start;
}

.cs-hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs-hero__image {
  flex: 1;
  max-height: 480px;
  background-color: var(--inset);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cs-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .cs-hero--with-image {
    flex-direction: column;
  }
}

/* Long scroll process (no tabs) */
.process-scroll {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-scroll__step {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: var(--space-section) 0;
  border-bottom: 1px solid var(--border);
}

.process-scroll__step:last-child {
  border-bottom: none;
}

.process-scroll__label {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.process-scroll__number {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: var(--weight-bold);
  color: var(--accent-text);
}

.process-scroll__name {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: var(--weight-bold);
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Full-width image in process */
.process-scroll__full-image {
  width: 100%;
  border-radius: var(--radius-card);
  background-color: var(--inset);
  overflow: hidden;
}

.process-scroll__full-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 3-col feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.feature-grid__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-grid__image {
  background-color: var(--inset);
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 16px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-grid__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.feature-grid__title {
  font-size: 18px;
  font-weight: var(--weight-semibold);
}

.feature-grid__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.cs-hero__back {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--accent-text);
  transition: color var(--duration) var(--ease);
}

.cs-hero__back:hover {
  color: var(--text);
}

.cs-hero__title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.cs-hero__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

.cs-meta-row {
  display: flex;
  gap: 48px;
  padding-top: 12px;
  justify-content: flex-start;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-meta-item__label {
  font-size: 16px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.cs-meta-item__value {
  font-size: 16px;
  font-weight: var(--weight-medium);
}

/* --- Impact Stats --- */
.impact {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 60px var(--page-padding);
  background-color: var(--inset);
}

.impact__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.impact__number {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: var(--weight-black);
  color: var(--accent-text);
  line-height: 1;
}

.impact__label {
  font-size: 16px;
  color: var(--text-secondary);
}

/* --- Problem / Outcome (Narrative) --- */
.problem-outcome {
  display: flex;
  gap: 0;
  padding: 0;
  background-color: var(--inset);
  max-width: var(--page-width);
  margin: 0 auto;
}

.problem-outcome__block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(32px, 5vw, 60px);
}

.problem-outcome__block--darker {
  background-color: var(--border);
}

.problem-outcome__text {
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

/* --- Process --- */
.process {
  display: flex;
  gap: 60px;
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.process__sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.process__nav-label {
  font-size: 16px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.process__nav-item {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration) var(--ease);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--font);
}

.process__nav-item:hover,
.process__nav-item--active {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.process__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.process__step {
  display: none;
  flex-direction: column;
  gap: 32px;
}

.process__step--active {
  display: flex;
  animation: stepFadeIn 250ms var(--ease-out);
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.process__title {
  font-size: 28px;
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.process__image {
  width: 100%;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.process__image .process__img {
  background-color: var(--inset);
  border-radius: var(--radius-card);
}

.process__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-card);
}

/* --- Next Project Nav --- */
.next-project {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.next-project__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: opacity var(--duration) var(--ease);
}

.next-project__link:hover {
  opacity: 0.7;
}

.next-project__label {
  font-size: 13px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.next-project__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: var(--weight-bold);
}

.next-project__arrow {
  font-size: 32px;
  color: var(--text-tertiary);
}

.process__caption {
  padding: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: left;
}

/* --- Annotated Image (side-by-side) --- */
.process__step .annotated-block,
.annotated-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin: var(--space-lg) 0;
}

.annotated-block__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

.annotated-block__caption {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.annotated-block__notes {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.annotation {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.annotation__number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.annotation__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.annotation__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .annotated-block {
    grid-template-columns: 1fr;
  }
}

/* --- Research Quote --- */
.process__quote {
  padding: 40px 48px;
  background-color: var(--inset);
  border-radius: var(--radius-card);
}

.research-quote__text {
  font-size: 20px;
  font-weight: var(--weight-medium);
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
}

.research-quote__cite {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  font-weight: var(--weight-medium);
  font-style: normal;
  color: var(--text-tertiary);
}

/* --- Callout --- */
.callout-pair {
  display: flex;
  gap: 24px;
}

.callout {
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background-color: var(--accent-tint);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.callout__label {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text);
}

.callout__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.callout__list {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- Components / Learnings Grid --- */
.three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.component-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.component-card__title {
  font-size: 16px;
  font-weight: var(--weight-semibold);
}

.component-card__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.learning-card {
  padding: 24px;
  background-color: var(--accent-tint);
  border: 1px solid #D8E88A;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.learning-card__title {
  font-size: 16px;
  font-weight: var(--weight-semibold);
}

.learning-card__description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- About Page --- */
.about-hero {
  padding-top: 60px;
  padding-bottom: var(--space-section);
}

.about-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 100%;
}

.about-hero__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xs);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline__block {
  display: flex;
  gap: 64px;
}

.timeline__period {
  width: 160px;
  flex-shrink: 0;
  padding-top: 4px;
}

.timeline__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline__roles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline__role {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.education-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

/* --- Articles Page --- */
.articles-header {
  padding: var(--space-section);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.articles-header__title {
  font-size: clamp(40px, 5vw, 58px);
  font-weight: var(--weight-black);
}

.articles-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-pills {
  display: flex;
  gap: 8px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  background: var(--surface);
  color: var(--text-secondary);
  transition: background-color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

.filter-pill:hover {
  border-color: var(--text-tertiary);
}

.filter-pill--active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.search-input {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 16px;
  width: 220px;
  outline: none;
  background: var(--surface);
  transition: border-color var(--duration) var(--ease);
}

.search-input:focus {
  border-color: var(--text-tertiary);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* --- Article List Rows --- */
.article-list {
  padding: 0 var(--space-section);
}

.article-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--duration) var(--ease-out);
}

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

.article-row:hover {
  transform: translateX(4px);
}

.article-row:hover .article-row__title {
  color: var(--accent-text);
}

.article-row__title {
  transition: color var(--duration) var(--ease);
}

.article-row__meta {
  display: flex;
  gap: 16px;
  font-size: 16px;
}

.article-row__tag {
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-text);
}

.article-row__time {
  color: var(--text-tertiary);
}

.article-row__title {
  font-size: 18px;
  font-weight: var(--weight-semibold);
}

.article-row__description {
  font-size: 16px;
  color: var(--text-secondary);
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

/* --- Mobile Nav --- */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 250ms var(--ease-out), opacity 250ms var(--ease-out);
}

.nav-open .nav__toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav__toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stagger Children --- */
.fade-up .card,
.fade-up .article-card,
.fade-up .playground-card,
.fade-up .component-card,
.fade-up .learning-card {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease-out, transform 0.4s var(--ease-out);
}

.fade-up.visible .card,
.fade-up.visible .article-card,
.fade-up.visible .playground-card,
.fade-up.visible .component-card,
.fade-up.visible .learning-card {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.visible > * > *:nth-child(1),
.fade-up.visible .cards-grid > :nth-child(1),
.fade-up.visible .three-grid > :nth-child(1) { transition-delay: 0ms; }
.fade-up.visible > * > *:nth-child(2),
.fade-up.visible .cards-grid > :nth-child(2),
.fade-up.visible .three-grid > :nth-child(2) { transition-delay: 60ms; }
.fade-up.visible > * > *:nth-child(3),
.fade-up.visible .cards-grid > :nth-child(3),
.fade-up.visible .three-grid > :nth-child(3) { transition-delay: 120ms; }
.fade-up.visible > * > *:nth-child(4),
.fade-up.visible .cards-grid > :nth-child(4),
.fade-up.visible .three-grid > :nth-child(4) { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    transform: none;
    transition: opacity 0.3s ease-out;
  }
  .card, .article-card, .playground-card, .article-row {
    transition: none;
  }
  .card:hover, .article-card:hover, .playground-card:hover, .article-row:hover {
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  :root {
    --space-section: 48px;
  }

  .hero {
    position: relative;
    flex-direction: column;
  }

  .hero__photo {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    max-width: none;
    height: auto;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    margin: 0;
  }

  .hero__photo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .hero__content {
    position: relative;
    z-index: 1;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .nav-open .nav__links {
    display: flex;
    animation: navFadeIn 300ms var(--ease-out);
  }

  .nav-open .nav__links li {
    opacity: 0;
    animation: navItemIn 300ms var(--ease-out) forwards;
  }
  .nav-open .nav__links li:nth-child(1) { animation-delay: 50ms; }
  .nav-open .nav__links li:nth-child(2) { animation-delay: 100ms; }
  .nav-open .nav__links li:nth-child(3) { animation-delay: 150ms; }
  .nav-open .nav__links li:nth-child(4) { animation-delay: 200ms; }
  .nav-open .nav__links li:nth-child(5) { animation-delay: 250ms; }

  @keyframes navFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes navItemIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav__links .nav__link,
  .nav__links .btn--nav {
    font-size: 24px;
  }

  /* Swap video for PNG on tablet */
  .hero__photo-video {
    display: none;
  }

  .hero__photo {
    width: 50%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
  }

  .hero__photo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .work-flagship {
    flex-direction: column;
  }

  .work-intro-card {
    flex: none;
    min-height: auto;
    padding: 24px;
    gap: 16px;
  }

  .card--flagship .card__image {
    aspect-ratio: 16 / 10;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .article-preview-grid,
  .playground-grid,
  .three-grid {
    grid-template-columns: 1fr;
  }

  .process {
    flex-direction: column;
  }

  .process__sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .about-hero__content {
    max-width: 100%;
  }

  .about-hero__columns {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .timeline__block {
    flex-direction: column;
    gap: 16px;
  }

  .timeline__period {
    width: auto;
  }

  .education-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-split {
    flex-direction: column;
  }

  .problem-outcome {
    flex-direction: column;
    gap: 0;
  }

  .impact {
    gap: 40px;
  }

  .focus-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }

  .cs-meta-row {
    flex-wrap: wrap;
    gap: 24px;
  }

  .cs-hero--with-image {
    flex-direction: column;
  }

  .cs-hero__image {
    max-height: 360px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-section: 24px;
  }

  body {
    overflow-x: hidden;
  }

  .heading-xl {
    font-size: 36px;
  }

  .hero__ctas {
    flex-wrap: wrap;
  }

  /* Hide illustration on mobile */
  .hero__photo {
    display: none;
  }

  .cards-grid {
    gap: 32px;
  }

  .impact {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .articles-filters {
    flex-direction: column;
    gap: 12px;
  }

  .filter-pills {
    flex-wrap: wrap;
  }

  /* Focus bar — vertical stack on mobile */
  .focus-bar {
    flex-direction: column;
    gap: 8px;
    padding: var(--space-md) var(--page-padding);
  }

  .focus-bar__dot {
    display: none;
  }

  .focus-bar__label {
    margin-bottom: 4px;
  }

  /* Featured Work header — stack vertically */
  .section-header {
    flex-direction: column;
    gap: 4px;
  }

  /* Callout cards — single column on mobile */
  .callout-pair,
  .process__content > div[style*="display: flex"][style*="gap: 24px"] {
    flex-direction: column !important;
  }

  /* Next project — full width */
  .next-project {
    margin-left: calc(-1 * var(--page-padding));
    margin-right: calc(-1 * var(--page-padding));
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }

  /* Footer contact — full width */
  .footer-contact-full {
    margin-left: calc(-1 * var(--page-padding));
    margin-right: calc(-1 * var(--page-padding));
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }

  /* Annotated blocks — stack on mobile */
  .annotated-block {
    flex-direction: column !important;
  }

  .annotated-block__image,
  .annotated-block__text {
    width: 100% !important;
    flex: none !important;
  }

  /* Education grid — single column */
  .education-grid {
    grid-template-columns: 1fr;
  }

  /* Case study hero image */
  .cs-hero__image {
    max-height: 280px;
  }
}
