/* Custom fonts */
@font-face {
  font-family: "FT Regola Neue";
  src: url("fonts/FTRegolaNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FT Regola Neue";
  src: url("fonts/FTRegolaNeue-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FT Regola Neue";
  src: url("fonts/FTRegolaNeue-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FT Regola Neue";
  src: url("fonts/FTRegolaNeue-RegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --panel: #050505;
  --text: #111111;
  --muted: #6a6a66;
  --line: rgba(255, 255, 255, 0.18);
  --line-dark: rgba(0, 0, 0, 0.18);
  --white: #ffffff;
  --accent: #c77b2a;
  --link: #187fa3;
  --accent-soft: transparent;
  --max: 1180px;
  --radius: 0px;
  --space: clamp(20px, 3vw, 36px);
  --space-lg: clamp(56px, 8vw, 120px);
  --space-xl: clamp(88px, 12vw, 170px);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
button,
summary {
  font: inherit;
}

.container {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

/* Lightbox modal styles */
#lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

#lightbox-modal.active {
  display: flex;
}

#lightbox-modal img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  max-width: 1600px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

#lightbox-modal .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
h1,
h2,
h3,
.eyebrow,
.accordion-label,
.project-title,
.cta,
.cv-label,
.footer-mark,
.kicker {
  font-family: "FT Regola Neue", Inter, sans-serif;
  letter-spacing: -0.015em;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--link);
  text-decoration: none;
}

.brand {
  color: var(--text);
}

.nav-links a:hover,
.project-meta a:hover,
.cv-item a:hover {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv-item a:hover {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero {
  padding: clamp(40px, 6vw, 80px) 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
}

.eyebrow {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 10ch;
}

.hero-copy {
  font-size: 14px;
  line-height: 1.6;
  max-width: 38rem;
  margin: 24px 0 0;
}

.hero-side {
  border-top: 1px solid var(--line-dark);
  padding-top: 18px;
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-size: 0.96rem;
}

.dark-section {
  background: var(--panel);
  color: var(--white);
  padding: var(--space-lg) 0;
}

.dark-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: start;
}

.section-label,
.kicker {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 9ch;
}

.section-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.04rem;
  line-height: 1.5;
  max-width: 34rem;
}

.accordion-list {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.accordion-trigger::-webkit-details-marker,
.accordion-trigger::marker {
  display: none;
}

.accordion-label {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.accordion-plus {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
  color: var(--accent);
}

.accordion-item[open] .accordion-plus {
  transform: rotate(45deg);
}

.accordion-content {
  max-width: 46rem;
  padding: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.work,
.projects,
.ai-section,
.cv-section {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 96px 0;
  margin-top: 96px;
}

.section-head {
  margin-bottom: 120px;
  margin-top: 0;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.feature-image {
  display: none;
}

.case-study-media {
  aspect-ratio: 16 / 9;
  background: transparent;
  border: none;
  padding: 0;
  min-height: 0;
  position: relative;
  overflow: visible;
  display: block;
}

.case-study-placeholder {
  width: 100%;
  max-width: none;
  display: block;
  text-align: center;
}

.case-study-placeholder-mark {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  padding: 20px; /* set to 0 if you want the border flush with the image */
  box-sizing: border-box;
  display: block;
  overflow: hidden;
}

.case-study-placeholder-mark img,
.case-study-placeholder-mark svg {
  width: 100%;
  height: auto; /* preserve entire image vertically */
  object-fit: contain; /* no cropping; use 'cover' only if you want cropping */
  display: block;
}

.case-study-placeholder-note {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.footnote-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #666;
  max-width: 22rem;
}

.ai-placeholder {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(0, 0, 0, 0.14);
  min-height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #f7f7f7;
}

.ai-placeholder {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(0, 0, 0, 0.14);
  min-height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(
      circle at 0% 100%,
      rgba(0, 0, 0, 0.16) 0 1.5px,
      transparent 2px
    ),
    linear-gradient(135deg, rgba(0, 0, 0, 0.08), transparent 42%), #f7f7f7;
  background-size:
    28px 28px,
    auto,
    auto;
}

.tool-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 420px;
  align-items: center;
}

.tool-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: 92px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.055);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tool-logo img {
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
  opacity: 0.9;
}

.tool-logo--openweather img {
  max-height: 46px;
}

.tool-logo--figma img {
  max-height: 52px;
  max-width: 150px;
  transform: scale(1.25);
}

.ai-work-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.ai-experiments {
  margin-top: 24px;

  padding-top: 56px;
}

.ai-experiments-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 36px;
}

.ai-experiments-head h3 {
  margin: 0;
  max-width: none;
  white-space: nowrap;
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

@media (max-width: 640px) {
  .ai-experiments-head h3 {
    white-space: normal;
  }
}

.ai-experiment-grid {
  display: grid;
  gap: 24px;
}

.ai-experiment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 36px;
  padding: 28px 0;
  border-top: 1px solid var(--line-dark);
  align-items: start;
}

.ai-experiment-status {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-experiment-card h4 {
  margin: 0 0 10px;
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.ai-experiment-card p {
  margin: 0;
  max-width: 42rem;
  color: #444;
  line-height: 1.55;
}

.ai-experiment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ai-experiment-tags span {
  border: 1px solid var(--line-dark);
  padding: 6px 9px;
  color: #444;
  font-size: 0.82rem;
  line-height: 1;
}

.ai-experiment-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--link);
  background: #f7f7f7;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.ai-experiment-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 980px) {
  .ai-experiments {
    margin-top: 64px;
    padding-top: 40px;
  }

  .ai-experiments-head,
  .ai-experiment-card {
    grid-template-columns: 1fr;
  }

  .ai-experiment-card {
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .ai-experiments {
    margin-top: 48px;
    padding-top: 32px;
  }

  .ai-experiments,
  .ai-experiment-grid,
  .ai-experiment-card {
    min-width: 0;
  }

  .ai-experiments-head {
    gap: 14px;
    margin-bottom: 24px;
  }

  .ai-experiment-grid {
    gap: 20px;
  }

  .ai-experiment-card {
    padding: 22px 0;
    gap: 16px;
  }

  .ai-experiment-card > div {
    min-width: 0;
  }

  .ai-experiment-card h4 {
    font-size: clamp(1.2rem, 6vw, 1.55rem);
    overflow-wrap: anywhere;
  }

  .ai-experiment-card p {
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }

  .ai-experiment-tags {
    gap: 6px;
    margin-top: 14px;
    max-width: 100%;
  }

  .ai-experiment-tags span {
    padding: 5px 8px;
    font-size: 0.75rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .ai-experiment-media {
    aspect-ratio: 4 / 3;
  }

  .build-activity .github-activity-card {
    overflow-x: hidden;
    max-width: 100%;
  }

  .build-activity .github-activity-card img {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
  }
}

.feature-grid,
.ai-grid,
.muted-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px 36px;
  align-items: start;
  .ai-work-block {
    grid-template-columns: 1fr;
  }
}

.mini-image {
  display: none;
}

.lead-text,
.muted-title {
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin: 0 0 16px;
}

.case-study-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  color: var(--link);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
}

.case-study-link:hover {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arrow-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  border: 4px solid transparent;
  transition: border-color 0.45s ease;
  flex: 0 0 auto;
}

.case-study-link:hover .arrow-mark {
  background: var(--accent);
  border-color: var(--link);
}

.arrow-mark svg {
  width: 28px;
  height: 28px;
  display: block;
}

.subcopy,
.ai-copy,
.note {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  max-width: 44rem;
}

.project-table {
  border-top: 1px solid var(--line-dark);
  width: 100%;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: baseline;
}

.project-row.featured {
  background: transparent;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: "FT Regola Neue", Inter, sans-serif;
}

.project-desc {
  color: #444;
  line-height: 1.5;
  font-size: 14px;
  text-align: left;
  justify-self: start;
}

.project-meta {
  color: #444;
  line-height: 1.5;
  font-size: 14px;
  justify-self: end;
  text-align: right;
}

.ai-section {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ai-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ai-card {
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  padding-top: 14px;
}

.ai-card h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.cv-section {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cv-table {
  width: 100%;
  margin-top: 32px;
}

.cv-bucket + .cv-bucket {
  margin-top: 28px;
}

.cv-bucket-label {
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111;
  margin: 0 0 10px;
}

.cv-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: start;
}

.cv-role {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: "FT Regola Neue", Inter, sans-serif;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cv-logo-link,
.cv-logo-wrap {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

.cv-role-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-role-text {
  color: #111;
}

.cv-logo-link .cv-role-text {
  color: var(--link);
}

.cv-logo-link:hover .cv-role-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv-logo {
  display: block;
  max-width: 180px;
  max-height: 34px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cv-logo-link:hover {
  text-decoration: none;
}

.cv-copy {
  color: #444;
  line-height: 1.5;
  font-size: 14px;
}

.cv-meta {
  color: #444;
  line-height: 1.5;
  font-size: 14px;
  justify-self: end;
  text-align: right;
}

.acquired-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: middle;
  position: relative;
  cursor: default;
}

.acquired-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.acquired-badge:hover::after {
  opacity: 1;
}

.quote-section {
  background: var(--panel);
  color: var(--white);
  padding: 64px 0;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

blockquote {
  margin: 0;
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 21ch;
}

blockquote em {
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  opacity: 0.82;
}

.footer-mark {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (max-width: 980px) {
  .hero-grid,
  .dark-grid,
  .feature-grid,
  .muted-block,
  .quote-grid,
  .ai-grid {
    grid-template-columns: 1fr;
  }

  .cv-row,
  .project-row {
    grid-template-columns: 1fr;
  }

  .nav {
    padding: 14px 0;
    align-items: start;
    flex-direction: column;
  }

  .nav-links {
    gap: 14px 18px;
  }
  .feature-image {
    aspect-ratio: 16 / 9;
  }
}

.case-study-placeholder--aloft .case-study-placeholder-mark {
  display: inline-block;
  aspect-ratio: auto; /* remove forced 16:9 */
  padding: 0;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  background: transparent;
  box-sizing: border-box;
  max-width: 100%;
}

.case-study-placeholder--aloft .case-study-placeholder-mark img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0;
}

.case-study-media--aloft {
  aspect-ratio: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.project-table--no-top {
  border-top: none;
  padding-top: 0;
}

/* Design Technology Fluency module */
.tf-module {
  background: #ffffff;
}

.tf-container {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.tf-module button,
.tf-module a {
  font: inherit;
}

.tf-kicker,
.tf-module h2,
.tf-module h3,
.tf-module h4,
.tf-tab,
.tf-stat span,
.tf-table th,
.tf-map-badge {
  font-family: "FT Regola Neue", Inter, sans-serif;
  letter-spacing: -0.015em;
}

.tf-kicker {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tf-module h2,
.tf-module h3,
.tf-module h4,
.tf-module p {
  margin-top: 0;
}

.tf-module-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 56px;
}

.tf-module h2 {
  margin-bottom: 0;
  max-width: 12ch;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.tf-view-switch {
  display: inline-flex;
  border: 1px solid var(--line-dark);
  padding: 4px;
  min-width: 198px;
}

.tf-view-btn {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.tf-view-btn.is-active {
  background: var(--panel);
  color: #fff;
}

.tf-tab-scroll {
  position: relative;
  overflow: hidden;
}

.tf-tabs {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.tf-tabs::-webkit-scrollbar {
  display: none;
}

.tf-tab {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line-dark);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
}

.tf-tab:first-child {
  border-left: 1px solid var(--line-dark);
}

.ai-experiment-card.build-activity {
  grid-column: 1 / -1;
  display: block;
}

.build-activity .github-activity-card {
  margin-top: 22px;
  overflow-x: auto;
  background: transparent;
  border: 0;
}

.build-activity .github-activity-card img {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.build-activity p {
  max-width: 820px;
}

.tf-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  opacity: 0.88;
}

.tf-tab:hover,
.tf-tab.is-active {
  background: var(--panel);
  color: #fff;
}

.tf-tab:hover .tf-tab-count {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.04);
}

.tf-tab.is-active .tf-tab-count,
.tf-tab.is-active:hover .tf-tab-count,
.tf-tab-count.is-active-count {
  border: 0 !important;
  outline: 0 !important;
  background: var(--accent) !important;
  background-color: var(--accent) !important;
  color: #fff !important;
  box-shadow: none !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  opacity: 1 !important;
}

.tf-tab:focus-visible,
.tf-view-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

/* .tf-panel {
  margin-top: 42px;
} */

.tf-panel-intro {
  margin: 32px 0px 12px 0px !important;
  width: 100%;
  max-width: none;
  color: var(--text);
  font-family: "FT Regola Neue", Inter, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.is-hidden {
  display: none !important;
}

.tf-table-wrap {
  overflow-x: auto;
}

.tf-table {
  width: 100%;
  border-collapse: collapse;
}

.tf-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tf-table th,
.tf-table td {
  border-bottom: 1px solid var(--line-dark);
  padding: 19px 0;
  text-align: left;
  vertical-align: top;
}

.tf-table thead th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-table tbody th {
  width: 24%;
  min-width: 180px;
  padding-right: 28px;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 800;
}

.tf-table tbody td:nth-child(2) {
  width: 54%;
  color: #3f3f3b;
  padding-right: 28px;
}

.tf-rating-cell {
  width: 22%;
  white-space: nowrap;
}

.tf-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--accent);
  font-size: 1.08rem;
  line-height: 1;
  cursor: help;
}

.tf-star-empty {
  color: rgba(0, 0, 0, 0.18);
}

.tf-map-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.tf-map-summary {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.tf-stat {
  border-top: 1px solid var(--line-dark);
  padding-top: 16px;
}

.tf-stat span {
  display: block;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.tf-stat p,
.tf-map-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.tf-map-note {
  border-top: 1px solid var(--line-dark);
  padding-top: 18px;
  line-height: 1.55;
}

.tf-map-canvas {
  background: var(--panel);
  color: #fff;
  padding: clamp(24px, 4vw, 46px);
  min-height: 620px;
}

.tf-map-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.tf-map-title-row h3 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.tf-map-title-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  max-width: 42rem;
}

.tf-map-badge {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.tf-skill-bars {
  display: grid;
}

.tf-skill-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) minmax(
      140px,
      0.6fr
    );
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.tf-skill-card-head {
  display: grid;
  gap: 8px;
}

.tf-skill-card h4 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.1;
}

.tf-skill-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.tf-bar {
  margin-top: 7px;
  width: 100%;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.tf-bar span {
  display: block;
  height: 100%;
  background: #fff;
}

.tf-map-canvas .tf-star-empty {
  color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 980px) {
  .tf-module-head,
  .tf-map-layout {
    grid-template-columns: 1fr;
  }

  .tf-module-head {
    align-items: start;
  }

  .tf-view-switch {
    width: 100%;
  }

  .tf-map-summary {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }

  .tf-map-note {
    grid-column: 1 / -1;
  }

  .tf-skill-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .tf-container {
    width: min(calc(100% - 32px), var(--max));
  }

  .tf-table,
  .tf-table tbody,
  .tf-table tr,
  .tf-table th,
  .tf-table td {
    display: block;
    width: 100%;
  }

  .tf-table thead {
    display: none;
  }

  .tf-table tbody tr {
    border-bottom: 1px solid var(--line-dark);
    padding: 18px 0;
  }

  .tf-table th,
  .tf-table td {
    border-bottom: 0;
    padding: 0;
  }

  .tf-table tbody th,
  .tf-table tbody td:nth-child(2) {
    padding-right: 0;
  }

  .tf-table tbody td:nth-child(2) {
    margin-top: 6px;
  }

  .tf-rating-cell {
    margin-top: 14px;
  }

  .tf-map-summary {
    grid-template-columns: 1fr;
  }

  .tf-map-canvas {
    min-height: 0;
  }

  .tf-map-title-row {
    grid-template-columns: 1fr;
  }
}
/* Mobile responsiveness cleanup — 2026-06-19 */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

main,
section,
.container,
.tf-container,
.feature-grid,
.ai-work-block,
.cv-table,
.project-table,
.ai-placeholder,
.tool-logo-grid {
  max-width: 100%;
}

.feature-grid > *,
.ai-work-block > *,
.project-row > *,
.cv-row > *,
.tf-module-head > *,
.tf-map-layout > *,
.tf-skill-card > * {
  min-width: 0;
}

.case-study-link {
  max-width: 100%;
}

.case-study-link span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .work,
  .projects,
  .ai-section,
  .cv-section {
    padding: clamp(56px, 11vw, 76px) 0;
    margin-top: clamp(48px, 9vw, 72px);
  }

  .section-head {
    margin-bottom: clamp(40px, 8vw, 64px);
  }

  .hero {
    padding: clamp(64px, 12vw, 96px) 0 48px;
  }

  .hero-grid,
  .dark-grid,
  .feature-grid,
  .muted-block,
  .quote-grid,
  .ai-grid,
  .ai-work-block {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .ai-work-block {
    gap: 28px;
  }

  .lead-text,
  .muted-title {
    max-width: none;
  }

  .project-meta,
  .cv-meta {
    justify-self: start;
    text-align: left;
  }

  .ai-placeholder {
    width: 100%;
    min-height: 0;
    padding: clamp(18px, 5vw, 32px);
  }

  .tool-logo-grid {
    width: 100%;
    max-width: none;
    gap: clamp(14px, 4vw, 24px);
  }

  .tool-logo {
    min-height: 76px;
    padding: 14px;
  }

  .tf-module-head {
    margin-bottom: 36px;
  }

  .tf-panel-intro {
    margin-top: 26px !important;
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
}

@media (max-width: 720px) {
  .container,
  .tf-container {
    width: min(calc(100% - 32px), var(--max));
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  h2,
  .tf-module h2 {
    font-size: clamp(2.15rem, 11vw, 3.2rem);
  }

  .dark-section {
    padding: 64px 0;
  }

  .section-copy {
    max-width: none;
  }

  .case-study-placeholder-mark {
    padding: 12px;
  }

  .project-row,
  .cv-row {
    gap: 8px;
  }

  .subcopy,
  .ai-copy,
  .note {
    max-width: none;
  }

  .tool-logo-grid {
    grid-template-columns: 1fr;
  }

  .tool-logo img {
    max-height: 30px;
  }

  .tf-tab {
    padding: 16px 18px;
  }

  .tf-table-wrap {
    overflow-x: visible;
  }

  .tf-map-canvas {
    padding: 22px;
  }

  .tf-map-title-row {
    gap: 12px;
  }

  .tf-map-badge {
    width: fit-content;
  }

  .quote-grid {
    gap: 32px;
  }

  .footer-mark {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 10px;
  }

  .nav-links {
    row-gap: 8px;
  }

  .work,
  .projects,
  .ai-section,
  .cv-section {
    padding: 52px 0;
    margin-top: 48px;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .lead-text,
  .muted-title {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .tf-module-head {
    gap: 18px;
  }

  .tf-view-switch {
    min-width: 0;
  }

  .tf-panel-intro {
    line-height: 1.12;
  }

  .tf-table tbody tr {
    padding: 16px 0;
  }
}

/* Final mobile overflow containment + AI graphic fix */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

body {
  position: relative;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.site-header,
main,
section,
.container,
.tf-container {
  max-width: 100%;
}

@media (max-width: 980px) {
  .ai-work-block {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .ai-work-block > div,
  .feature-grid > div,
  .muted-block > div,
  .quote-grid > div,
  .dark-grid > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ai-placeholder {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }

  .tool-logo-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tool-logo {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .tool-logo img,
  .tool-logo svg {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .case-study-link {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .ai-placeholder {
    padding: 16px !important;
  }

  .tool-logo-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .tool-logo {
    min-height: 68px !important;
    padding: 12px !important;
  }

  .tool-logo img,
  .tool-logo svg {
    max-height: 28px !important;
  }

  .case-study-link {
    align-items: flex-start;
  }
}
