/* =========================================================
   Tokens — change these to restyle the site
   ========================================================= */
:root {
  --bg: #0e0d0c;
  --bg-raised: #181614;
  --bg-card: #141210;
  --bg-visual: #211e1b;
  --text: #f7f2eb;
  --muted: #b7b0a6;
  --accent: #e08a4f;
  --accent-bright: #f0a06a;
  --accent-text: #f0b48a;
  --ink: #1c120c;
  --line: rgba(247, 242, 235, 0.12);
  --line-strong: rgba(247, 242, 235, 0.22);
  --header-height: 4.5rem;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --font-serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
.logo {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1,
h2 {
  text-wrap: balance;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: #3a342e;
  border: 2px solid var(--bg);
  border-radius: 99px;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.eyebrow,
.group-label {
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.logo,
.nav-toggle {
  position: relative;
  z-index: 2;
}

.logo {
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-box {
  display: grid;
  width: 16px;
  height: 11px;
  align-content: space-between;
}

.nav-toggle-box span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

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

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--text);
}

.site-nav a[aria-current="true"] {
  box-shadow: inset 0 -1px 0 var(--accent);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(3.5rem, 10vh, 6.5rem) 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(42rem, 90vw);
  height: min(42rem, 90vw);
  right: -10rem;
  top: -16rem;
  background: radial-gradient(circle, rgba(224, 138, 79, 0.18), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  width: 100%;
}

.hero h1 {
  margin-top: 0.75rem;
  font-size: clamp(3rem, 6.2vw, 5.5rem);
  line-height: 0.98;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.lede,
.section-intro {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.lede {
  max-width: 38rem;
  margin-top: 1.35rem;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent);
  color: var(--ink);
}

.button-primary:hover {
  background: var(--accent-bright);
}

.button-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 32rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(224, 138, 79, 0.08), transparent 28%),
    linear-gradient(180deg, #1e1b18, #121110);
  box-shadow: var(--shadow);
}

.hero-panel-top,
.project-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.hero-panel-top {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel > p {
  color: var(--muted);
  font-size: 0.95rem;
}

.composition {
  position: relative;
  flex: 1;
  min-height: 18rem;
}

.shape {
  position: absolute;
}

.shape-frame {
  width: 62%;
  height: 76%;
  left: 4%;
  top: 8%;
  border: 1px solid rgba(247, 242, 235, 0.28);
  border-radius: 18px;
}

.shape-block {
  width: 48%;
  height: 56%;
  right: 6%;
  top: 20%;
  border: 1px solid rgba(247, 242, 235, 0.08);
  border-radius: 16px;
  background: linear-gradient(160deg, #2c2622, #171412);
}

.shape-orb {
  width: 5.75rem;
  height: 5.75rem;
  left: 26%;
  bottom: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6c7a4, var(--accent) 46%, #a85a2c);
  box-shadow: 0 16px 40px rgba(224, 138, 79, 0.28);
}

.shape-card {
  right: 8%;
  bottom: 10%;
  width: min(11rem, 46%);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(247, 242, 235, 0.14);
  border-radius: 14px;
  background: rgba(14, 13, 12, 0.78);
  color: var(--muted);
  font-size: 0.85rem;
}

.shape-card strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  scroll-margin-top: 5.5rem;
}

.hero {
  scroll-margin-top: 5.5rem;
}

.section-heading {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-heading h2,
.contact-panel h2 {
  margin-top: 0.7rem;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
}

.section-intro {
  max-width: 38rem;
  margin-top: 1rem;
}

.about-grid,
.contact-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-copy p + p {
  margin-top: 1rem;
}

.group + .group {
  margin-top: 2rem;
}

.group-label {
  margin-bottom: 0.9rem;
}

.meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

/* =========================================================
   Projects
   ========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-visual {
  position: relative;
  height: 15.5rem;
  overflow: hidden;
  background: var(--bg-visual);
}

.project-visual span {
  position: absolute;
  z-index: 1;
  left: 1.25rem;
  bottom: 1rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
}

.project-visual::before,
.project-visual::after {
  content: "";
  position: absolute;
}

.visual-north::before {
  width: 16rem;
  height: 16rem;
  right: -4rem;
  top: -5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 138, 79, 0.95), rgba(224, 138, 79, 0.05) 70%);
}

.visual-north::after {
  left: 12%;
  right: 18%;
  top: 42%;
  height: 1px;
  background: rgba(247, 242, 235, 0.35);
}

.visual-atlas::before,
.visual-atlas::after {
  left: 50%;
  top: 46%;
  translate: -50% -50%;
}

.visual-atlas::before {
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(247, 242, 235, 0.28);
  border-radius: 50%;
}

.visual-atlas::after {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.visual-lumen::before {
  inset: 18% 22% auto;
  height: 64%;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(247, 242, 235, 0.16) 18% 19%, transparent 19% 48%, var(--accent) 48% 52%, transparent 52%);
}

.visual-lumen::after {
  left: 16%;
  right: 16%;
  bottom: 22%;
  height: 1px;
  background: rgba(247, 242, 235, 0.28);
}

.visual-field::before {
  width: 70%;
  height: 70%;
  left: -8%;
  bottom: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 138, 79, 0.45), transparent 68%);
}

.visual-field::after {
  width: 7rem;
  height: 9rem;
  right: 12%;
  top: 16%;
  border: 1px solid rgba(247, 242, 235, 0.3);
  border-radius: 12px;
}

.project-body {
  display: grid;
  gap: 0.55rem;
  padding: 1.25rem 1.3rem 1.4rem;
}

.project-topline h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project-topline p,
.project-tag {
  color: var(--muted);
  font-size: 0.92rem;
}

.project-tag {
  color: var(--accent-text);
}

/* =========================================================
   Contact and footer
   ========================================================= */
.contact-panel {
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(224, 138, 79, 0.16), transparent 42%),
    var(--bg-raised);
}

.contact-email {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: inset 0 -1px 0 var(--accent);
}

.contact-email:hover {
  color: var(--accent-text);
}

.contact-meta {
  margin-top: 0.9rem;
  color: var(--muted);
}

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

.social-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-list a:hover {
  color: var(--accent-text);
}

.social-list a span[aria-hidden="true"] {
  transition: transform 0.2s ease;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================================
   Motion
   ========================================================= */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > *,
.hero-panel {
  animation: rise 0.9s ease both;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.28s; }
.hero-panel { animation-delay: 0.22s; }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.project-grid .reveal:nth-child(2) { --d: 80ms; }
.project-grid .reveal:nth-child(3) { --d: 140ms; }
.project-grid .reveal:nth-child(4) { --d: 200ms; }

@media (hover: hover) {
  .project-card:hover {
    border-color: rgba(224, 138, 79, 0.7);
    transform: translateY(-4px);
  }

  .project-card:hover .project-visual::before,
  .project-card:hover .project-visual::after {
    transform: scale(1.05);
  }

  .social-list a:hover span[aria-hidden="true"] {
    transform: translate(3px, -3px);
  }
}

.project-visual::before,
.project-visual::after {
  transition: transform 0.6s ease;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-panel {
    min-height: 28rem;
  }
}

@media (max-width: 760px) {
  .js .nav-toggle {
    display: grid;
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 1.35rem;
  }

  .js .site-nav a {
    color: var(--text);
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 10vw, 3.25rem);
    letter-spacing: -0.03em;
  }

  .js .site-nav a[aria-current="true"] {
    box-shadow: none;
    color: var(--accent-text);
  }
}

@media (max-width: 680px) {
  .project-grid,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .project-visual {
    height: 13rem;
  }

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

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

  .hero-copy > *,
  .hero-panel,
  .js .reveal,
  .js .reveal.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button:active,
  .project-card:hover,
  .social-list a span[aria-hidden="true"] {
    transform: none;
    transition: none;
  }
}
