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

:root {
  --cream: #f9f6f1;
  --warm-white: #fdfcfa;
  --sand: #ede8df;
  --sand-strong: #d8cab7;
  --stone: #c9bfb0;
  --ink: #1a1814;
  --ink-light: #4a4540;
  --ink-muted: #8a8278;
  --accent: #c17f4a;
  --accent-light: #e8c99e;
  --accent-deep: #9e6438;
  --content-max: 1100px;
  --content-pad: clamp(24px, 5vw, 60px);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  background: var(--warm-white);
  color: var(--ink);
  font-weight: 300;
  overflow-x: hidden;
}

body::before {
  content: none;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.work-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px var(--content-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 252, 247, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(216, 202, 183, 0.75);
}

.nav-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a.active {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.nav-links .nav-cta {
  padding: 9px 22px;
  background: var(--ink);
  color: var(--warm-white);
  border-bottom: none;
  transition: background 0.2s ease;
}

.nav-links .nav-cta:hover {
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.page-header,
.filter-bar,
.archive-section {
  padding-left: max(var(--content-pad), calc((100vw - var(--content-max)) / 2));
  padding-right: max(var(--content-pad), calc((100vw - var(--content-max)) / 2));
}

.page-header {
  padding-top: 160px;
  padding-bottom: 100px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  display: block;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  opacity: 0.3;
  pointer-events: none;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: 100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  opacity: 0.2;
  pointer-events: none;
}

.header-left {
  position: relative;
  z-index: 1;
}

.page-label {
  display: block;
  margin-bottom: 20px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s 0.1s forwards;
}

.header-left h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.25s forwards;
}

.header-left h1 em {
  font-style: italic;
  color: var(--accent);
}

.filter-bar {
  position: sticky;
  top: 65px;
  z-index: 50;
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.filter-tabs {
  display: flex;
  gap: 0;
}

.filter-tab {
  padding: 18px 24px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.filter-tab:hover {
  color: var(--ink);
}

.filter-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--sand);
  padding: 9px 16px;
  background: var(--cream);
}

.filter-search svg {
  color: var(--stone);
  flex-shrink: 0;
}

.filter-search input {
  width: 200px;
  border: none;
  background: none;
  outline: none;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 300;
}

.filter-search input::placeholder {
  color: var(--stone);
}

.archive-section {
  padding-top: 36px;
  padding-bottom: 160px;
}

.archive-empty {
  padding: 28px 30px;
  margin-bottom: 24px;
  border: 1px solid rgba(216, 202, 183, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.archive-empty[hidden] {
  display: none;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.archive-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  padding: 28px;
  border-radius: 30px;
  border: 0.25px solid rgba(216, 202, 183, 0.86);
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.archive-item[hidden] {
  display: none;
}

.archive-item::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: none;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.archive-item:hover {
  transform: translateY(-8px);
  border-color: rgba(193, 127, 74, 0.46);
}

.archive-item:hover::after {
  transform: scale(1.06);
  opacity: 0.85;
}

.archive-item:focus-visible {
  outline-color: var(--project-accent, var(--accent));
}

.archive-item-more {
  width: 100%;
  text-align: left;
  appearance: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border: 0.25px solid rgba(216, 202, 183, 0.86);
  background: rgba(255, 255, 255, 0.92);
}

.span-7 {
  grid-column: span 1;
  min-height: 320px;
}

.span-8 {
  grid-column: span 1;
  min-height: 320px;
}

.span-5 {
  grid-column: span 1;
}

.span-4 {
  grid-column: span 1;
}

.archive-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.archive-meta-left {
  display: flex;
  align-items: center;
  gap: 0;
}

.archive-index {
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  line-height: 0.85;
  color: rgba(23, 20, 16, 0.34);
}

.archive-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(23, 20, 16, 0.06);
  color: var(--project-accent, var(--accent));
  font-size: 19px;
  line-height: 1;
  transition: transform 0.24s ease, background 0.24s ease;
}

.archive-item:hover .archive-arrow {
  transform: translate(2px, -2px);
  background: rgba(23, 20, 16, 0.1);
}

.archive-main {
  margin-top: 34px;
}

.archive-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--project-accent, var(--accent-deep));
}

.archive-title {
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(32px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.featured .archive-title,
.span-8 .archive-title,
.span-7 .archive-title {
  font-size: clamp(32px, 3.2vw, 46px);
}

.archive-summary {
  max-width: 34ch;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-light);
}

.span-4 .archive-summary {
  max-width: 28ch;
}

.archive-footer {
  margin-top: 30px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

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

.archive-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(216, 202, 183, 0.86);
  background: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .span-7,
  .span-5,
  .span-4,
  .span-8 {
    grid-column: span 6;
    min-height: 340px;
  }

  .featured {
    min-height: 340px;
  }
}

@media (max-width: 960px) {
  .work-nav {
    padding: 18px 24px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    min-width: 220px;
    padding: 14px 16px;
    flex-direction: column;
    gap: 12px;
    border-radius: 18px;
    background: rgba(255, 252, 247, 0.95);
    border: 1px solid var(--sand);
    backdrop-filter: blur(12px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-cta {
    padding: 0;
    background: transparent;
    color: inherit;
    border-bottom: 0;
  }

  .nav-links .nav-cta:hover {
    background: transparent;
    color: var(--ink);
  }

  .page-header,
  .filter-bar,
  .archive-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .page-header {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .filter-bar {
    padding: 0 24px;
    overflow-x: auto;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .filter-search {
    display: none;
  }

  .archive-section {
    padding-top: 28px;
    padding-bottom: 90px;
  }

  .archive-item {
    padding: 24px;
    border-radius: 26px;
  }

}

@media (max-width: 720px) {
  .archive-list {
    grid-template-columns: 1fr;
  }

  .span-7,
  .span-5,
  .span-4,
  .span-8 {
    grid-column: 1 / -1;
    min-height: unset;
  }

  .archive-item,
  .featured {
    min-height: 300px;
  }

  .archive-meta-left {
    gap: 10px;
  }

  .archive-index {
    font-size: 36px;
  }

  .archive-title,
  .featured .archive-title,
  .span-7 .archive-title,
  .span-8 .archive-title {
    font-size: clamp(36px, 12vw, 48px);
  }

  .archive-footer {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page-label,
  .header-left h1,
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .archive-item,
  .archive-item::after,
  .archive-arrow,
  .filter-tab,
  .nav-toggle span {
    transition: none;
  }
}
