@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg: #0b0b0b;
  --bg-alt: #121212;
  --fg: #ededea;
  --fg-dim: #9a9a95;
  --line: #2a2a28;
  --accent: #c9c4b8;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}

.site-header .logo {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.site-nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 2px;
}

/* Uniform "tab" look shared by Home / Work / About so they sit at the same
   height and line up regardless of whether they're a link or the dropdown
   label. The hover-fill box runs the full header height (flush to the top
   of the page), while the active-page line is a separate, independently
   positioned mark that stays right under the text regardless of box height. */
.site-nav > a,
.dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.75;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  background: transparent;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.site-nav > a:hover,
.nav-item:hover > .dropdown-toggle {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.site-nav > a::before,
.dropdown-toggle::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  margin-top: 18px;
  height: 1px;
  background: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-nav > a.active,
.dropdown-toggle.active {
  opacity: 1;
}

.site-nav > a.active::before,
.dropdown-toggle.active::before {
  opacity: 1;
}

.nav-item {
  position: relative;
  display: flex;
}

.nav-checkbox {
  display: none;
}

.dropdown-toggle {
  cursor: default;
}

.dropdown-toggle::after {
  content: '▾';
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  transition: transform 0.25s ease;
}

.nav-item:hover > .dropdown-toggle::after,
.dropdown-toggle.active::after {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 110;
}

/* Literally the same transparent tint as the tab hover fill (no blur) —
   that's what makes WORK's own highlight read as "glass": it's just a
   sheer wash over the sharp photo, not a frosted/blurred panel. */
.dropdown-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: none;
  padding: 0;
  min-width: 200px;
}

.dropdown-inner a {
  display: block;
  padding: 14px 16px;
  opacity: 0.75;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.dropdown-inner a:hover,
.dropdown-inner a.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.10);
}

/* Hover reveals it on any pointer-capable screen; the checkbox (toggled by
   tapping the label) covers touch devices where hover doesn't apply. Both
   are active at every width so neither mechanism blocks the other. */
.nav-item:hover .dropdown,
.nav-checkbox:checked ~ .dropdown {
  opacity: 1;
  visibility: visible;
}

.nav-checkbox:checked ~ .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%) blur(0px);
  transform: scale(1.06);
  will-change: filter;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 48px 72px;
  width: 100%;
}

.hero-content .kicker {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-content h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.02;
  color: #fff;
  max-width: 900px;
}

.hero-content p {
  margin-top: 20px;
  max-width: 480px;
  font-size: 15px;
  color: #d8d6cf;
}

/* ---------- Page header (non-hero pages) ---------- */
.page-head {
  padding: 168px 48px 64px;
  max-width: 1000px;
}

.page-head .kicker {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 58px);
  margin-bottom: 24px;
}

.page-head p {
  color: var(--fg-dim);
  font-size: 16px;
  max-width: 620px;
}

/* ---------- Sections ---------- */
.section {
  padding: 40px 48px 120px;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-intro .label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-intro h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.5vw, 38px);
  margin-bottom: 16px;
}

.section-intro p {
  color: var(--fg-dim);
  font-size: 15.5px;
}

/* ---------- Featured pair (two large images side by side) ---------- */
.gallery-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.gallery-feature figure {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.gallery-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}

.gallery-feature figure:hover img {
  transform: scale(1.025);
}

.gallery-feature figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-feature figure:hover figcaption {
  opacity: 1;
}

@media (max-width: 700px) {
  .gallery-feature { grid-template-columns: 1fr; }
}

/* ---------- Masonry gallery ---------- */
.gallery {
  column-count: 3;
  column-gap: 18px;
}

.gallery figure {
  break-inside: avoid;
  margin: 0 0 18px;
  position: relative;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.4s ease;
}

.gallery figure:hover img {
  transform: scale(1.025);
}

.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery figure:hover figcaption {
  opacity: 1;
}

@media (max-width: 900px) {
  .gallery { column-count: 2; }
}
@media (max-width: 560px) {
  .gallery { column-count: 1; }
}

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 48px;
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  padding: 0 48px 140px;
  align-items: start;
}

.about-grid img {
  position: sticky;
  top: 120px;
}

.about-body p {
  margin-bottom: 20px;
  color: var(--fg-dim);
  font-size: 16px;
  max-width: 540px;
}

.about-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 40px 0 14px;
  color: var(--fg);
}

.credit-list {
  list-style: none;
}

.credit-list li {
  display: flex;
  justify-content: space-between;
  max-width: 540px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg-dim);
}

.credit-list li span:first-child {
  color: var(--fg);
}

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid img { position: static; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-dim);
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 640px) {
  .site-header { padding: 20px 22px; }
  .page-head { padding: 130px 22px 48px; }
  .section { padding: 20px 22px 80px; }
  .about-grid { padding: 0 22px 100px; }
  .site-footer { padding: 28px 22px; flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .nav-item { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
  .dropdown-toggle { cursor: pointer; }

  /* No hover on touch, so it collapses to closed by default and opens on
     tap (via the checkbox). Uses max-height instead of the desktop
     position:absolute panel, so it pushes the rest of the stacked nav
     down rather than floating over it. */
  .dropdown {
    position: static;
    max-height: 0;
    overflow: hidden;
    transform: none;
    padding-top: 0;
    transition: opacity 0.2s ease, max-height 0.25s ease;
  }
  .dropdown-inner {
    border: none;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 0 0 0 16px;
    gap: 12px;
  }
  .nav-item:hover .dropdown,
  .nav-checkbox:checked ~ .dropdown {
    max-height: 200px;
    padding-top: 12px;
  }
}
