/* Design tokens defined in theme.css */

/* ===== GLOBAL RESET & TYPOGRAPHY ===== */
html {
  scroll-behavior: smooth;
}

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

::selection {
  background: var(--bg-selection);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

p, li, dt, dd, dl, address, label, small, pre, code {
  line-height: 1.8;
}

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

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 27px 36px;
  position: relative;
  z-index: 10;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  color: var(--text-bold);
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.active::after {
  width: 100%;
}

nav > a {
  transition: font-size 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  white-space: nowrap;
}

/* ===== SEARCH ===== */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  top: -1px;
  flex-shrink: 0;
}

.search-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  transition: stroke 0.25s ease;
}

.search-icon:hover svg {
  stroke: var(--accent);
}

.search-input {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  border: none;
  border-bottom: 1.5px solid var(--accent);
  outline: none;
  background: transparent;
  padding: 2px 0;
  width: 0;
  opacity: 0;
  transition: width 0.35s ease, opacity 0.35s ease;
}

.search-input::placeholder {
  color: var(--text-faint);
  font-weight: 300;
}

.search-wrap.open .search-input {
  width: 360px;
  opacity: 1;
}

nav.search-active > a {
  font-size: 0;
  opacity: 0;
  width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  gap: 0;
  transition: all 0.3s ease;
}

.search-close {
  display: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1;
}

.search-wrap.open .search-close {
  display: block;
}

.search-wrap.open .search-icon {
  display: none;
}

/* ===== BREADCRUMB ===== */
.logo-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breadcrumb {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--text-faint);
  font-size: 12px;
}

.breadcrumb .current {
  color: var(--text-secondary);
}

/* ===== NAV SOCIAL LINKS ===== */
nav .nav-social {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 0;
  padding-left: 28px;
  border-left: 1px solid var(--border-strong);
}

nav .nav-social a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  transition: color 0.3s;
  border-bottom: none !important;
  position: relative;
}

nav .nav-social a::after {
  display: none;
}

nav .nav-social a.social-substack:hover { color: var(--social-substack); }
nav .nav-social a.social-linkedin:hover { color: var(--social-linkedin); }
nav .nav-social a.social-github:hover { color: var(--social-github); }
nav .nav-social a.social-email:hover { color: var(--accent); }

nav .nav-social a .social-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

nav .nav-social a .social-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid var(--text);
}

nav .nav-social a:hover .social-tooltip {
  opacity: 1;
}

nav .nav-social svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  position: relative;
  top: 1px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  padding-left: 28px;
  border-left: 1px solid var(--border-strong);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.25s ease;
}

.theme-toggle svg.active {
  stroke: var(--text);
}

.theme-toggle svg:not(.active):hover {
  stroke: var(--accent);
}

.theme-switch {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--border-strong);
  border-radius: 9px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.theme-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border-radius: 50%;
  transition: transform 0.3s;
}

[data-theme="dark"] .theme-switch {
  background: var(--text);
}

[data-theme="dark"] .theme-switch::after {
  transform: translateX(14px);
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 20px;
}

.section-label {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 36px;
}

/* ===== FOOTER ===== */
footer {
  margin-top: auto;
  padding: 27px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

footer .copyright {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
}

footer .social {
  display: flex;
  gap: 0;
  align-items: center;
  margin-right: 50px;
}

footer .social a {
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 0 12px;
  transition: color 0.3s;
}

footer .social a.social-substack:hover { color: var(--social-substack); }
footer .social a.social-substack:hover svg { fill: var(--social-substack); }
footer .social a.social-linkedin:hover { color: var(--social-linkedin); }
footer .social a.social-linkedin:hover svg { fill: var(--social-linkedin); }
footer .social a.social-github:hover { color: var(--social-github); }
footer .social a.social-github:hover svg { fill: var(--social-github); }
footer .social a.social-email:hover { color: var(--accent); }
footer .social a.social-email:hover svg { stroke: var(--accent); }

footer .social a:last-child {
  padding-right: 0;
}

footer .social svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
  transition: fill 0.3s;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 36px;
  width: 2em;
  height: 2em;
  line-height: 2em;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  border-radius: 10px;
  font-size: 16px;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--shadow-overlay);
  z-index: 150;
}

.mobile-menu-backdrop.open {
  display: block;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: var(--bg);
  z-index: 160;
  padding: 80px 36px 36px;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu-overlay.open {
  right: 0;
}

.mobile-menu-overlay a {
  display: block;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-overlay a:hover {
  color: var(--accent);
}

.mobile-menu-overlay .mobile-social {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu-overlay .mobile-social a {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: none;
  padding: 10px 0;
}

.mobile-menu-overlay .mobile-social a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ===== RESPONSIVE: SMALL DESKTOP ===== */
@media (max-width: 1439px) {
  header {
    padding: 24px 28px;
  }

  footer {
    padding: 24px 28px;
  }
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1023px) {
  nav .nav-social {
    display: none;
  }

  .search-wrap {
    display: none;
  }

  nav {
    gap: 22px;
  }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  /* Hide nav links / social / search at mobile — users reach them via
     the hamburger overlay. The theme toggle (inside `.theme-toggle-wrap`)
     stays visible so mobile users still have a way to switch theme. */
  header nav > a,
  header nav > .nav-social,
  header nav > .search-wrap {
    display: none;
  }

  header {
    padding: 18px 20px;
  }

  .logo {
    font-size: 20px;
  }

  .section-label {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 12px;
    margin-bottom: 16px;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 20px;
  }

  .scroll-top {
    bottom: 20px;
    right: 16px;
  }
}

/* ========================================
   PAGE: HOME (index.html)
   ======================================== */

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  height: 580px;
  position: relative;
  padding-left: 0;
  padding-right: 0;
  background-color: var(--bg);
  background-image: url('assets/2019/01/rahul_sketch-1.jpg');
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: contain;
}


.hero-content {
  display: flex;
  flex: 1;
  margin-left: 0;
  gap: 0;
  position: relative;
  z-index: 2;
}

.page-home .hero-text {
  position: relative;
  flex: 1;
  padding: 36px 20% 36px calc(325px * 0.65 + 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-home .hero-text > div {
  max-width: 100%;
}

.hero-writing {
  width: 35%;
  flex-shrink: 0;
  padding: 28px 36px;
  display: block;
  overflow-y: auto;
}

.hero-writing-post {
  display: block;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.hero-writing-post .writing-post-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  transition: transform 0.25s ease;
}

.hero-writing-post.last {
  border-bottom: none;
  padding-bottom: 0;
}

.hero-writing-post:hover .writing-post-inner {
  transform: translateX(-18px);
}

/* Option A: Faint right-aligned arrow that appears on hover (Writing section) */
.hero-writing-more {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  transition: color 0.3s ease;
}

.hero-writing-more:hover {
  color: var(--accent);
}

.hero-writing .section-title {
  margin-top: 0;
}

/* Sidebar project cards (homepage) */
.page-home .project-card {
  display: block;
  background: var(--bg-subtle);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.page-home .project-card:last-of-type { margin-bottom: 0; }

.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 1px 4px var(--shadow-card);
  border-color: var(--border);
}

.project-card-top {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.project-card-title {
  font-family: var(--font-logo);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bold);
  line-height: 1.15;
}

.proj-type-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.project-card p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Option C: Subtle right-aligned link (Projects sidebar) */
.sidebar-cta {
  margin-top: 1rem;
  text-align: right;
}

.sidebar-cta a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  transition: color 0.3s;
}

.sidebar-cta a:hover { color: var(--accent); }

.hero-writing-more .arrow {
  font-size: 18px;
  line-height: 1;
}

.hero-writing-post .writing-post-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-writing-post .writing-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-writing-post .writing-post-info {
  flex: 1;
  min-width: 0;
}

.hero-writing-post .writing-post-info h5 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.hero-writing-post .writing-post-info .writing-post-excerpt {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-writing-post .writing-post-info .writing-post-date {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-home .hero-text h1 {
  font-family: var(--font-body);
  font-size: 35px;
  font-weight: 700;
  color: var(--text-bold);
  margin-bottom: 18px;
  line-height: 1;
}

.page-home .hero-text h1 span.hi {
  color: var(--accent);
  font-weight: 700;
}

.page-home .hero-text .subtitle {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.page-home .hero-text .subtitle a {
  color: var(--text);
  border-bottom: 1.5px solid var(--text-bold);
  transition: border-color 0.3s;
}

.page-home .hero-text .subtitle a:hover {
  border-bottom-color: var(--accent);
}

/* Hero more link */
.page-home .hero-text .more-link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  transition: color 0.3s;
}

.page-home .hero-text .more-link:hover {
  color: var(--accent);
}

.page-home .hero-text .more-link .arrow {
  font-size: 18px;
  line-height: 1;
}

/* ===== RECENT WORK SECTION ===== */
.recent-work {
  background: transparent;
  border: none;
  padding: 0;
}

.work-content {
  display: flex;
}

.page-home .work-main {
  width: 72%;
  flex-shrink: 0;
  padding: 50px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
  background: var(--bg-elevated);
}

.page-home .work-sidebar {
  width: 28%;
  flex-shrink: 0;
  padding: 36px;
  margin-top: 30px;
  border-top: 1px solid var(--border);
  position: relative;
}

/* Portfolio grid */
.portfolio-row {
  display: flex;
  gap: 36px;
  margin-bottom: 36px;
}

.portfolio-row:last-child {
  margin-bottom: 0;
}

.portfolio-item {
  flex: 1;
  background: var(--bg);
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.portfolio-item .thumb {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding-top: 50%;
}

.portfolio-item .thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Portfolio hover: scale + shadow */
.portfolio-item {
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.portfolio-item:hover {
  transform: scale(1.03);
  box-shadow: 0 1px 4px var(--shadow-card);
}

.portfolio-item .info {
  padding: 36px;
}

.portfolio-item .info h3 {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0;
  margin-bottom: 5px;
  line-height: 1.4;
}

.portfolio-item .info p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* (sidebar writing styles removed — replaced by project cards) */

/* ===== WORK INDEX PAGE ===== */
.page-work-index .work-listing {
  /* width: 100% keeps the container stable regardless of child count —
     without it, an empty-DB render collapses the box to its children's
     intrinsic width and bounds parity vs. reference/work.html fails. */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 50px;
  box-sizing: border-box;
}

/* Hero sketch for tablet/mobile (hidden on desktop) */
.hero-sketch-mobile {
  display: none;
}

.hero-sketch-cell {
  display: contents;
}

/* ===== HOME RESPONSIVE: SMALL DESKTOP ===== */
@media (max-width: 1439px) {
  .hero {
    height: 480px;
  }

  .page-home .hero-text {
    padding: 32px 8% 32px calc(200px * 0.65 + 28px);
  }

  .page-home .hero-text h1 {
    font-size: 30px;
  }

  .page-home .hero-text .subtitle {
    font-size: 17px;
    margin-bottom: 20px;
  }

  .hero-writing {
    padding: 24px 28px;
  }

  .hero-writing-post .writing-post-thumb {
    width: 80px;
    height: 80px;
  }

  .hero-writing-post .writing-post-info h5 {
    font-size: 15px;
  }

  .hero-writing-post .writing-post-info .writing-post-excerpt {
    font-size: 13px;
  }

  .portfolio-row {
    gap: 24px;
    margin-bottom: 24px;
  }

  .portfolio-item .info {
    padding: 24px;
  }

  .page-home .work-main {
    padding: 36px;
  }

  .page-home .work-sidebar {
    padding: 28px;
  }
}

/* ===== HOME RESPONSIVE: TABLET ===== */
@media (max-width: 1023px) {
  .hero {
    height: auto;
    min-height: 0;
    background-image: none;
    position: relative;
  }

  .hero::before {
    display: none;
  }

  .hero-content {
    flex-direction: column;
  }

  /* Sketch + text overlap cell */
  .hero-sketch-cell {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0;
  }

  .hero-sketch-mobile {
    display: block;
    width: 55%;
    max-width: 380px;
    margin: 0;
    padding: 0;
  }

  .hero-sketch-mobile img {
    width: 100%;
    height: auto;
    display: block;
  }

  .page-home .hero-text {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    padding: 28px 28px 28px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to right, rgba(var(--bg-gradient-base), 0) 0%, rgba(var(--bg-gradient-base), 0.7) 15%, rgba(var(--bg-gradient-base), 0.85) 100%);
    text-align: left;
    z-index: 2;
  }

  .page-home .hero-text > div {
    max-width: 100%;
    margin: 0;
  }

  .page-home .hero-text h1 {
    font-size: 30px;
  }

  .page-home .hero-text .subtitle {
    font-size: 16px;
  }

  .page-home .hero-text .more-link {
    justify-content: flex-start;
  }

  .hero-writing {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 28px;
    overflow-y: visible;
    background: var(--bg);
    position: relative;
    z-index: 3;
  }


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

  .page-home .work-main {
    width: 100%;
    border-right: none;
    border-left: none;
    border-radius: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 36px 28px;
  }

  .page-home .work-sidebar {
    width: 100%;
    margin-top: 0;
    padding: 28px;
    border-top: none;
  }

  .portfolio-row {
    gap: 20px;
    margin-bottom: 20px;
  }

  .portfolio-item .info {
    padding: 20px;
  }

}

/* ===== HOME RESPONSIVE: MOBILE ===== */
@media (max-width: 767px) {
  .page-home .hero-text {
    padding: 20px 24px 20px 0;
    justify-content: flex-start;
  }

  .page-home .hero-text h1 {
    font-size: 26px;
    margin-bottom: 14px;
  }

  .page-home .hero-text .subtitle {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .hero-sketch-mobile {
    width: 75%;
    max-width: 300px;
    margin: 0;
    padding: 0;
  }

  .hero-writing {
    padding: 24px 28px;
  }


  .hero-writing-post .writing-post-thumb {
    width: 72px;
    height: 72px;
  }

  .hero-writing-post .writing-post-info h5 {
    font-size: 15px;
  }

  .hero-writing-post .writing-post-info .writing-post-excerpt {
    font-size: 13px;
  }

  .hero-writing-post {
    padding-bottom: 16px;
    margin-bottom: 16px;
    gap: 14px;
  }

  .portfolio-row {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
  }

  .portfolio-item {
    transition: none;
  }

  .portfolio-item:hover {
    transform: none;
    box-shadow: none;
  }

  .project-card {
    transition: none;
  }

  .project-card:hover {
    transform: none;
    box-shadow: none;
  }

  .page-home .work-main {
    padding: 28px;
    background: transparent;
    border: none;
  }

  .page-home .work-sidebar {
    padding: 24px 28px;
  }

  .portfolio-item .info {
    padding: 18px;
  }

  .portfolio-item .info h3 {
    font-size: 16px;
  }

  .portfolio-item .info p {
    font-size: 13px;
  }

}


/* Dark mode transitions for page-specific elements */
.hero, .page-home .hero-text h1, .page-home .hero-text .subtitle,
.page-home .work-main, .page-home .work-sidebar {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.hero-writing-post {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}

@media (max-width: 1023px) {
}

@media (max-width: 767px) {
}

/* ========================================
   PAGE: WRITING LISTING (writing.html)
   ======================================== */

.page-content {
  flex: 1;
}

/* ===== CATEGORY BAR ===== */
.category-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 36px;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
}

.category-filters {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.category-pill {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  position: relative;
}

.category-pill::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text);
  transition: width 0.25s ease;
}

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

.category-pill:hover::after {
  width: 100%;
}

.category-pill.active {
  color: var(--text);
  font-weight: 600;
}

.category-pill.active::after {
  width: 100%;
  background: var(--text);
}

.category-filters .cat-sep {
  display: none;
  user-select: none;
}

/* ===== FEATURED HERO ===== */
.featured-hero {
  max-width: 1160px;
  margin: 12px auto 0;
  padding: 0 36px;
  position: relative;
}

.featured-hero-inner {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 380px;
}

.featured-image {
  width: 55%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52%;
  background: transparent;
  padding: 36px 40px;
  z-index: 2;
  transition: transform 0.35s ease;
}
.featured-card:hover {
  transform: translateY(-50%) scale(1.02);
}


.featured-card .featured-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.featured-card .featured-category .cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.featured-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.25;
  margin-bottom: 14px;
}

.featured-card .featured-excerpt {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.featured-card .featured-meta {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.featured-card .featured-meta span {
  margin: 0 6px;
}

.featured-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 12px 48px var(--shadow-subtle), 0 2px 8px var(--shadow-subtle);
  z-index: -1;
  transition: inset 0.3s ease, box-shadow 0.3s ease;
}
.featured-card:hover .cat-dot {
  transform: scale(1.5);
}

.featured-card h2 {
  transition: color 0.3s ease;
}

/* ===== MAIN CONTENT AREA ===== */
.writing-content {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 36px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* ===== POSTS COLUMN ===== */
.posts-column {
  flex: 1;
  min-width: 0;
}

.posts-column .section-label {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 28px;
}

/* Post entry */
.post-entry {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}

.post-entry.first-visible {
  padding-top: 0;
}

.post-entry:last-of-type {
  border-bottom: none;
}

.post-number {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 300;
  font-size: 42px;
  /* Purely decorative ordinal — template sets aria-hidden so screen
     readers skip it, which lets us use a softer color below AA contrast. */
  color: #d8d8d8;
  line-height: 1;
  width: 72px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 0;
  position: relative;
  top: -6px;
  user-select: none;
  letter-spacing: -0.5px;
}
[data-theme="dark"] .post-number { color: #333; }

.post-body {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
}

.post-category-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.post-category-label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.post-body .post-excerpt {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
}

.post-body .post-meta {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.post-body .post-meta span {
  margin: 0 6px;
}

/* Post hover */
.post-entry:hover .cat-dot {
  transform: scale(1.5);
}

.post-entry:hover .post-body h3 {
  color: var(--accent);
}

.post-entry:hover .post-number {
  color: var(--border-kbd);
}

/* Post thumbnail (optional) */
.post-thumb {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 24px;
  align-self: center;
}

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

/* ===== SIDEBAR ===== */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* My Picks */
.editors-picks {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.editors-picks .sidebar-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.pick-item:first-of-type {
  padding-top: 0;
}

.pick-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.pick-info {
  flex: 1;
  min-width: 0;
}

.pick-info .pick-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pick-info .pick-category .cat-dot {
  width: 6px;
  height: 6px;
}

.pick-info h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  transition: color 0.25s ease;
}

.pick-excerpt {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pick-item:hover h4 {
  color: var(--accent);
}

.pick-item:hover .cat-dot {
  transform: scale(1.4);
}

/* Newsletter CTA */
.newsletter-cta {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.newsletter-cta .sidebar-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
}

.newsletter-cta p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  background: var(--bg);
  transition: border-color 0.25s ease;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--text-faint);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.25s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--accent);
}

/* ===== MOBILE EDITOR'S PICKS SCROLL ROW ===== */
.mobile-picks {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px 36px;
}

.mobile-picks .sidebar-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.mobile-picks-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.mobile-picks-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-pick-card {
  flex-shrink: 0;
  width: 220px;
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-pick-card:hover {
  background: var(--bg-elevated);
}

.mobile-pick-card .pick-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mobile-pick-card .pick-category .cat-dot {
  width: 6px;
  height: 6px;
}

.mobile-pick-card h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.35;
}

/* ===== WRITING RESPONSIVE: SMALL DESKTOP ===== */
@media (max-width: 1439px) {
  .category-bar {
    padding: 16px 28px;
  }

  .featured-hero {
    padding: 0 28px;
    margin-top: 10px;
  }

  .featured-card {
    padding: 28px 32px;
  }

  .featured-card h2 {
    font-size: 26px;
  }

  .writing-content {
    padding: 0 28px;
    margin-top: 40px;
    gap: 36px;
  }

  .sidebar {
    width: 270px;
  }
}

/* ===== WRITING RESPONSIVE: TABLET ===== */
@media (max-width: 1023px) {
  .featured-hero-inner {
    min-height: 320px;
  }

  .featured-image {
    width: 50%;
  }

  .featured-card {
    width: 58%;
    padding: 24px 28px;
  }

  .featured-card h2 {
    font-size: 22px;
  }

  .featured-card .featured-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .writing-content {
    gap: 28px;
  }

  .sidebar {
    width: 240px;
  }

  .post-number {
    font-size: 44px;
    width: 52px;
  }

  .post-body h3 {
    font-size: 19px;
  }

  .post-thumb {
    width: 100px;
    height: 68px;
  }

  .editors-picks {
    padding: 22px;
  }

  .newsletter-cta {
    padding: 22px;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

/* ===== WRITING RESPONSIVE: MOBILE ===== */
@media (max-width: 767px) {
  .category-bar {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .category-pill {
    font-size: 13px;
  }

  /* Featured stacks */
  .featured-hero {
    padding: 0 20px;
    margin-top: 8px;
  }

  .featured-hero-inner {
    flex-direction: column;
    min-height: 0;
    border-radius: 10px;
    overflow: visible;
  }

  .featured-image {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 8;
  }

  .featured-card {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin-top: -24px;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 24px var(--shadow-subtle);
  }

  .featured-card h2 {
    font-size: 22px;
  }

  .featured-card .featured-excerpt {
    font-size: 14px;
  }

  /* Writing content stacks */
  .writing-content {
    flex-direction: column;
    padding: 0 20px;
    margin-top: 32px;
    gap: 0;
  }

  /* Sidebar hides on mobile */
  .sidebar {
    display: none;
  }

  /* Mobile picks show */
  .mobile-picks {
    display: block;
    padding: 0 20px 32px;
  }

  /* Posts lose numbers, become simpler */
  .post-number {
    display: none;
  }

  .post-body {
    padding-left: 0;
  }

  .post-body h3 {
    font-size: 18px;
  }

  .post-body .post-excerpt {
    font-size: 13px;
  }

  .post-entry {
    padding: 20px 0;
  }

  .post-thumb {
    width: 88px;
    height: 60px;
    margin-left: 16px;
  }
}

/* Transitions for smooth switching */
.category-pill,
.featured-card h2,
.featured-card .featured-category,
.featured-card .featured-excerpt,
.featured-card .featured-meta,
.post-number,
.post-body h3,
.post-body .post-excerpt,
.post-body .post-meta,
.post-category-label,
.editors-picks,
.pick-info h4,
.pick-info .pick-category,
.newsletter-cta,
.newsletter-cta .sidebar-title,
.newsletter-cta p,
.newsletter-form input[type="email"],
.mobile-pick-card h4,
.mobile-picks .sidebar-title,
.posts-column .section-label,
.sidebar {
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.featured-card::after {
  transition: inset 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.post-entry {
  transition: background 0.2s ease, color 0.3s ease, border-color 0.3s ease;
}
.pick-item {
  transition: background 0.2s ease, color 0.3s ease, border-color 0.3s ease;
}
.newsletter-form button {
  transition: background 0.25s ease, color 0.3s ease, border-color 0.3s ease;
}
.mobile-pick-card {
  transition: background 0.2s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========================================
   PAGE: WRITING DETAIL (writing-detail.html)
   ======================================== */

/* ===== ARTICLE HEADER — THE BROADSHEET ===== */
/* ===== ARTICLE HEADER ===== */
.article-header {
  padding: 56px 0 0;
}

.header-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.header-category .cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.article-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--text-bold);
  line-height: 1.2;
  margin-bottom: 16px;
}

.header-excerpt {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 85%;
}

.header-meta-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-author {
  font-weight: 700;
  color: var(--text-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
}

.header-sep {
  color: var(--text-faint);
}

.header-date {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-divider {
  margin: 28px 0 0;
  padding: 0;
}

.header-divider-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--text) 0%, var(--text) 70%, transparent 100%);
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  margin: 10px 0 0;
}

.toc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 0;
  margin-left: 0;
  transition: color 0.2s;
}

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


.toc-chevron {
  transition: transform 0.3s ease;
}

.toc.open .toc-chevron {
  transform: rotate(180deg);
}

.toc-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding-left: 0;
}

.toc.open .toc-list {
  max-height: 600px;
  opacity: 1;
  margin-top: 0;
  padding-bottom: 16px;
  border-bottom: none;
  background-image: linear-gradient(to right, var(--border-strong) 0%, var(--border-strong) 70%, transparent 100%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: bottom;
}

/* Nested lists */
.toc-list ol {
  margin: 0;
  padding: 0;
}

.toc-list .toc-root {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}


.toc-list li {
  margin: 0;
}

/* Top-level h2 links */
.toc-list .toc-root > li > a {
  display: block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 7px 0;
  transition: color 0.2s;
}

.toc-list a::after {
  display: none !important;
}

.toc-list .toc-root > li > a:hover {
  color: var(--accent);
}

/* Nested h3 links */
.toc-list ol ol {
  list-style: none;
  padding-left: 0;
}

.toc-list ol ol > li > a {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0 4px 20px;
  transition: color 0.2s;
}

.toc-list ol ol > li > a:hover {
  color: var(--accent);
}

/* Nested h4 links */
.toc-list ol ol ol > li > a {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 40px;
}

/* Dark mode */

/* ===== ARTICLE BODY ===== */
/* Article layout — body + sidebar */
.article-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 48px;
  padding: 0 36px;
  align-items: flex-start;
}

.article-main {
  flex: 1;
  max-width: 760px;
}

/* Sidebar */
.article-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 27px;
  align-self: flex-start;
  margin-top: 106px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.picks-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.article-sidebar .pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.article-sidebar .pick-item:first-of-type {
  padding-top: 0;
}

.article-sidebar .pick-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.article-sidebar .editors-picks {
  margin-bottom: 24px;
}


.article-sidebar .pick-info {
  flex: 1;
  min-width: 0;
}

.article-sidebar .pick-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.article-sidebar .pick-category .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.article-sidebar .pick-info h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  transition: color 0.25s ease;
}

.article-sidebar .pick-item:hover h4 {
  color: var(--accent);
}

.article-sidebar .pick-item:hover .cat-dot {
  transform: scale(1.4);
}


/* ===== RELATED POSTS ===== */
.related-posts {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 48px 0 60px;
}

/* Mirror .article-layout / .article-main / .article-sidebar shape exactly
   so the grid's left edge lines up with .article-main above. The layout
   width matches article-layout's intrinsic width (760 + 48 + 300 + 72
   padding = 1180) — NOT its declared max-width of 1200 — because body is
   a flex column and max-content wins when content fits. */
.related-layout {
  display: flex;
  max-width: 1200px;
  width: max-content;
  margin: 0 auto;
  gap: 48px;
  padding: 0 36px;
  align-items: flex-start;
  box-sizing: border-box;
}
.related-main {
  flex: 1;
  max-width: 760px;
  min-width: 0;
}
.related-spacer {
  width: 300px;
  flex-shrink: 0;
}

.related-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 24px;
}

.related-grid {
  display: flex;
  gap: 28px;
}

.related-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-subtle);
}

.related-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.related-card-excerpt {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card:hover .related-card-title {
  color: var(--accent);
}

/* ===== WRITING DETAIL RESPONSIVE ===== */
@media (max-width: 1439px) {
  .article-layout { padding: 0 28px; }
  .article-title { font-size: 36px; }
  .related-posts { padding: 40px 0 50px; }
  .related-layout { padding: 0 28px; }
}

@media (max-width: 1023px) {
  .article-title { font-size: 32px; }
  .article-sidebar { display: none; }
  .article-layout { justify-content: center; }
  .article-main { max-width: 760px; width: 100%; }
  .related-spacer { display: none; }
  .related-layout { justify-content: center; }
  .related-main { max-width: 760px; width: 100%; }
}

@media (max-width: 767px) {
  .article-layout { padding: 0 24px; }
  .article-header { padding: 32px 0 0; }
  .article-title { font-size: 28px; }
  .related-posts { padding: 32px 0 40px; }
  .related-layout { padding: 0 24px; }
  .related-grid { flex-direction: column; gap: 16px; }
}

/* ===== WRITING DETAIL DARK MODE ===== */
/* Transitions for smooth switching */
.article-title,
.header-divider-line,
.article-sidebar,
.picks-title,
.article-sidebar .pick-category,
.article-sidebar .pick-info h4,
.related-posts,
.related-card-date,
.related-card-title,
.related-label {
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.article-sidebar .pick-item {
  transition: background 0.2s ease, color 0.3s ease, border-color 0.3s ease;
}
.related-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

/* ========================================
   PAGE: PROJECTS (projects.html)
   ======================================== */

/* Page header */
.page-header { width: 100%; max-width: 1200px; margin: 0 auto; padding: 36px 36px 10px; }
.page-header h1 { font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--text); }
.page-header p { font-family: var(--font-body); font-size: 17px; font-weight: 400; color: var(--text-secondary); margin-top: 8px; }

/* Filter bar */
.filter-bar { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 36px; display: flex; gap: 20px; justify-content: flex-end; }
.filter-pill { font-family: var(--font-ui); font-size: 13px; font-weight: 400; letter-spacing: 0.03em; color: var(--text-dim); background: transparent; border: none; padding: 4px 0; cursor: pointer; transition: all 0.25s; outline: none; position: relative; }
.filter-pill::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--text); transition: width 0.25s; }
.filter-pill:hover { color: var(--text); }
.filter-pill:hover::after { width: 100%; }
.filter-pill.active { color: var(--text); font-weight: 600; }
.filter-pill.active::after { width: 100%; background: var(--text); }


/* Cards container */
.cards-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 36px 60px; display: flex; flex-direction: column; gap: 32px; }

/* ===== PROJECT CARDS ===== */
.page-projects .project-card {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.page-projects .project-card:nth-child(even) { flex-direction: row-reverse; }
.page-projects .project-card:nth-child(even) .card-right { border-left: none; border-right: 1px solid var(--border); }
.page-projects .project-card:nth-child(even) .card-status-badge { right: auto; left: 20px; }

/* Status badge — top right corner */
.card-status-badge {
  position: absolute;
  top: -1px;
  right: 20px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 0 0 6px 6px;
  z-index: 1;
}
.card-status-badge.active { background: var(--text); color: var(--bg); }
.card-status-badge.maintenance { background: var(--text-muted); color: var(--bg); }
/* Previously --text-muted on --border-strong (#e0e0e0) = 3.91:1 — fails
   AA. --text-secondary (#555) on #e0e0e0 is ~6:1. */
.card-status-badge.deprecated { background: var(--border-strong); color: var(--text-secondary); }
.page-projects .project-card:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.03);
}


/* Left: project content */
.card-left {
  flex: 1;
  min-width: 0;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
}

.project-name {
  font-family: var(--font-logo);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 4px;
  color: var(--text-bold);
  transition: color 0.25s;
}
.page-projects .project-card:hover .project-name { color: var(--accent) !important; }

.project-type {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.project-desc {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.tech-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; justify-content: flex-end; }
.tech-tag {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  padding: 0;
  letter-spacing: 0.02em;
}
.tech-tag::after {
  content: '\00b7';
  margin-left: 7px;
  color: var(--text-faint);
}
.tech-tag:last-child::after { content: none; }

/* Right: metadata panel — matches project detail sidebar styling */
.card-right {
  width: 280px;
  flex-shrink: 0;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
}

/* Per-project tint applied via inline style on .card-right */

.meta-group {
  margin-bottom: 20px;
}
.meta-group:last-child { margin-bottom: 0; }

.meta-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.meta-value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.meta-value-visibility {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.visibility-bar {
  width: 20px;
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
  background: #e87461;
}

.skills-value {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1.6;
}

/* Projects Responsive */
@media (max-width: 1439px) {
  .page-header { padding: 60px 28px 32px; }
  .filter-bar { padding: 0 28px 20px; }
  .cards-container { padding: 0 28px 60px; }
}

@media (max-width: 1023px) {
  .project-card, .project-card:nth-child(even) { flex-direction: column; }
  .card-left { flex: none; width: 100%; }
  .card-right { flex: none; width: 100%; }
}

@media (max-width: 767px) {
  .page-header { padding: 40px 24px 24px; }
  .page-header h1 { font-size: 30px; }
  .page-header p { font-size: 15px; }
  .filter-bar { padding: 0 24px 16px; flex-wrap: wrap; }
  .cards-container { padding: 0 24px 40px; }
  .card-left { padding: 24px 20px; }
  .card-right { padding: 20px 20px; }
}


/* Transitions for smooth theme switching */
.page-header h1,
.page-header p,
.filter-pill,
.filter-pill::after,
.card-left,
.card-right,
.project-name,
.project-type,
.project-desc,
.tech-tag,
.tech-tag::after,
.meta-label,
.meta-value,
.meta-value-visibility,
.skills-value,
.card-status-badge {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.project-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.3s, color 0.3s, border-color 0.3s;
}


/* ========================================
   PAGE: CONTACT (contact.html)
   ======================================== */

/* ===== CONTACT PAGE: NAV SOCIAL EMAIL ACTIVE ===== */
nav .nav-social a.social-email.active { color: var(--accent); }
nav .nav-social a.social-email.active svg { stroke: var(--accent); }

nav .nav-social a.social-email svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  width: 14px;
  height: 14px;
}

.mobile-menu-overlay .mobile-social a.social-email svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ===== CONTACT CONTENT ===== */
.contact-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 36px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.contact-container h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.contact-subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.8;
}

.contact-subtitle a {
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.contact-subtitle a:hover {
  border-bottom: 1px solid var(--accent);
}

/* Success / error banners for the contact form. Prominent by design so a
   successful submission can't be missed. Blue matches the prior-site accent. */
.contact-success,
.contact-error {
  margin: 20px 0 8px;
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(1, 183, 255, 0.18);
}
.contact-success {
  background: #01B7FF;
  color: #ffffff;
  border: 1px solid #01B7FF;
}
.contact-success p,
.contact-error p {
  margin: 0;
  color: inherit;
  font-weight: 600;
}
.contact-success::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #ffffff;
  color: #01B7FF;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* A checkmark sits inside via an SVG background image for crispness. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301B7FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}
.contact-error {
  background: #fff1f1;
  color: #b42318;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.contact-form {
  margin-top: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.contact-form label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  background: var(--bg-elevated);
  outline: none;
  transition: border-color 0.3s;
  display: block;
}

.contact-form input:focus {
  border-color: var(--text);
  background: var(--bg);
}

.contact-form textarea {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  background: var(--bg-elevated);
  outline: none;
  transition: border-color 0.3s;
  resize: vertical;
  display: block;
}

.contact-form textarea:focus {
  border-color: var(--text);
  background: var(--bg);
}

.contact-form button[type="submit"] {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--text);
  /* Dark background demands light text; previously --text-bold (#111)
     gave 1.45:1 against --text (#303133). --white hits ~12:1. */
  color: var(--white);
  padding: 12px 40px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 4px;
}

.contact-form button[type="submit"]:hover {
  background: var(--text-bold);
}

footer .social a.social-email svg {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

/* ===== CONTACT RESPONSIVE: LARGE DESKTOP ===== */
@media (max-width: 1439px) {
  .contact-container {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ===== CONTACT RESPONSIVE: TABLET =====
   The theme toggle only hides on the contact page at tablet widths
   because the form occupies the full width. Everywhere else the
   toggle remains accessible. Scoping matters: the previous rule was
   unscoped and hid the toggle globally at <=1023px. */
@media (max-width: 1023px) {
  .page-contact .theme-toggle-wrap {
    display: none;
  }
}

/* ===== CONTACT RESPONSIVE: MOBILE ===== */
@media (max-width: 767px) {
  .contact-container {
    padding: 0 20px;
    padding-top: 28px;
    padding-bottom: 60px;
  }

  .contact-container h1 {
    font-size: 30px;
  }

  .contact-subtitle {
    font-size: 15px;
  }

  footer .social {
    margin-right: 0;
  }
}

/* ========================================
   PAGE: SEARCH (search.html)
   ======================================== */

/* ===== SEARCH HEADER ===== */
.search-header {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 36px 12px;
}

.search-header h1 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.search-query {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-bold);
  line-height: 1.2;
}

.search-meta {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.search-meta span {
  color: var(--text);
  font-weight: 600;
}

/* ===== SEARCH CONTENT ===== */
.search-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 36px 60px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* ===== RESULTS COLUMN ===== */
.results-column {
  flex: 1;
  min-width: 0;
}

.results-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.result-entry {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.result-entry:last-of-type {
  border-bottom: none;
}

.result-entry:hover .result-title {
  color: var(--accent);
}

.result-thumb {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

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

.result-body {
  flex: 1;
  min-width: 0;
}

.result-category-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.result-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.result-category {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.result-excerpt {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-faint);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-meta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-faint);
  margin-top: 8px;
}

.result-highlight {
  background: rgba(255, 77, 0, 0.12);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 500;
}

/* ===== SEARCH SIDEBAR ===== */
.search-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}

.sidebar-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.sidebar-result {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.sidebar-result:first-of-type {
  padding-top: 0;
}

.sidebar-result:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-result:hover .sidebar-result-name {
  color: var(--accent);
}

.sidebar-result-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.sidebar-result-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ===== SEARCH RESPONSIVE ===== */
@media (max-width: 1023px) {
  .search-header { padding: 36px 28px 28px; }
  .search-content { padding: 28px 28px 48px; gap: 36px; }
  .search-sidebar { width: 260px; }
}

@media (max-width: 767px) {
  .search-header { padding: 28px 20px 24px; }
  .search-header .search-query { font-size: 24px; }
  .search-content { padding: 20px 20px 40px; flex-direction: column; gap: 36px; }
  .search-sidebar { width: 100%; position: static; }
  .result-thumb { width: 90px; height: 60px; }
  .result-title { font-size: 17px; }
  footer .social { margin-right: 0; }
}


/* ========================================
   PAGE: PROJECT DETAIL (project-detail.html)
   ======================================== */

/* ===== SPLIT LAYOUT ===== */
.split-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Main content — left */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 36px 0 60px;
}

/* Sidebar — right */
.page-project-detail .sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 27px;
  align-self: flex-start;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 32px;
  margin-top: 98px;
}

/* Project header in main content */
.proj-name-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.proj-name { font-family: 'Rajdhani', sans-serif; font-size: 42px; font-weight: 700; color: var(--text-bold); line-height: 1; }
.proj-type-label { font-family: var(--font-ui); font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* Intro */
.proj-intro {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 20px 24px;
  margin-top: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
}

/* Dividers */
.proj-divider { border: none; border-top: 1px solid var(--border); margin: 36px 0 0; }

/* Section labels */
.proj-section-label {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text); margin-bottom: 16px; padding-top: 36px;
}

/* About / Description */
.proj-description { padding: 0 0 8px; }
.proj-description p {
  font-family: var(--font-body); font-size: 16px; font-weight: 400; color: var(--text);
  line-height: 1.8; margin-bottom: 20px;
}
.proj-description h2 {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 32px; margin-bottom: 12px;
}

/* Features & Screenshots — stacked full width */
.proj-features { display: flex; flex-direction: column; gap: 48px; }
.feature-block { }
.feature-info { margin-bottom: 20px; display: flex; gap: 16px; align-items: flex-start; }
.proj-features .feature-number {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  color: var(--bg); background: var(--text); width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.proj-features .feature-text { flex: 1; }
.proj-features .feature-title {
  font-family: var(--font-ui); font-size: 17px; font-weight: 700; color: var(--text-heading);
  margin-bottom: 6px;
}
.proj-features .feature-desc {
  font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--text-secondary);
  line-height: 1.7;
}
.feature-screenshot {
  width: 100%; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-subtle);
}
.feature-screenshot img { width: 100%; height: auto; display: block; cursor: zoom-in; }

/* Status badge — top right of sidebar */


.sidebar-tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tech-tag {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 4px; letter-spacing: 0.02em;
}

.sidebar-links { display: flex; flex-direction: column; gap: 5px; padding-top: 5px; }
.sidebar-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 400; color: var(--text);
}
.sidebar-link span { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.sidebar-link:hover span { border-bottom-color: var(--accent); }
.sidebar-link svg { width: 14px; height: 14px; fill: none; stroke: var(--text); stroke-width: 2; }

/* ===== PROJECT DETAIL RESPONSIVE ===== */
@media (max-width: 1439px) {
  .split-container { padding: 0 28px; }
}

@media (max-width: 1023px) {
  .split-container { flex-direction: column; gap: 0; }
  .page-project-detail .sidebar {
    width: 100%;
    position: static;
    margin-top: 0;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding: 24px 28px;
  }
  .page-project-detail .sidebar .meta-group { margin-bottom: 0; min-width: 120px; }
  .main-content { padding-top: 0; }
}

@media (max-width: 767px) {
  .split-container { padding: 0 24px; }
  .proj-name { font-size: 32px; }
  .proj-intro { font-size: 17px; }
  .proj-description p { font-size: 15px; }
  .page-project-detail .sidebar {
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
  }
  .page-project-detail .sidebar .meta-group { min-width: unset; }
}

/* ===== PROJECT DETAIL DARK MODE ===== */

/* Transitions for smooth theme switching */
.sidebar,
.proj-name,
.proj-type-label,
.proj-intro,
.proj-divider,
.proj-section-label,
.proj-description p,
.proj-description h2,
.feature-number,
.feature-title,
.feature-desc,
.feature-screenshot,
.sidebar-tech-tag,
.sidebar-link,
.sidebar-link svg {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}


/* ========================================
   PAGE: PROJECT DETAIL ALT (project-detail-alt.html)
   ======================================== */

/* ===== OPTION BANNER ===== */
.option-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: var(--text); color: var(--bg); font-family: var(--font-ui); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; text-align: center; padding: 6px; }

/* ===== HEADER OVERRIDES (for option banner offset) ===== */
.page-project-detail-alt header { padding-top: 57px; }
.page-project-detail-alt nav { padding-top: 4px; }

/* ===== PROJECT HEADER ===== */
.project-header { width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 36px 0; }
.page-project-detail .project-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 42px; color: var(--text-bold); line-height: 1.1; text-transform: uppercase; letter-spacing: -0.5px; }
.project-type-label { display: inline-block; font-family: var(--font-ui); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bg); background: var(--accent); padding: 3px 10px; border-radius: 3px; margin-top: 10px; }
.project-intro { font-family: var(--font-body); font-size: 17px; font-weight: 400; color: var(--text-secondary); line-height: 1.7; margin-top: 16px; max-width: 780px; }
.project-meta-badges { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.meta-badge { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text); background: var(--bg-elevated); padding: 5px 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.meta-badge .badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.meta-badge .badge-dot.active { background: var(--accent); }
.meta-badge .badge-dot.private { background: var(--text-muted); }

/* ===== MAGAZINE GRID ===== */
.magazine-grid { width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px 36px 0; display: grid; grid-template-columns: 7fr 5fr; gap: 32px; }

/* Section labels */
.magazine-grid .section-label { font-family: var(--font-ui); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 16px; }

/* About section (left column) */
.about-section { grid-column: 1; }
.about-section p { font-size: 15px; color: var(--text-secondary); line-height: 1.85; margin-bottom: 20px; }
.about-section p:last-child { margin-bottom: 0; }
.about-section h3 { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 22px; color: var(--text-bold); margin-top: 28px; margin-bottom: 12px; }

/* Right panel */
.right-panel { grid-column: 2; border: 1px solid var(--border); border-radius: 12px; padding: 32px; background: var(--bg-elevated); align-self: start; }
.panel-group { margin-bottom: 28px; }
.panel-group:last-child { margin-bottom: 0; }
.tech-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-chip { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); padding: 5px 14px; border-radius: 20px; transition: border-color 0.2s, color 0.2s; }
.tech-chip:hover { border-color: var(--accent); color: var(--accent); }
.skills-text { font-family: var(--font-ui); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); line-height: 1.6; }
.panel-divider { height: 1px; background: var(--border); margin: 0 0 28px; }

/* Features section (spans both columns) */
.features-section { grid-column: 1 / -1; padding-top: 12px; }
.feature-item { display: flex; gap: 32px; align-items: flex-start; padding: 32px 0; border-top: 1px solid var(--border); }
.feature-item:last-child { padding-bottom: 0; }
.feature-item:nth-child(even) { flex-direction: row-reverse; }
.feature-img-wrap { width: 45%; flex-shrink: 0; }
.feature-img-wrap img { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--border); }
.features-section .feature-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.features-section .feature-number { font-family: var(--font-ui); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 8px; }
.features-section .feature-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 24px; color: var(--text-bold); margin-bottom: 12px; line-height: 1.2; }
.features-section .feature-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }

/* ===== SPACING ===== */
.magazine-grid + footer { margin-top: 60px; }

/* ===== PROJECT DETAIL ALT RESPONSIVE ===== */
@media (max-width: 1439px) {
  .project-header { padding-top: 40px; }
  .magazine-grid { gap: 28px; }
  .page-project-detail .project-name { font-size: 38px; }
  .feature-item { gap: 28px; }
}

@media (max-width: 1023px) {
  .magazine-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-section { grid-column: 1; }
  .right-panel { grid-column: 1; }
  .features-section { grid-column: 1; }
  .feature-item { flex-direction: column !important; gap: 20px; }
  .feature-img-wrap { width: 100%; }
  .page-project-detail nav a:not(.search-wrap):not(.nav-social) { display: none; }
  .page-project-detail nav .theme-toggle-wrap { display: none; }
  .page-project-detail .hamburger { display: flex; }
  .page-project-detail .search-wrap.open .search-input { width: 200px; }
}

@media (max-width: 767px) {
  .page-project-detail-alt header { padding-top: 50px; }
  .project-header { padding: 32px 20px 0; }
  .magazine-grid { padding: 32px 20px 0; gap: 24px; }
  .page-project-detail .project-name { font-size: 32px; }
  .project-intro { font-size: 15px; }
  .right-panel { padding: 24px; }
  .features-section .feature-title { font-size: 20px; }
}

/* ===== PROJECT DETAIL ALT DARK MODE ===== */

/* ========================================
   PAGE: WORK - LEO & MIKE (work-leo-mike.html)
   ======================================== */

/* ===== TWO-COLUMN LAYOUT ===== */
.page-work .work-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 36px 0;
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

/* ===== SIDEBAR (LEFT) ===== */
.page-work .work-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.work-title {
  font-family: var(--font-ui);
  font-size: 29px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 16px;
}

.work-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.8;
}

.sidebar-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.detail-field {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  align-items: baseline;
}

.detail-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-heading);
  width: 120px;
  flex-shrink: 0;
}

.detail-values {
  display: flex;
  flex-direction: column;
}

.detail-value {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ===== MAIN CONTENT (RIGHT) ===== */
.page-work .work-main {
  flex: 1;
  min-width: 0;
  padding-bottom: 72px;
}

/* Hero image */
.main-hero {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 40px;
}

.main-hero img,
.main-hero video {
  width: 100%;
  display: block;
}

.main-hero video {
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* Stats row */
.stats-row {
  display: flex;
  margin-bottom: 40px;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}

.stat-number {
  font-family: var(--font-ui);
  font-size: 29px;
  font-weight: 700;
  color: var(--text-bold);
  line-height: 1.75;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: normal;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Body text */
.body-text {
  margin-bottom: 40px;
}

.body-text p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.body-text p:last-child {
  margin-bottom: 0;
}

/* Testimonial */
.testimonial {
  margin-bottom: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.testimonial-accent {
  width: 3px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--accent);
  border-radius: 2px;
}

.testimonial-body {
  flex: 1;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  font-style: normal;
  color: var(--text-heading);
  line-height: 1.55;
  margin-bottom: 14px;
}

.testimonial-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.testimonial-author {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
}

.testimonial-role {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
}

.testimonial-link {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  /* 11px is below the "large text" threshold, so WCAG AA needs 4.5:1.
     --accent is 3.13:1 on the #f8f8f8 testimonial background; use the
     darker --accent-text (#B83A00) which hits ~5.2:1. */
  color: var(--accent-text);
  margin-top: 6px;
  display: inline-block;
  text-decoration: none;
}

.testimonial-link:hover {
  border-bottom: 1px solid var(--accent-text);
}

/* Gallery */
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  display: block;
}

/* ===== LEO & MIKE RESPONSIVE ===== */
@media (max-width: 1439px) {
  .page-work .work-layout { padding: 40px 28px 0; }
  .work-title { font-size: 26px; }
  .page-work .work-sidebar { width: 260px; }
  .stat-number { font-size: 24px; }
}

@media (max-width: 1023px) {
  .page-work .work-layout { flex-direction: column; gap: 32px; }
  .page-work .work-sidebar { width: 100%; position: static; top: auto; }
  .sidebar-fields { display: flex; gap: 28px; flex-wrap: wrap; }
  .detail-field { margin-bottom: 0; }
}

@media (max-width: 767px) {
  .page-work .work-layout { padding: 32px 20px 0; }
  .work-title { font-size: 24px; }
  .stats-row { flex-direction: column; gap: 24px; }
  .stat { text-align: left; padding: 0; }
  .stat-label { border-top: none; padding-top: 0; }
}

/* ===== LEO & MIKE DARK MODE ===== */

/* Smooth transitions */
.work-title, .work-subtitle, .sidebar-divider,
.detail-label, .detail-value,
.stat-number, .stat-label,
.body-text p,
.testimonial-quote, .testimonial-author, .testimonial-role {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* PAGE: WORK - LEO & MIKE ALT — uses same styles as LEO & MIKE above */
/* (Duplicate section removed — both pages share .page-work body class) */

/* ========================================
   PAGE: WORK - SCRIPTASE (work-scriptase.html)
   ======================================== */

/* ===== HERO ===== */
.hero-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a6b3c 0%, #2a8f5a 40%, #3ba3d9 100%);
  padding: 80px 36px 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 48px;
}

.hero-text {
  flex: 1;
  padding-bottom: 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--bg-gradient-base), 0.7);
  background: rgba(255,255,255,0.12);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-badge svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: rgba(var(--bg-gradient-base), 0.7);
  stroke-width: 2;
}

.hero-title {
  font-family: var(--font-ui);
  font-size: 52px;
  font-weight: 700;
  color: var(--text-bold);
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  max-width: 520px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-meta-item {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
}

.hero-meta-item strong {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: rgba(var(--bg-gradient-base), 0.85);
  margin-top: 2px;
}

.hero-screenshot {
  width: 480px;
  flex-shrink: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.25);
  transform: translateY(1px);
}

.hero-screenshot img {
  width: 100%;
  display: block;
}

/* ===== METRICS STRIP ===== */
.metrics-strip {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.metrics-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
}

.metric-cell {
  flex: 1;
  padding: 32px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.metric-cell + .metric-cell {
  border-left: 1px solid var(--border);
  padding-left: 32px;
}

.metric-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1;
}

.metric-num .counter {
  display: inline-block;
}

.metric-detail {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.metric-label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-note {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
}

/* ===== CONTEXT SECTION ===== */
.context-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 36px 0;
}

.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.context-text {
  max-width: 520px;
}

.section-tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-tag::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.context-text p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.8;
}

.context-text .highlight {
  color: var(--text-heading);
  font-weight: 500;
}

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.context-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 6px 14px;
  border-radius: 20px;
}

.context-tag svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke: var(--text-muted) !important;
}

.context-capabilities {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.capability {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.capability:last-child {
  border-bottom: none;
}

.capability-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.capability:nth-child(1) .capability-icon { background: var(--accent); }
.capability:nth-child(2) .capability-icon { background: #ff5c5c; }
.capability:nth-child(3) .capability-icon { background: #e8a838; }
.capability:nth-child(4) .capability-icon { background: #7c5cbf; }

.capability-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-bold);
  stroke-width: 1.8;
}

.capability-text h4 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.capability-text p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== EVOLUTION ===== */
.evolution-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 36px 0;
}

.evolution-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 16px;
  position: relative;
}

/* Timeline connector */
.evolution-list::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border) 0%, var(--border-kbd) 50%, var(--border) 100%);
}

.evo-item {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.evo-item.reverse {
  flex-direction: row-reverse;
}

/* Browser chrome frame for screenshots */
.evo-screenshot {
  width: 55%;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 4px 24px var(--shadow-subtle), 0 1px 4px var(--shadow-subtle);
}

.evo-screenshot::before {
  content: '';
  display: block;
  height: 32px;
  background: linear-gradient(to bottom, var(--bg-elevated), var(--border-strong));
  border-bottom: 1px solid var(--border-kbd);
  position: relative;
  background-image:
    radial-gradient(circle 5px at 16px 16px, #ff5f57 5px, transparent 6px),
    radial-gradient(circle 5px at 34px 16px, #febc2e 5px, transparent 6px),
    radial-gradient(circle 5px at 52px 16px, #28c840 5px, transparent 6px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.evo-screenshot img {
  width: 100%;
  display: block;
}

.evo-content {
  flex: 1;
  padding-top: 20px;
}

.evo-number {
  font-family: 'Rajdhani', sans-serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--text);
}

.evo-title {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.3;
}

.evo-desc {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===== DURABILITY STRIP ===== */
.durability-section {
  background: var(--bg-code);
  border-bottom: none;
}

.durability-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.durability-icon {
  display: none;
}

.durability-check {
  flex-shrink: 0;
  line-height: 0;
}

.durability-line {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}

.durability-line strong {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bold);
  letter-spacing: 0.02em;
}

/* ===== ECOSYSTEM ===== */
.ecosystem-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 36px 80px;
}

.eco-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.eco-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.eco-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px var(--shadow-subtle);
}

.eco-card-thumb {
  width: 80px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.eco-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eco-card h4 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.eco-card p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
}

/* ===== SCRIPTASE RESPONSIVE ===== */
@media (max-width: 1439px) {
  .hero-band { padding: 60px 28px 0; }
  .hero-title { font-size: 44px; }
  .hero-screenshot { width: 420px; }
  .metrics-inner { padding: 0 28px; }
  .context-section, .evolution-section, .ecosystem-section { padding-left: 28px; padding-right: 28px; }
  .durability-inner { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 1023px) {
  .hero-inner { flex-direction: column; align-items: stretch; gap: 32px; }
  .hero-text { padding-bottom: 0; }
  .hero-screenshot { width: 100%; border-radius: 8px 8px 0 0; }
  .context-grid { grid-template-columns: 1fr; gap: 32px; }
  .evo-item, .evo-item.reverse { flex-direction: column; }
  .evo-screenshot { width: 100%; }
  .eco-cards { grid-template-columns: 1fr; }
  .evolution-list::before { display: none; }
}

@media (max-width: 767px) {
  .hero-band { padding: 40px 20px 0; }
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 16px; }
  .metrics-inner { padding: 0 20px; flex-direction: column; }
  .metric-cell + .metric-cell { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
  .metric-cell { padding: 20px 0; }
  .metric-num { font-size: 36px; }
  .context-section, .evolution-section, .ecosystem-section { padding-left: 20px; padding-right: 20px; }
  .durability-inner { padding: 10px 20px; }
  .evolution-list { gap: 40px; }
  .evo-number { font-size: 42px; }
}


/* Smooth transitions */
.metrics-strip, .metric-num, .metric-label, .metric-note, .metric-cell,
.context-text p, .context-tag, .capability, .capability-text h4, .capability-text p,
.evo-number, .evo-title, .evo-desc, .evo-screenshot,
.durability-section, .durability-line,
.eco-card h4, .eco-card-thumb {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.eco-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
  cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 150ms;
  z-index: 10001;
  line-height: 1;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 48px 60px 0;
  cursor: default;
}
.lightbox-main img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay:hover .lightbox-nav { opacity: 0.7; }
.lightbox-nav:hover { opacity: 1 !important; background: rgba(255, 255, 255, 0.25); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.lightbox-thumbstrip {
  display: flex;
  gap: 8px;
  padding: 12px 20px 16px;
  overflow-x: auto;
  max-width: 100%;
  justify-content: center;
}
.lightbox-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 150ms, outline-color 150ms;
  outline: 2px solid transparent;
  outline-offset: 2px;
  flex-shrink: 0;
}
.lightbox-thumb:hover { opacity: 0.8; }
.lightbox-thumb.active { opacity: 1; outline-color: #fff; }

@media (max-width: 768px) {
  .lightbox-main { padding: 40px 16px 0; }
  .lightbox-nav { opacity: 0.5; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-thumbstrip { justify-content: flex-start; }
}
