:root {
  --bg: #242225;
  --panel: #1d1b1e;
  --line: #514d53;
  --text: #e8e4e6;
  --muted: #a9a3a8;
  --tab: #3b373d;
  --tab-active: #6f6871;
  --max-width: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(calc(100% - 80px), var(--max-width));
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);

  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  font-size: 13px;
  color: #d7d2d5;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 8px;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  color: var(--text);
  background: #353136;
  outline: none;
}

main {
  padding: 18px 22px 28px;
}

.hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #111;
  border: 1px solid #2a272b;
}

.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.06) 0 58%, rgba(0,0,0,0.56) 76%, rgba(0,0,0,0.75) 100%),
    url("assets/images/Hero.png") left center / 62% auto no-repeat,
    #121212;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 58px 48px 32px;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 54px);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0.34em;
}

.hero-copy p {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  color: #c8c3c6;
}

.portfolio {
  margin-top: 16px;
}

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid #817a83;
}

.filter-button {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 11px 16px 10px;
  background: var(--tab);
  color: #c4bec3;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible {
  color: white;
  background: #4a454b;
  outline: none;
}

.filter-button.is-active {
  background: var(--tab-active);
  color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(28px, 3.5vw, 52px);
  padding: 30px clamp(24px, 3vw, 44px) 24px;
  border-left: 1px solid #817a83;
  border-right: 1px solid #817a83;
}

.project-card[hidden] {
  display: none;
}

.project-card a {
  display: block;
  text-decoration: none;
}

.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #111;
}

.project-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0 12px;
}

.project-meta h2,
.project-meta p {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
}

.project-meta h2 {
  color: #d7d2d5;
}

.project-meta p {
  color: #8f898e;
}

.project-card img {
  transition: opacity 160ms ease, transform 160ms ease;
}

.project-card a:hover img,
.project-card a:focus-visible img {
  opacity: 0.88;
  transform: translateY(-1px);
}

.project-card a:focus-visible {
  outline: 1px solid #aaa3aa;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .site-shell {
    width: calc(100% - 28px);
    margin: 0 auto;
  }

  .site-header {
    height: auto;
    min-height: 56px;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .main-nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero,
  .hero-copy {
    min-height: 300px;
  }

  .hero-art {
    background-size: 76% auto;
    background-position: left center;
  }

  .hero-copy {
    padding: 38px 28px 26px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  main {
    padding: 14px;
  }

  .site-shell {
    width: 100%;
    margin: 0;
    min-height: 100vh;
  }

  .main-nav {
    width: 100%;
    gap: 8px;
  }

  .hero,
  .hero-copy {
    min-height: 420px;
  }

  .hero-art {
    background:
      linear-gradient(0deg, rgba(0,0,0,0.76) 0 26%, rgba(0,0,0,0.08) 56%),
      url("assets/images/Hero.png") center 30% / cover no-repeat,
      #111;
  }

  .hero-copy {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    gap: 18px;
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .filter-row {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    white-space: nowrap;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    padding-inline: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* Uploaded full-width artwork; keep its original composition. */
.hero { min-height: 0; aspect-ratio: 1657 / 470; }
.hero-art { background: #121212 url("assets/images/Hero.png") center / cover no-repeat; }
.hero-copy { min-height: 0; height: 100%; padding: clamp(22px, 4vw, 58px) clamp(20px, 3.3vw, 48px) clamp(18px, 2.2vw, 32px); }
.hero-copy h1 { font-size: clamp(24px, 2.6vw, 42px); }
.hero-copy p { font-size: clamp(11px, 1vw, 14px); }

.about-page { padding: clamp(32px, 5vw, 76px) clamp(24px, 6vw, 90px) clamp(40px, 6vw, 90px); }
.about-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); gap: 28px clamp(32px, 4.5vw, 68px); max-width: 1100px; margin: 0 auto; align-items: start; }
.about-portrait { margin: 0; }
.about-portrait img { display: block; width: 100%; height: auto; background: var(--panel); }
.about-copy { min-width: 0; padding-top: 8px; }
.about-copy h1 { margin: 0 0 18px; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.25; letter-spacing: 0.28em; font-weight: 400; }
.about-role { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.about-bio p { margin: 0 0 20px; font-size: 16px; line-height: 1.8; }
.about-location { margin: 32px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.about-contact { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid var(--line); }
.about-contact h2 { margin: 0 0 20px; font-size: 14px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: 18px 42px; }
.contact-links a { font-size: 16px; text-decoration: none; padding: 8px 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.contact-links a:hover { border-color: var(--text); }
.contact-links a:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; }
.contact-pending { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
@media (max-width: 900px) {
  .hero { min-height: 250px; }
  .hero-copy { min-height: 250px; }
}
@media (max-width: 700px) {
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-portrait { width: min(100%, 380px); }
  .about-copy { padding-top: 0; }
  .about-copy h1 { font-size: 30px; }
  .about-contact { grid-column: auto; padding-top: 24px; }
}
@media (max-width: 620px) {
  .hero { aspect-ratio: auto; min-height: 0; }
  .hero-art { position: relative; height: auto; aspect-ratio: 1657 / 470; background: #121212 url("assets/images/Hero.png") center / contain no-repeat; }
  .hero-copy { min-height: 0; height: auto; padding: 24px; gap: 18px; background: #121212; }
  .hero-copy h1 { font-size: 28px; }
  .hero-copy p { font-size: 12px; line-height: 1.5; }
}

/* Portfolio category disclosure in the shared header. */
.portfolio-menu { position: relative; }
.portfolio-menu summary {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; color: var(--muted); font-size: 12px;
  cursor: pointer; list-style: none;
}
.portfolio-menu summary::-webkit-details-marker { display: none; }
.portfolio-menu summary::after {
  content: ""; width: 5px; height: 5px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.portfolio-menu[open] summary::after { transform: translateY(1px) rotate(225deg); }
.portfolio-menu summary:hover, .portfolio-menu summary:focus-visible,
.portfolio-menu[open] summary, .portfolio-menu.is-active summary {
  color: var(--text); background: #353136;
}
.portfolio-menu summary:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }
.portfolio-options {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 101;
  width: 190px; max-width: calc(100vw - 40px); padding: 6px;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.main-nav .portfolio-options a { display: block; padding: 12px; font-size: 14px; }

/* Keep category tabs visible below the sticky navigation after a jump. */
.portfolio { scroll-margin-top: 120px; }

/* Keep the more spacious square-cover layout comfortable on smaller screens. */
@media (max-width: 900px) {
  .portfolio-grid { gap: 30px 28px; padding: 26px 24px 24px; }
}
@media (max-width: 620px) {
  .portfolio-grid { gap: 28px; padding: 24px 16px; }
}

/* Contact icons follow the existing monochrome palette. */
.contact-links a { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.contact-links a span { min-width: 0; }
.contact-icon { width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted); }
.contact-links a:hover .contact-icon, .contact-links a:focus-visible .contact-icon { color: var(--text); }
