:root {
  --ink: #0f1419;
  --ink-soft: #2c3137;
  --paper: #fafaf7;
  --paper-warm: #f2f1ec;
  --rule: #d8d4c8;
  --accent: #7a1f1f;
  --muted: #686259;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

.display-serif {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.0;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-label::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--ink);
}

/* Navigation */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  background: rgba(245, 241, 234, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav-bar.scrolled { border-color: var(--rule); }
.nav-bar .brand {
  font-family: 'Instrument Serif', serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.nav-bar .brand em { font-style: italic; font-weight: 400; color: var(--muted); }
.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  padding: 7rem 0 4rem;
  display: flex;
  align-items: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(26,26,24,0.08) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 80% 20%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 80% 20%, black, transparent);
  pointer-events: none;
}
.hero-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-lede {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  max-width: 580px;
  color: var(--ink-soft);
}
.hero-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}
.hero-meta div { min-width: 140px; }
.hero-meta .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.hero-meta .value {
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  color: var(--ink);
}

/* Sections */
section {
  padding: 4.5rem 0;
  position: relative;
}
.section-divider {
  height: 1px;
  background: var(--rule);
  margin: 0 auto;
}

/* About */
.about h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 300;
  margin-bottom: 2rem;
}
.about h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.about-body p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.4rem;
  color: var(--ink-soft);
}
.about-body p em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.15em;
  font-weight: 400;
  color: var(--ink);
}
.about-body p:first-of-type::first-letter {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 4.5rem;
  float: left;
  line-height: 0.85;
  padding: 0.4rem 0.6rem 0 0;
  color: var(--accent);
}
.about-aside {
  padding-left: 2rem;
  border-left: 1px solid var(--rule);
}
.about-aside .stat {
  margin-bottom: 1.75rem;
}
.about-aside .stat-number {
  font-family: 'Instrument Serif', serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  display: block;
  margin-bottom: 0.5rem;
}
.about-aside .stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Services */
.services { background: var(--paper-warm); }
.services h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
}
.services h2 em { font-style: italic; font-weight: 400; color: var(--accent); }

.service-card {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 2.5rem;
  transition: padding-left 0.25s ease;
}
.service-card:last-child { border-bottom: 1px solid var(--rule); }
.service-card:hover { padding-left: 1rem; }
.service-card .num {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  font-feature-settings: "lnum";
}
.service-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.service-card h3 em { font-style: italic; color: var(--ink-soft); }
.service-card .tagline {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0;
}
.service-card .body {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}
.service-card .body p {
  margin: 0;
}
.service-card .body ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.service-card .body li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.92rem;
}
.service-card .body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.service-card .body .service-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--accent);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.service-card .body .service-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

@media (max-width: 767.98px) {
  .service-card { grid-template-columns: 1fr; gap: 1rem; }
  .service-card:hover { padding-left: 0; }
}

/* Work */
.work h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
}
.work h2 em { font-style: italic; font-weight: 400; color: var(--accent); }

.project {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: baseline;
  transition: background 0.3s ease;
}
.project:last-child { border-bottom: 1px solid var(--rule); }
.project:hover { background: rgba(154, 52, 18, 0.03); }

.project .year {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.project .title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.project .title em { font-style: italic; color: var(--accent); }
.project .desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
.project .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.project .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.project .link {
  color: var(--accent);
  text-decoration: none;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.project .link:hover { border-color: var(--accent); }
.project .link::after { content: " →"; }

@media (max-width: 767.98px) {
  .project { grid-template-columns: 1fr; gap: 0.75rem; }
  .project .tags { justify-content: flex-start; }
}

/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 140%;
  background: radial-gradient(circle, rgba(154, 52, 18, 0.25), transparent 60%);
  pointer-events: none;
}
.contact .section-label { color: rgba(245, 241, 234, 0.6); }
.contact .section-label::before { background: var(--paper); }
.contact h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--paper);
}
.contact h2 em { font-style: italic; font-weight: 400; color: #e8a87c; }

.contact-form label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.6);
  display: block;
  margin-bottom: 0.5rem;
}
.contact-form .form-control,
.contact-form .form-select {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 241, 234, 0.3);
  border-radius: 0;
  color: var(--paper);
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  margin-bottom: 1.25rem;
  box-shadow: none;
  transition: border-color 0.3s ease;
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
  background: transparent;
  color: var(--paper);
  border-color: #e8a87c;
  box-shadow: none;
  outline: none;
}
.contact-form .form-control::placeholder {
  color: rgba(245, 241, 234, 0.35);
  font-style: italic;
}
.contact-form .form-select option { background: var(--ink); color: var(--paper); }

.btn-send {
  background: var(--paper);
  color: var(--ink);
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.1rem 2.5rem;
  border-radius: 0;
  transition: all 0.3s ease;
}
.btn-send:hover {
  background: #e8a87c;
  color: var(--ink);
  transform: translateX(4px);
}

.contact-direct {
  padding-left: 3rem;
  border-left: 1px solid rgba(245, 241, 234, 0.2);
}
.contact-direct .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.5);
  margin-bottom: 0.5rem;
}
.contact-direct .value {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--paper);
  margin-bottom: 1.25rem;
  display: block;
  text-decoration: none;
}
.contact-direct .value:hover { color: #e8a87c; }

@media (max-width: 767.98px) {
  .contact-direct { padding-left: 0; border-left: none; border-top: 1px solid rgba(245, 241, 234, 0.2); padding-top: 2.5rem; margin-top: 2rem; }
}

/* Footer */
footer {
  background: var(--ink);
  color: rgba(245, 241, 234, 0.5);
  padding: 2rem 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(245, 241, 234, 0.1);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }
.reveal-5 { animation-delay: 0.7s; }

/* Selection */
::selection { background: var(--accent); color: var(--paper); }

/* Pull quote */
.quote-section {
  padding: 4rem 0;
  background: var(--paper);
  position: relative;
}
.quote-section::before,
.quote-section::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--rule);
  margin: 0 auto;
}
.quote-mark {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 6rem;
  line-height: 0.5;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
  text-align: center;
}
.quote-text {
  font-family: 'Instrument Serif', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  max-width: 820px;
  margin: 0 auto 1.25rem;
  padding: 1.75rem 1rem;
}
.quote-text strong {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}
.quote-attr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  display: block;
}
.quote-attr em {
  font-family: 'Instrument Serif', serif;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: block;
  margin-top: 0.4rem;
}
