/* ============================================================
   MIRAD BUILDERS — shared design system  ·  "Built in Layers"
   One sheet of cream paper; the building is the only object.
   ============================================================ */

:root {
  --paper: #F2EDE3;
  --paper-deep: #E8E1D2;
  --ink: #23211C;
  --slate: #3F4650;
  --copper: #A8663B;
  --copper-soft: #C08552;
  --limestone: #D8CDB9;
  --hedge: #5F6E51;
  --night: #17181B;
  --gold: #C9A227;
  --serif: 'Noto Serif', serif;
  --sans: 'PP Neue Montreal', 'Archivo', 'Inter', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --hairline: rgba(35, 33, 28, .22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
::selection { background: var(--copper); color: var(--paper); }

/* paper grain over everything */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 90;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.13 0 0 0 0 0.11 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.serif-note { font-family: var(--serif); font-style: italic; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 2.5rem;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(242, 237, 227, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--hairline);
  padding: .9rem 2.5rem;
}
.logo { font-weight: 500; letter-spacing: .18em; font-size: 1rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .65rem; }
.logo img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 1px 4px rgba(35,33,28,.25); flex: 0 0 auto; }
.logo small { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: .02em; font-size: .72rem; color: var(--copper); }
.site-nav { display: flex; align-items: center; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: .85rem;
  margin-left: 1.9rem; letter-spacing: .04em;
  border-bottom: 1px solid transparent; transition: border-color .3s, color .3s;
}
.site-nav a:hover { color: var(--copper); border-color: var(--copper); }
.site-nav a.active { color: var(--copper); border-color: var(--copper); font-weight: 500; }
.wa-pill {
  margin-left: 2rem;
  border: 1px solid var(--ink); border-radius: 99px;
  padding: .45rem 1.2rem !important;
  border-bottom: 1px solid var(--ink) !important;
  transition: all .3s !important;
}
.wa-pill:hover { background: var(--copper); border-color: var(--copper) !important; color: var(--paper) !important; }

/* mobile menu */
.menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink);
  padding: .3rem .6rem;
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.4rem;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-size: 2rem; color: var(--ink); text-decoration: none; font-weight: 500;
}
.mobile-menu a.active { color: var(--copper); font-family: var(--serif); font-style: italic; }
.mobile-menu .close {
  position: absolute; top: 1.4rem; right: 2rem;
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  background: none; border: none; color: var(--copper); cursor: pointer;
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-btn { display: block; }
}

/* ---------- layout scaffolding ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2.5rem; }
@media (max-width: 720px) { .wrap { padding: 0 1.4rem; } }
.sec-head { padding: 7rem 0 3.5rem; }
.sec-head .no { font-family: var(--serif); font-style: italic; color: var(--copper); font-size: 1rem; }
.sec-head h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 500; letter-spacing: -.02em; margin-top: .4rem; }
.sec-head h2 em, .h-em { font-family: var(--serif); font-weight: 400; font-style: italic; }
.rule { height: 1px; background: var(--ink); opacity: .25; }

/* page hero (non-scrub pages) */
.page-hero { padding: 11rem 0 5rem; }
.page-hero .kicker { font-family: var(--serif); font-style: italic; color: var(--copper); font-size: 1.05rem; margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.05; }
.page-hero h1 em { font-family: var(--serif); font-weight: 400; }
.page-hero p.lead { margin-top: 1.4rem; font-size: 1.1rem; color: var(--slate); max-width: 56ch; }

/* ---------- annotation voice ---------- */
.note-line { width: 44px; height: 1px; background: var(--ink); margin-bottom: .55rem; position: relative; }
.note-line::before { content: ''; position: absolute; left: -4px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }
.fact b { display: block; font-size: 1.35rem; font-weight: 500; }
.fact span { font-family: var(--serif); font-style: italic; font-size: .85rem; color: var(--slate); }

/* trade chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  font-size: .8rem; letter-spacing: .02em;
  border: 1px solid rgba(35, 33, 28, .35); border-radius: 99px;
  padding: .25rem .8rem; transition: all .3s;
}
.chips li:hover { border-color: var(--copper); color: var(--copper); }

/* buttons */
.btn {
  display: inline-block;
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  padding: .95rem 2.6rem; border-radius: 99px; font-size: .95rem; letter-spacing: .05em;
  background: none; cursor: pointer; font-family: var(--sans);
  transition: all .35s var(--ease);
}
.btn:hover { background: var(--copper); border-color: var(--copper); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--copper); border-color: var(--copper); }

/* paper cards (projects, certificates) */
.sheet {
  background: var(--paper);
  border: 1px solid var(--hairline);
  position: relative;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.sheet::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(35,33,28,.10); pointer-events: none; }
.sheet:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(35,33,28,.28); }

/* dark beat section */
.dark-beat { background: var(--night); color: #EDEAE2; }
.dark-beat .serif-note, .dark-beat .kicker { color: var(--copper-soft); }
.dark-beat p { color: #B9B5AA; }

/* alt paper strip */
.strip-deep { background: var(--paper-deep); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.on { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* SVG ink drawing (set stroke-dasharray/offset in JS via .draw) */
.ink-draw path, .ink-draw line, .ink-draw circle, .ink-draw rect, .ink-draw polyline {
  stroke: var(--ink); fill: none; stroke-width: 1.2;
}
.ink-draw .copper { stroke: var(--copper); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 6rem; }
.site-footer .grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2.5rem;
  padding: 4rem 0 3rem;
}
.site-footer .wordmark { font-weight: 500; letter-spacing: .2em; font-size: 1.4rem; display: flex; align-items: center; gap: .9rem; }
.site-footer .wordmark img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 1px 5px rgba(35,33,28,.3); flex: 0 0 auto; }
.site-footer .wordmark small { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: .02em; font-size: .78rem; color: var(--copper); margin-top: .3rem; }
.site-footer h5 { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--copper); font-size: .95rem; margin-bottom: 1rem; }
.site-footer a { display: block; color: var(--slate); text-decoration: none; font-size: .9rem; margin-bottom: .55rem; transition: color .3s; }
.site-footer a:hover { color: var(--copper); }
.site-footer .base {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--hairline); padding: 1.6rem 0 2rem;
  font-size: .8rem; color: var(--slate); flex-wrap: wrap; gap: .6rem;
}
.site-footer .base .serif-note { color: var(--copper); }
@media (max-width: 860px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
