/* site.css — portfolio (index-2) + work pages */

:root {
  --bg: #0a0a0a;           /* near-black */
  --fg: #ffffff;           /* white text */
  --muted: #b5b5b5;        /* subtle text */
  --accent: #ffffff;       /* keep high-contrast, can theme later */
  --pill-bg: #ffffff15;    /* slightly more visible pill */
  --pill-fg: #e8e8e8;
  --outline: 2px solid #ffffff; /* focus ring */

  /* Fluid type scale (clamp(min, vw-based, max)) */
  --step--2: clamp(0.78rem, 0.74rem + 0.12vw, 0.86rem);
  --step--1: clamp(0.88rem, 0.84rem + 0.22vw, 1.00rem);
  --step-0:  clamp(1.00rem, 0.94rem + 0.33vw, 1.20rem);
  --step-1:  clamp(1.20rem, 1.08rem + 0.68vw, 1.60rem);
  --step-2:  clamp(1.44rem, 1.22rem + 1.10vw, 2.10rem);
  --step-3:  clamp(1.80rem, 1.40rem + 1.90vw, 2.40rem); /* reduced max */
  --step-4:  clamp(2.40rem, 1.68rem + 3.60vw, 4.00rem);

  /* Fluid spacing unit */
  --space-1: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
  --space-2: clamp(0.75rem, 0.6rem + 0.6vw, 1.25rem);
  --space-3: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-4: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --space-5: clamp(3rem, 2.4rem + 3vw, 5rem);

  --radius: 999px; /* for pills & circular buttons */
  --radius-md: 16px;
  --shadow-soft: 0 2px 30px rgba(0,0,0,0.35);
}

html.portfolio {
  --maxw: 1400px;
}

html.work {
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
main { flex: 1 0 auto; }

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Body copy hyperlinks with grey underline */
.bio-content p a,
.bio-content li a,
.contact-content p a,
.article p a {
  text-decoration: underline;
  text-decoration-color: #888;
}
.bio-content p a:hover,
.bio-content li a:hover,
.contact-content p a:hover,
.article p a:hover {
  text-decoration-color: var(--fg);
}

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

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

/* Desktop portfolio containers: always keep 2rem (32px) each side */
@media (min-width: 1280px) {
  html.portfolio .container { width: min(100% - 4rem, var(--maxw)); }
}

/* Header */
header {
  background: #000; border-bottom: 1px solid #2a2a2a; box-shadow: var(--shadow-soft);
}

/* Header nav: single consistent width rule across all page types.
   The site-nav selector outranks page .container rules so the logo
   stays at the same inset on portfolio and work pages. */
header .container {
  width: min(100% - 2rem, 1400px);
}

@media (max-width: 750px) {
  html header .container.site-nav {
    width: min(100% - 4rem, 1400px);
  }
}

@media (min-width: 751px) {
  header .container {
    width: min(100% - 4rem, 1400px);
  }
}

/* ----- Unified site nav bar ----- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.main-nav,
.main-nav__group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Segmented pill container — exact match to old .segmented */
.main-nav__menu {
  display: inline-flex;
  list-style: none;
  margin: 0;
  border-radius: var(--radius);
  padding: 4px;
  background: var(--pill-bg);
  border: 1px solid #2a2a2a;
  gap: 4px;
}

/* Nav link / tab — exact match to old .segmented [role="tab"] */
.nav-link {
  position: relative;
  min-width: 6rem;
  padding: 8px 16px;
  border-radius: calc(var(--radius) - 2px);
  font-family: inherit;
  font-size: var(--step--1);
  line-height: 1;
  font-weight: 600;
  outline: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pill-fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-link:hover {
  text-decoration: none;
}

/* Inactive — exact match to old [aria-selected="false"] */
.nav-link[aria-selected="false"],
.nav-link:not([aria-selected]) {
  color: var(--muted);
}

/* Hover on inactive — exact match */
.nav-link[aria-selected="false"]:hover,
.nav-link:not([aria-selected]):hover {
  background: #2a2a2a;
  color: #fff;
}

/* Active tab on index — exact match to old [aria-selected="true"] */
.nav-link[aria-selected="true"] {
  background: #fff;
  color: #000;
}

/* Work item on work pages — dimmer default, brightens on hover */
.nav-link.nav-link--current {
  color: var(--fg);
}

.nav-link.nav-link--current:hover {
  background: #2a2a2a;
  color: #fff;
}

.nav-link:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}

/* Home control: circle beside the pill on desktop, "Latest" label in the mobile menu */
.nav-home {
  position: relative;
  isolation: isolate;
  width: 42px;
  height: 42px;
  min-width: 42px;
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  background: var(--pill-bg);
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

/* Inset fill, same 4px gap as the nav pill */
.nav-home::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: transparent;
  z-index: 0;
}

.nav-home:hover {
  text-decoration: none;
}

.nav-home:not([aria-selected="true"]):hover {
  color: #fff;
}

.nav-home:not([aria-selected="true"]):hover::before {
  background: #2a2a2a;
}

.nav-home[aria-selected="true"] {
  color: #000;
}

.nav-home[aria-selected="true"]::before {
  background: #fff;
}

.nav-home:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}

.nav-home-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  top: -2px;
}

.nav-home-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-latest-item {
  display: none;
}


/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
}

.hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Mobile nav */
@media (max-width: 750px) {
  .hamburger {
    display: flex;
  }

  /* The index pages wrap the menu in .main-nav__group. That empty
     flex item plus the 8px gap pulls the button in from the right edge.
     Work pages have no wrapper, so the button sits on the container edge. */
  .main-nav {
    gap: 0;
  }

  .main-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    background: #111;
    border: none;
    border-bottom: 1px solid #2a2a2a;
    border-radius: 0;
    padding: 0;
    z-index: 100;
    gap: 0;
  }

  .main-nav__menu.is-open {
    display: flex;
  }

  .main-nav__menu li {
    width: 100%;
    text-align: center;
  }

  .main-nav__menu li + li {
    border-top: 1px solid #1f1f1f;
  }

  .nav-link {
    display: block;
    width: 100%;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: var(--space-3) var(--space-3);
    border-radius: 0;
    font-size: var(--step-0);
    cursor: pointer;
    min-width: auto;
    text-align: center;
    outline: none;
    text-decoration: none;
  }

  .nav-link:hover,
  .nav-link[aria-selected="false"]:hover,
  .nav-link:not([aria-selected]):hover {
    background: #1a1a1a;
    color: #fff;
  }

  .nav-link[aria-selected="true"] {
    color: #fff;
    background: transparent;
  }

  .nav-link[aria-selected="false"],
  .nav-link:not([aria-selected]) {
    color: var(--muted);
  }

  .nav-link.nav-link--current {
    color: var(--fg);
  }

  .nav-home {
    display: none;
  }

  .nav-latest-item {
    display: block;
  }
}

header { position: relative; }

/* Work sub-nav (prev/grid/next) — centered at the bottom of work pages */
.work-sub-nav {
  display: flex;
  justify-content: center;
}

/* Filter input right-justified */
/* .filter { margin-left: auto; }
.filter input {
  width: min(320px, 42vw); background: #111; color: var(--fg); border: 1px solid #2a2a2a; border-radius: var(--radius); padding: 10px 14px; font-size: var(--step-0);
}
.filter input::placeholder { color: #8a8a8a; }
.filter input:focus { outline: var(--outline); } */

/* Panels */
.panel { display: none; padding: var(--space-4) 0 var(--space-5); }
.panel[aria-hidden="false"] { display: block; }

/* Reserve the first screen until JS fills the default view, so the footer
   does not paint in the content area and then jump down. */
#latestGrid:empty,
#articles:empty {
  min-height: 100vh;
}

/* Articles */
.articles { display: grid; gap: var(--space-3); justify-items: center; }
.article {
  display: grid; gap: 6px; padding: var(--space-3); background: #111111; border: 1px solid #2a2a2a; border-radius: var(--radius-md);
  max-width: 1280px;
  width: 100%;
}
.article .meta { color: var(--muted); font-size: var(--step--1); }
.article h3 { font-size: var(--step-2); margin: 0; letter-spacing: -0.01em; }
.article p { margin: 0; font-size: var(--step-0); color: #e6e6e6; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { display:inline-flex; align-items:center; gap:6px; padding: 6px 12px; border-radius: var(--radius); font-size: var(--step--1); background: var(--pill-bg); color: var(--pill-fg); border: 1px solid #2a2a2a; }

.empty { padding: var(--space-4); text-align: center; color: var(--muted); font-size: var(--step-1); }

.results-indicator {
  padding: var(--space-2) var(--space-3); color: var(--muted); font-size: var(--step--1);
  border-bottom: 1px solid #2a2a2a; margin-bottom: var(--space-3);
}

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); row-gap: calc(var(--space-4) + 24px); }

/* Work pages: add edge breathing room below 1230px */
@media (min-width: 541px) and (max-width: 1260px) {
  html.work .container { width: min(100% - 4rem, var(--maxw)); }
}

/* Below 1280px: add padding, reduce work grid gutters, and switch to 2 columns */
@media (max-width: 1279px) {
  html.portfolio .container { width: min(100% - 4rem, var(--maxw)); }
  .work-grid { 
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4); 
    row-gap: calc(var(--space-4) + 24px); 
  }
}

/* Between 980px and 1280px: add margins to work grid to narrow 2-column layout */
@media (max-width: 1279px) and (min-width: 981px) {
  .work-grid {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }
}

@media (max-width: 540px) {
  html.portfolio .container { width: min(100% - 2rem, var(--maxw)); }
  .work-grid { grid-template-columns: 1fr; gap: calc(var(--space-4) + 26px); row-gap: calc(var(--space-4) + 26px); }
  .tile { justify-items: center; width: 100%; }
  .tile .thumb { width: 94% !important; margin-left: auto; margin-right: auto; }
  .tile > div { margin-left: 0; text-align: left; width: 100%; }
  .tile h4 { padding-left: var(--space-3); }
  .tile p { padding-left: var(--space-3); }
}

.tile { display: grid; gap: 10px; }
.thumb { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; border: 1px solid #2a2a2a; background: #111111; }
.thumb canvas, .thumb .grad { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.thumb .grad { background: conic-gradient(from 180deg at 50% 60%, #2d2d2d, #111 40%, #333 70%, #181818 100%); }
.tile > div { margin-left: 10px; display: grid; gap: 3px; }
.tile h4 { margin: 0; font-size: var(--step-0); letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.tile .tags { margin-top: 2px; }

/* Latest: label column on the left, two card columns on the right */
.latest-layout {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  column-gap: var(--space-4);
  align-items: start;
}

.latest-label {
  margin: 0;
  font-size: var(--step-1);
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  row-gap: calc(var(--space-4) + 12px);
}

.latest-card__link {
  display: grid;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.latest-card__link:hover {
  text-decoration: none;
}

.latest-card__link:hover h3 {
  text-decoration: underline;
}

.latest-card__link:focus-visible {
  outline: var(--outline);
  outline-offset: 4px;
  border-radius: 16px;
}

.latest-card__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: #111111;
}

.latest-card__visual img,
.latest-card__visual .grad {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.latest-card__body {
  display: grid;
  gap: 6px;
  padding-inline: 1rem;
}

.latest-card h3 {
  margin: 0;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.latest-card .meta {
  color: var(--muted);
  font-size: var(--step--1);
}

.latest-card p {
  margin: 0;
  font-size: var(--step-0);
  color: #e6e6e6;
}

.latest-card .tags {
  margin-top: 4px;
}

@media (max-width: 1199px) {
  .latest-layout {
    display: block;
  }

  .latest-label {
    display: none;
  }
}

@media (max-width: 749px) {
  .latest-grid {
    padding-inline: 1rem;
  }
}

@media (max-width: 849px) {
  .latest-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .latest-card {
    width: 100%;
    max-width: 32rem;
  }

  .latest-card__visual {
    max-height: none;
  }
}

.more-wrap { margin-top: var(--space-4); display: flex; justify-content: center; }
.btn {
  appearance: none; 
  border: 1px solid #2a2a2a; 
  background: var(--pill-bg); 
  color: var(--pill-fg); 
  padding: 8px 16px; 
  border-radius: var(--radius); 
  font-size: var(--step--1); 
  cursor: pointer; 
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { 
  background: #1a1a1a; 
  text-decoration: none;
}
.btn:focus-visible { 
  outline: var(--outline); 
  outline-offset: 2px;
}

/* Add margin above the main "See more work" button */
.more-wrap {
  margin-top: calc(var(--space-4) + 32px);
}

/* Bio content */
.bio-content {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
}

.bio-aside {
  display: none;
}

.bio-content--solo {
  display: block;
  max-width: 660px;
  margin-inline: auto;
  width: 100%;
}

.bio-main {
  width: min(100%, 660px);
  max-width: 660px;
  min-width: 0;
}

/* ----- Bio quotes carousel (future use) -----
.bio-aside {
  display: none;
}

.bio-content .bio-quote {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--space-4) var(--space-3) var(--space-3);
  text-align: center;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
}

.bio-content .bio-quote.is-active {
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.bio-quotes__slides {
  display: grid;
  grid-template-areas: "stack";
  min-width: 0;
}

.bio-quotes__slides .bio-quote {
  grid-area: stack;
  align-self: stretch;
}

.bio-quotes__dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-2);
}

.bio-quotes__dot {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bio-quotes__dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  background: var(--pill-bg);
}

.bio-quotes__dot[aria-selected="true"]::before {
  background: var(--fg);
  border-color: var(--fg);
}

.bio-quotes__dot:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}
----- */

@media (min-width: 1280px) {
  .bio-content--solo {
    max-width: 660px;
  }

  .bio-content--solo .bio-main {
    justify-self: center;
    margin-inline: auto;
  }

  .bio-content:not(.bio-content--solo) {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(200px, 22rem);
    gap: clamp(6rem, 12vw, 14rem);
    align-items: start;
    max-width: 100%;
    margin: 0;
  }

  .bio-content:not(.bio-content--solo) .bio-main {
    justify-self: start;
    width: min(100%, 720px);
    max-width: 720px;
    padding-left: 60px;
  }

  .bio-content:not(.bio-content--solo) .bio-main > p,
  .bio-content:not(.bio-content--solo) .bio-main > h3,
  .bio-content:not(.bio-content--solo) .bio-main > h4,
  .bio-content:not(.bio-content--solo) .bio-main > .more-wrap {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .bio-content:not(.bio-content--solo) .bio-aside {
    display: block;
    width: 100%;
    max-width: 22rem;
    padding-left: 0;
  }

  .bio-main h3.rail-heading {
    display: block;
  }
}

/* ----- Bio right rail ----- */
.rail-section {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid #1e1e1e;
  margin-bottom: var(--space-2);
}

.rail-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.rail-heading {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem 0;
  padding-left: 0;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bio-aside .rail-list {
  padding-left: 0.75rem;
  margin-bottom: 0;
}

.bio-aside .rail-heading {
  padding-left: 0;
  margin-left: 0;
  margin-bottom: var(--space-2);
}

.rail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-item__title {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--fg);
  line-height: 1.45;
}

.rail-item__org {
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.45;
}

.rail-item__date {
  font-size: var(--step--2);
  color: #6a6a6a;
  font-weight: 400;
}

#panel-bio .bio-gallery {
  margin-top: var(--space-5);
  max-width: min(100%, calc(660px + var(--space-5) + 22rem));
  margin-left: auto;
  margin-right: auto;
}

/* ----- Bio quotes carousel (future use) -----
.bio-content .bio-quote .bio-quote__text {
  margin: 0;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: var(--step-0);
  line-height: 1.6;
  color: #b0b0b0;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.bio-quote__mark {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  color: #4a4a4a;
}

.bio-quote__mark--open {
  display: block;
  font-size: 5rem;
  line-height: 0.5;
  margin-bottom: -0.15rem;
}

.bio-quote__attrib {
  display: block;
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: 0.86rem;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.01em;
}

.bio-quote__attrib cite {
  font-style: italic;
}
----- */

.bio-main h3:first-of-type {
  margin-top: 0;
}
.bio-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
  background: #111111;
  margin-bottom: var(--space-4);
}

@media (min-width: 1280px) {
  .bio-photo {
    height: 270px;
  }
}

.bio-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.bio-avatar img {
  width: clamp(80px, 14vw, 130px);
  height: clamp(80px, 14vw, 130px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2a2a2a;
  display: block;
}

.bio-headshot {
  display: block;
  width: fit-content;
  margin-bottom: var(--space-4);
  padding-left: 0.75rem;
}

.bio-headshot img {
  width: clamp(44px, 7vw, 64px);
  height: clamp(44px, 7vw, 64px);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid #2a2a2a;
  display: block;
}

.bio-content h2 {
  font-size: var(--step-3);
  margin: 12px 0 var(--space-3) 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.bio-content h3 {
  font-size: var(--step-1);
  margin: var(--space-4) 0 var(--space-2) 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.bio-content h3.rail-heading {
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  margin: var(--space-4) 0 var(--space-3) 0;
  padding-top: var(--space-3);
  border-top: 1px solid #1e1e1e;
}
.bio-main p {
  text-wrap: pretty;
}

.bio-main h3,
.bio-main p,
.bio-main .more-wrap {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.bio-content p {
  font-size: var(--step-0);
  line-height: 1.6;
  margin: 0 0 var(--space-3) 0;
  color: #e6e6e6;
}
.bio-content ul {
  margin: 0 0 var(--space-3) 0;
  padding-left: var(--space-3);
}
.bio-content li {
  font-size: var(--step-0);
  line-height: 1.6;
  margin-bottom: var(--space-2);
  color: #e6e6e6;
}
.bio-content h3:has(+ ul) {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.bio-content h3:has(+ ul) + ul {
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.focus-areas {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 1280px) {
  .focus-areas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1279px) {
  .bio-main h3.rail-heading,
  .focus-areas {
    display: none;
  }

  .bio-main h3 {
    margin-top: var(--space-5);
  }

  .bio-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.focus-item {
  padding: var(--space-2) var(--space-2) var(--space-3) var(--space-3);
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
}

.focus-item h4 {
  font-size: clamp(0.95rem, 0.88rem + 0.40vw, 1.20rem);
  margin: 0 0 var(--space-2) 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.focus-item p {
  margin: 0;
  font-size: var(--step-0);
  color: #e6e6e6;
  padding-left: 0;
  padding-right: 0;
}

/* Contact content */
.contact-content {
  max-width: 1040px;
  margin: 0 auto;
}

@media (min-width: 751px) {
  .contact-content {
    padding-bottom: 250px;
  }
}

@media (min-width: 751px) and (max-width: 1279px) {
  .bio-content {
    padding-bottom: 250px;
  }
}
.contact-content h2 {
  font-size: var(--step-3);
  margin: 12px 0 var(--space-3) 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.contact-content > p {
  font-size: var(--step-0);
  line-height: 1.6;
  margin: 0 0 var(--space-4) 0;
  color: #e6e6e6;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding-top: 30px;
}
.contact-methods--dual,
.contact-methods--quad {
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
.contact-item {
  padding: var(--space-3);
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
}
.contact-item--card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-4) var(--space-5);
  text-align: center;
}
.contact-item__icon {
  margin-bottom: calc(var(--space-3) / 2);
  flex-shrink: 0;
  text-decoration: none;
}
.contact-item__icon:hover {
  text-decoration: none;
}
.contact-item__icon svg {
  transform: scale(1.05);
}
.contact-item__icon--stroke svg,
.contact-item__icon--stroke svg path,
.contact-item__icon--stroke svg polyline {
  fill: none;
  stroke: #000;
}
.contact-item__icon--stroke svg {
  transform: scale(1.12);
}
.contact-item--card h3 {
  width: 100%;
}
.contact-item--card p {
  width: 100%;
  margin: 0;
  padding-top: var(--space-2);
  word-break: break-word;
}
.contact-item h3 {
  font-size: var(--step-1);
  margin: 0 0 var(--space-2) 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.contact-item p {
  margin: 0;
  font-size: var(--step-0);
  color: #e6e6e6;
}
.contact-item a {
  color: var(--fg);
  text-decoration: none;
}

@media (max-width: 1100px) {
  .contact-item p {
    font-size: var(--step--1);
  }
}
.contact-item a:hover {
  text-decoration: underline;
}
.contact-note {
  padding: var(--space-3);
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
}
.contact-note p {
  margin: 0;
  padding-bottom: 20px;
  font-size: var(--step-0);
  line-height: 1.6;
  color: #e6e6e6;
}
.contact-note strong {
  color: var(--fg);
  font-weight: 600;
}
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: var(--space-2);
}
.social-icons .icon-btn[aria-label="Spotify"] svg {
  transform: scale(1.1);
}

/* Footer */
footer { border-top: 1px solid #2a2a2a; padding: var(--space-5) 0; }
.footer-copy {
  margin: 0 0 var(--space-3) 0;
  text-align: center;
  font-size: var(--step--2);
  color: var(--muted);
  line-height: 1.4;
}
.socials { display: flex; gap: 12px; justify-content: center; }

@media (max-width: 599px) {
  .bio-photo {
    height: 200px;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    width: calc(100% + 1rem);
  }
}

@media (max-width: 749px) {
  .contact-methods--dual,
  .contact-methods--quad {
    grid-template-columns: 1fr;
  }
  .contact-methods {
    padding-top: 0;
  }
  .contact-item--card {
    padding-top: var(--space-3);
  }
  .bio-content, .contact-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .bio-main p,
  .bio-main .more-wrap {
    padding-left: 0;
    padding-right: 0;
  }
  .work-grid {
    padding-left: 0;
    padding-right: 0;
  }
  /* Remove additional margins for Focus areas on mobile */
  .bio-content h3:has(+ ul) {
    padding-left: 0;
    padding-right: 0;
  }
  .bio-content h3:has(+ ul) + ul {
    padding-left: var(--space-3);
  }
  .focus-areas {
    grid-template-columns: 1fr;
  }
}
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius); background: #fff; display: inline-grid; place-items: center; border: none; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: #000; }
.icon-btn:focus-visible { outline: var(--outline); }

/* Utilities */
.tile .tags { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ----- Work project pages ----- */

/* .nav-header replaced by .site-nav — kept as alias for legacy reference */
.nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) 0;
}

.logo {
  font-size: var(--step-0); font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg); text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

/* Work Navigation Menu Bar */
.work-nav-bar {
  display: inline-flex; align-items: center; gap: 0;
  padding: 4px; background: var(--pill-bg); border: 1px solid #2a2a2a;
  border-radius: var(--radius);
}

.nav-button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 0; background: transparent; border: none;
  border-radius: calc(var(--radius) - 2px); color: var(--fg);
  text-decoration: none; transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.nav-button:hover {
  background: #2a2a2a; text-decoration: none;
}

.nav-button:focus-visible { 
  outline: var(--outline); 
  outline-offset: 2px; 
}

.nav-button::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 5px 10px;
  background: #111111;
  color: var(--fg);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.nav-button:hover::after,
.nav-button:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* Mobile and tablet touch-friendly spacing */
@media (max-width: 1024px) {
  .work-nav-bar {
    gap: 8px;
    padding: 6px;
  }
  
  .nav-button {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 600px) {
  .work-nav-bar {
    gap: 6px;
    padding: 4px;
  }
  
  .nav-button {
    width: 42px;
    height: 42px;
  }
  
  .nav-button svg {
    width: 18px;
    height: 18px;
  }
}

/* Project Hero */
.project-hero {
  padding: var(--space-5) 0 var(--space-4);
  text-align: left;
}

@media (min-width: 768px) {
  .project-hero {
    margin-left: 2rem;
    padding-bottom: var(--space-3);
  }
}

@media (max-width: 767px) {
  .project-hero {
    padding-bottom: var(--space-2);
  }
}

.project-title {
  font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 var(--space-1) 0; line-height: 1.1;
}

.project-subtitle {
  font-size: var(--step-1); color: var(--muted); margin: 0 0 var(--space-2) 0;
}

.project-year {
  display: inline-block; padding: 6px 12px; background: var(--pill-bg);
  border: 1px solid #2a2a2a; border-radius: var(--radius);
  font-size: var(--step--1); color: var(--pill-fg); margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
  .project-title {
    text-align: left;
    margin-left: 1rem;
    margin-right: 1rem;
    font-size: var(--step-2);
  }
  
  .project-subtitle {
    text-align: left;
    margin-left: 1rem;
    margin-right: 1rem;
    font-size: var(--step-0);
  }
}

/* Project Info */
.project-info {
  display: grid; gap: var(--space-4); margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .project-info { grid-template-columns: 2fr 1fr; gap: var(--space-5); }
}

.project-description {
  font-size: var(--step-0); line-height: 1.6; color: #e6e6e6;
  margin-left: 2rem; max-width: 55ch;
}

@media (max-width: 767px) {
  .project-description {
    margin-left: 1rem; margin-right: 1rem; max-width: none;
  }
}

.project-meta {
  background: #111111; border: 1px solid #2a2a2a; border-radius: var(--radius-md);
  padding: var(--space-3);
}

.meta-title {
  font-size: var(--step-0); font-weight: 600; margin: 0 0 var(--space-2) 0;
  color: var(--fg);
}

@media (max-width: 767px) {
  .meta-title {
    display: none;
  }
}

.meta-title-2 {
  font-size: var(--step-0); font-weight: 600; margin: 0 0 var(--space-2) 0;
  color: var(--fg);
  display: none;
}

@media (max-width: 767px) {
  .meta-title-2 {
    display: block;
  }
}

.roles-list {
  list-style: none; padding: 0; margin: 0;
}

.roles-list li {
  padding: var(--space-1) 0; border-bottom: 1px solid #2a2a2a;
  font-size: var(--step--1); color: var(--muted);
}

.roles-list li:last-child {
  border-bottom: none;
}

/* Image Gallery */
.gallery {
  margin-bottom: var(--space-5);
}

/* See More Work Section */
.more-work {
  display: flex; justify-content: center;
  padding: var(--space-4) 0 var(--space-5);
}



.gallery-grid {
  display: grid;
  column-gap: var(--space-3);
  row-gap: calc(var(--space-3) + 12px);
}

.gallery-item {
  background: #111111; border: 1px solid #2a2a2a; border-radius: var(--radius-md);
  overflow: hidden; transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
}

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

.gallery-caption {
  padding: var(--space-2); font-size: var(--step--1); color: var(--muted);
  text-align: center;
}

.gallery-item--video .gallery-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.gallery-item--video .gallery-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Alternate gallery style - 75% width */
.gallery-item.alt-width {
  width: 75%;
  margin: 0 auto;
}

/* Use full width on mobile screens */
@media (max-width: 768px) {
  .gallery-item.alt-width {
    width: 100%;
    margin: 0;
  }
}

/* Case Studies (cards below gallery) */
.case-studies {
  margin-bottom: var(--space-5);
  scroll-margin-top: var(--space-5);
}

.case-studies-heading {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-1) 0;
  color: var(--fg);
}

.case-studies-note {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0 0 var(--space-3) 0;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  row-gap: calc(var(--space-4) + 16px);
}

@media (max-width: 1024px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    row-gap: var(--space-4);
  }
}

.case-study-card {
  display: grid;
  gap: 0;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.case-study-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
  text-decoration: none;
}

.case-study-card:hover .case-study-btn {
  background: #2a2a2a;
  color: var(--fg);
}

.case-study-card:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}

.case-study-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
}

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

.case-study-body {
  padding: var(--space-2) var(--space-3);
  display: grid;
  gap: var(--space-2);
}

.case-study-title {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
  color: var(--fg);
}

.case-study-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--pill-bg);
  border: 1px solid #2a2a2a;
  color: var(--pill-fg);
  font-size: var(--step--2);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  width: fit-content;
}

.case-study-btn:focus-visible {
  outline: none;
}

.case-study-btn svg {
  flex-shrink: 0;
}


html.work .btn {
  gap: 8px;
}

@media (max-width: 767px) {
  .hide-on-mobile {
    display: none;
  }
}
