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

:root {
  --bg: #181818;
  --surface: #1f1f1f;
  --border: #2b2b2b;
  --text: #b1b1b1;
  --text-muted: #8f8f8f;
  --white: #fff;
  --cream: #f7f4be;
  --cream-faint: rgba(247, 244, 190, 0.13);
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Menlo', monospace;
  --sidebar-w: 280px;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border) var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

::selection { background: var(--cream); color: #111; }

img, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }


/* -------------------------------------------------- sidebar */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh; height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 38px 28px 32px;
}

.sidebar-top { margin-bottom: 56px; }

.sidebar-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  letter-spacing: -0.01em;
}

.sidebar-tagline {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.sidebar-nav { flex: 1; }

.sidebar-nav-links {
  display: flex;
  flex-direction: column;
}

.sidebar-nav-links li {}

.sidebar-nav-links li a {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 9px 0;
  transition: color .15s;
}

.sidebar-nav-links li a:hover { color: var(--white); }

.sidebar-nav-links .current-menu-item > a,
.sidebar-nav-links .current_page_item > a,
.sidebar-nav-links .current-menu-ancestor > a {
  color: var(--cream);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.sidebar-bottom a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: color .15s;
}

.sidebar-bottom a:hover { color: var(--cream); }


/* -------------------------------------------------- topbar (mobile only) */

.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.topbar-logo {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--white);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  width: 18px; height: 1px;
  background: var(--white);
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  transform-origin: center;
}

.mobile-menu-btn.active .hamburger-line:first-child {
  transform: translateY(3px) rotate(45deg);
}
.mobile-menu-btn.active .hamburger-line:last-child {
  transform: translateY(-3px) rotate(-45deg);
}


/* -------------------------------------------------- layout */

.site-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.container {
  max-width: 920px;
  padding-left: 38px;
  padding-right: 38px;
}

.container--narrow {
  max-width: 620px;
  padding-left: 38px;
  padding-right: 38px;
}


/* -------------------------------------------------- skip + a11y */

.skip-link {
  position: absolute;
  top: -100%; left: 16px;
  z-index: 9999;
  padding: 6px 14px;
  background: var(--cream);
  color: #111;
  font-family: var(--mono);
  font-size: 11px;
}
.skip-link:focus { top: 16px; }

.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;
}


/* -------------------------------------------------- hero */

.hero {
  padding: 72px 38px 48px;
  max-width: 920px;
}

.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 84px);
  color: var(--white);
  letter-spacing: -0.035em;
  line-height: .92;
}

.hero-role {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  letter-spacing: .3px;
}

.scroll-hint { display: none; }


/* -------------------------------------------------- spreads */

.featured-projects {
  padding: 0 38px 32px;
  max-width: 920px;
}

.spread { margin-bottom: 56px; }

.spread--full,
.spread--left,
.spread--right { display: block; }

.spread--full .spread-image,
.spread--left .spread-image,
.spread--right .spread-image {
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface);
}

.spread--right .spread-content { order: unset; }

.spread-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.16,1,.3,1);
}

.spread:hover .spread-img { transform: scale(1.02); }

.spread-img-placeholder {
  width: 100%; height: 100%;
  background: var(--surface);
}

.spread-content { padding: 14px 0 0; }

.spread-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.spread-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 19px;
  color: var(--white);
  margin-top: 3px;
  line-height: 1.3;
}

.spread-title a {
  color: inherit;
  transition: color .15s;
}
.spread-title a:hover { color: var(--cream); }


/* -------------------------------------------------- home about */

.home-about {
  padding: 56px 38px 72px;
  max-width: 920px;
}

.home-about-text {
  font-size: 16px;
  line-height: 1.65;
  max-width: 480px;
}

.text-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 18px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  transition: color .15s, border-color .15s;
}
.text-link:hover {
  color: var(--cream);
  border-color: var(--cream);
}


/* -------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 38px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 920px;
}

.footer-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-name {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-sep { color: var(--border); }

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.footer-right { display: flex; gap: 20px; }

.footer-right a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: color .15s;
}
.footer-right a:hover { color: var(--cream); }


/* -------------------------------------------------- page header */

.page-header {
  padding-top: 72px;
  padding-bottom: 36px;
}

.page-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(34px, 5.5vw, 64px);
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: .95;
}


/* -------------------------------------------------- archive */

.projects-archive { padding-bottom: 56px; }

.projects-masonry {
  column-count: 2;
  column-gap: 18px;
}

.project-card {
  break-inside: avoid;
  margin-bottom: 18px;
}

.project-card-link {
  display: block;
  overflow: hidden;
}

.project-card-img {
  width: 100%;
  display: block;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.project-card-link:hover .project-card-img { transform: scale(1.02); }

.project-card-img-placeholder {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--surface);
}

.project-card-info { padding: 11px 0 6px; }

.project-card-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  transition: color .15s;
}
.project-card-link:hover .project-card-title { color: var(--cream); }

.project-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}


/* -------------------------------------------------- single project */

.single-project { padding-bottom: 72px; }

.project-header {
  padding-top: 72px;
  padding-bottom: 36px;
}

.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color .15s;
}
.back-link:hover { color: var(--cream); }

.project-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 58px);
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: .95;
}

.project-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
}

.project-meta-line span:not(:first-child)::before {
  content: '\00B7';
  margin-right: 8px;
}

.project-hero-image {
  width: 100%;
  max-height: 62vh;
  overflow: hidden;
  margin: 36px 0;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body p {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-body h2 {
  font-weight: 700;
  font-size: 21px;
  color: var(--white);
  margin-top: 44px;
  margin-bottom: 12px;
}

.project-body h3 {
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
  margin-top: 32px;
  margin-bottom: 10px;
}

.project-body img {
  width: 100%;
  margin: 28px 0;
  display: block;
}

.project-body blockquote {
  border-left: 2px solid var(--cream);
  padding-left: 20px;
  color: var(--text);
  font-style: italic;
  margin: 26px 0;
}

.project-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
  padding: 2px 5px;
}

.project-body pre {
  background: var(--surface);
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 26px 0;
}
.project-body pre code { background: none; padding: 0; }

.project-body ul,
.project-body ol { margin-bottom: 20px; padding-left: 20px; }
.project-body ul { list-style: disc; }
.project-body ol { list-style: decimal; }
.project-body li { line-height: 1.75; margin-bottom: 6px; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.project-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 4px 10px;
  letter-spacing: .3px;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.project-nav-prev { text-align: left; }
.project-nav-next { text-align: right; margin-left: auto; }

.project-nav-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 3px;
}

.project-nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color .15s;
}
.project-nav a:hover { color: var(--cream); }


/* -------------------------------------------------- about */

.about-section { padding-bottom: 56px; }

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  align-items: start;
}

.about-photo-img {
  width: 220px;
  height: 300px;
  object-fit: cover;
}

.about-content p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-content h2 {
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-top: 36px;
  margin-bottom: 10px;
}

.about-content h3 {
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  margin-top: 26px;
  margin-bottom: 8px;
}


/* -------------------------------------------------- contact */

.contact-section { padding-bottom: 56px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 52px;
}

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

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color .15s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group textarea:focus { border-color: var(--cream); }

.form-group textarea { min-height: 120px; resize: vertical; }

.contact-info-block { margin-bottom: 22px; }

.contact-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 3px;
}

.contact-info a {
  font-size: 14px;
  color: var(--text);
  transition: color .15s;
}
.contact-info a:hover { color: var(--cream); }


/* -------------------------------------------------- 404 */

.error-page {
  min-height: 65vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.error-inner { text-align: center; }

.error-code {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(72px, 14vw, 180px);
  color: var(--white);
  opacity: .04;
  line-height: .85;
}

.error-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: -14px;
  position: relative;
}


/* -------------------------------------------------- buttons */

.btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  height: 40px;
  padding: 0 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background .15s, color .15s;
}

.btn-primary {
  background: var(--cream);
  color: #111;
}
.btn-primary:hover {
  background: var(--white);
}


/* -------------------------------------------------- cursor */

.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  margin-left: -4px;
  margin-top: -4px;
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}

.cursor.cursor--active .cursor-dot {
  transform: scale(4.5);
  opacity: .25;
}

.cursor.cursor--view .cursor-dot {
  transform: scale(6);
  opacity: .18;
}

.cursor-circle,
.cursor-label { display: none; }


/* -------------------------------------------------- reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s, transform .5s cubic-bezier(.22,1,.36,1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-words] { opacity: 1; }

.word { overflow: hidden; display: inline-block; }

.word-inner {
  display: inline-block;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.word-inner.revealed { transform: translateY(0); }


/* -------------------------------------------------- pagination */

.pagination { margin-top: 44px; text-align: center; }
.pagination .nav-links { display: inline-flex; }

.pagination .page-numbers {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  margin-left: -1px;
  color: var(--text-muted);
  transition: all .15s;
}

.pagination .page-numbers:hover {
  border-color: var(--text-muted);
  color: var(--white);
  z-index: 1;
}

.pagination .page-numbers.current {
  background: var(--cream);
  border-color: var(--cream);
  color: #111;
  z-index: 1;
}


/* -------------------------------------------------- misc */

.no-results {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 72px 0;
}

.wp-block-image img { max-width: 100%; height: auto; }
.alignfull { width: 100%; }


/* -------------------------------------------------- mobile */

@media (max-width: 810px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }

  .topbar { display: flex; }

  .site-content {
    margin-left: 0;
    padding-top: 52px;
  }

  .hero { padding: 36px 20px 32px; }
  .featured-projects { padding-left: 20px; padding-right: 20px; }
  .home-about { padding: 40px 20px 56px; }

  .container,
  .container--narrow { padding-left: 20px; padding-right: 20px; }

  .site-footer { padding-left: 20px; padding-right: 20px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo-img { width: 100%; max-width: 260px; height: 340px; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { order: -1; }

  .projects-masonry { column-count: 1; }

  .project-nav { flex-direction: column; gap: 18px; }
  .project-nav-next { text-align: left; margin-left: 0; }

  .footer-inner { flex-direction: column; text-align: center; gap: 10px; }
  .footer-left { flex-direction: column; gap: 4px; }
  .footer-sep { display: none; }
  .footer-right { justify-content: center; }
}


/* -------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .word-inner { transform: none; }
  .cursor { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor { display: none; }
}
