/* =========================================================
   [Your Name] — Architecture Portfolio
   Editorial / architectural aesthetic
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Warm paper palette */
  --paper:       #f4f0e6;   /* background */
  --paper-2:     #ebe6d8;   /* slightly deeper surface */
  --ink:         #1a1a1a;   /* primary text */
  --ink-soft:    #4a4a4a;   /* secondary text */
  --ink-mute:    #8a8479;   /* tertiary / captions */
  --rule:        #d9d3c2;   /* hairlines */

  /* Accent */
  --ochre:       #a84e24;
  --ochre-deep:  #7a3516;

  /* Type */
  --serif:  "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:   "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Space scale */
  --gutter: clamp(20px, 4vw, 48px);
  --maxw:   1440px;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg, figure { display: block; max-width: 100%; }
a { color: inherit; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Subtle paper texture via layered gradients */
  background-image:
    radial-gradient(at 20% 10%, rgba(168,78,36,0.04), transparent 40%),
    radial-gradient(at 85% 80%, rgba(26,26,26,0.03), transparent 50%);
  background-attachment: fixed;
}

/* ---------- Meta label (blueprint-style) ---------- */
.meta-label {
  font-family: var(--mono);
  font-size: 13.75px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-block;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark-initials {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.01em;
}
.wordmark-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ochre);
  transition: right 0.3s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }
.nav-cta {
  padding: 8px 14px !important;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 140px) var(--gutter) clamp(80px, 12vw, 160px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.hero-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  font-size: clamp(33px, 6.375vw, 93px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.hero-line {
  display: block;
  overflow: hidden;
}
.hero-headline em {
  font-style: italic;
  color: var(--ochre);
  font-weight: 400;
}
.hero-bio {
  max-width: 620px;
  margin-left: auto;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
}
.hero-bio p + p { margin-top: 1em; }
.hero-bio strong { color: var(--ink); font-weight: 500; }
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--ochre-deep); border-color: var(--ochre-deep); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Section heads ---------- */
.section-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  margin: 0;
  font-style: italic;
}

/* ---------- Work grid ---------- */
.work {
  padding: clamp(60px, 8vw, 100px) 0;
}
.project-grid {
  list-style: none;
  padding: 0 var(--gutter);
  margin: clamp(40px, 6vw, 80px) auto 0;
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 5vw, 80px) clamp(30px, 3vw, 60px);
}
.project--wide {
  grid-column: 1 / -1;
}
.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-media {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
.project--wide .project-media {
  aspect-ratio: 21 / 9;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1), filter 0.4s ease;
  filter: saturate(0.92);
}
.project-link:hover .project-media img { transform: scale(1.03); filter: saturate(1); }

.project-caption {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  margin-top: 16px;
}
.project-number {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  padding-top: 4px;
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.project-link:hover .project-title { color: var(--ochre-deep); }
.project-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.project-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.project-link:hover .project-cta { color: var(--ochre); transform: translateX(3px); }

/* ---------- Placeholder art (remove when real images added) ---------- */
.placeholder {
  background:
    linear-gradient(135deg, rgba(26,26,26,0.04) 0%, rgba(26,26,26,0.10) 100%),
    repeating-linear-gradient(
      45deg,
      transparent 0 20px,
      rgba(26,26,26,0.03) 20px 21px
    ),
    var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.placeholder::after {
  content: attr(data-code);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  border: 1px solid var(--ink-mute);
  padding: 8px 14px;
}
.placeholder--dark {
  background:
    linear-gradient(135deg, rgba(26,26,26,0.35) 0%, rgba(26,26,26,0.55) 100%),
    repeating-linear-gradient(
      45deg,
      transparent 0 22px,
      rgba(255,255,255,0.04) 22px 23px
    ),
    #2a2824;
}
.placeholder--dark::after { color: #d9d3c2; border-color: #d9d3c2; }

.placeholder--warm {
  background:
    linear-gradient(135deg, rgba(168,78,36,0.18) 0%, rgba(168,78,36,0.35) 100%),
    repeating-linear-gradient(
      45deg,
      transparent 0 20px,
      rgba(26,26,26,0.03) 20px 21px
    ),
    #e9d6c2;
}
.placeholder--cool {
  background:
    linear-gradient(135deg, rgba(40,60,80,0.20) 0%, rgba(40,60,80,0.35) 100%),
    repeating-linear-gradient(
      45deg,
      transparent 0 20px,
      rgba(255,255,255,0.04) 20px 21px
    ),
    #bcc5cc;
}

/* ---------- About ---------- */
.about {
  padding: clamp(60px, 8vw, 100px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.about .section-head { background: transparent; }
.about-grid {
  max-width: var(--maxw);
  margin: clamp(40px, 6vw, 80px) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.about-portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }

.about-body .about-lede {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: "opsz" 72;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  margin: 0 0 24px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.about-body p {
  max-width: 62ch;
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.about-columns {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.about-columns h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 12px;
  font-weight: 500;
}
.plain-list, .tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.plain-list li { margin-bottom: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.plain-list strong { color: var(--ink); font-weight: 500; }
.plain-list .muted { color: var(--ink-mute); font-size: 13px; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.tag-list li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  background: var(--paper);
}

/* ---------- Contact ---------- */
.contact {
  padding: clamp(80px, 10vw, 140px) 0 0;
}
.contact-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.contact-inner .meta-label { margin-bottom: 20px; }
.contact-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 48px;
  max-width: 22ch;
  font-style: italic;
  color: var(--ink);
}
.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.contact-links li { border-bottom: 1px solid var(--rule); }
.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 300;
  color: var(--ink);
  transition: color 0.2s ease, padding 0.25s ease;
  position: relative;
}
.contact-links a::after {
  content: "↗";
  font-family: var(--sans);
  font-size: 0.7em;
  color: var(--ink-mute);
  transition: transform 0.25s ease, color 0.25s ease;
}
.contact-links a:hover { color: var(--ochre-deep); padding-left: 18px; }
.contact-links a:hover::after { transform: translate(4px, -4px); color: var(--ochre); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: clamp(60px, 10vw, 120px) auto 0;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.footer-left, .footer-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-right { text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 12px var(--gutter) 20px;
  }
  .nav.is-open a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
  }
  .nav.is-open a:last-child { border-bottom: none; }

  .hero-meta { flex-direction: column; gap: 6px; }

  .project-grid { grid-template-columns: 1fr; }
  .project--wide { grid-column: 1; }
  .project--wide .project-media { aspect-ratio: 4 / 3; }

  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
  .about-columns { grid-template-columns: 1fr; gap: 28px; }

  .footer { flex-direction: column; }
  .footer-right { text-align: left; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Fade-in on load ---------- */
.hero-line {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-line:nth-child(1) { animation-delay: 0.05s; }
.hero-line:nth-child(2) { animation-delay: 0.18s; }
.hero-line:nth-child(3) { animation-delay: 0.31s; }
.hero-line:nth-child(4) { animation-delay: 0.44s; }
.hero-bio { opacity: 0; animation: reveal 0.8s 0.55s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-meta { opacity: 0; animation: reveal 0.6s 0.0s cubic-bezier(.2,.7,.2,1) forwards; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* Scroll-triggered reveal (JS adds .in when in view) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
