/* X Factorial shared stylesheet
   Theme: "Drafting Atelier". Espresso ground, champagne-gold linework,
   serif display over light sans, mono for technical labels. No JS anywhere. */

:root {
  --espresso: #191311;
  --gold: #c9a96a;
  --gold-dim: #957e57;               /* 4.73:1 on espresso, AA for small text */
  --gold-faint: rgba(201, 169, 106, .38);
  --ivory: #efe8db;
  --ivory-dim: #a19787;
  --hairline: rgba(201, 169, 106, .22);
  --hairline-strong: rgba(201, 169, 106, .52);  /* 3:1, interactive borders only */
  --grid: rgba(201, 169, 106, .028);
  --serif: "Cormorant Garamond", serif;
  --sans: "Jost", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

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

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--espresso);
  color: var(--ivory);
  line-height: 1.75;
  letter-spacing: .01em;
  /* drafting-table grid, barely perceptible */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}

::selection { background: var(--gold); color: var(--espresso); }

.frame { max-width: 920px; margin: 0 auto; padding: 0 28px; }

/* ---- header / nav ---- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(25, 19, 17, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.navrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0;
}
.logo {
  font-family: var(--serif);
  font-size: 1.35rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: inherit;
}
.logo .x { color: var(--gold); font-style: italic; }
nav { display: flex; gap: 40px; }
nav a {
  text-decoration: none;
  font-size: .74rem; font-weight: 400;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--ivory-dim);
  transition: color .3s;
}
nav a:hover { color: var(--gold); }
nav a[aria-current="page"] { color: var(--gold); }

/* ---- hero ---- */
.hero {
  text-align: center;
  padding: 120px 0 100px;
  animation: fade 1s ease both;
}
.eyebrow {
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold);
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.12;
  margin-top: 30px;
}
h1 em { font-style: italic; }
.hero > p {
  max-width: 50ch; margin: 0 auto;
  color: var(--ivory-dim);
  font-size: 1rem;
}

/* the one drawn flourish: a gold dimension line */
.dim {
  position: relative;
  width: min(340px, 68%);
  height: 22px;
  margin: 38px auto 36px;
  color: var(--gold-faint);
}
.dim::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 11px;
  border-top: 1px solid currentColor;
}
.dim i {
  position: absolute; top: 4px;
  width: 1px; height: 15px;
  background: currentColor;
}
.dim i:first-child { left: 0; }
.dim i:last-child { right: 0; }
.dim span {
  position: absolute;
  left: 50%; top: 3px;
  transform: translateX(-50%);
  background: var(--espresso);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-dim);
  white-space: nowrap;
}

@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- index of sheets: jump links where tabs would sit ---- */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 96px; }
.sheet-nav {
  display: flex; justify-content: center; gap: 44px;
  padding: 0 0 26px;
}
.sheet-nav a {
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-dim);
  transition: color .3s;
}
.sheet-nav a .n { color: var(--gold-dim); margin-right: 8px; }
.sheet-nav a:hover { color: var(--gold); }

/* ---- portfolio list ---- */
.menu { padding: 20px 0 64px; }
.menu.last { padding-bottom: 110px; }
.menu-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 16px;
}
.menu-head h2 {
  font-size: .74rem; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}
.menu-head .no {
  font-family: var(--mono);
  font-size: .64rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ivory-dim);
}

.course {
  display: grid;
  grid-template-columns: 64px 96px 1fr auto;
  gap: 26px; align-items: center;
  padding: 34px 0;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--hairline);
}
.course .no {
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .12em;
  color: var(--gold-dim);
  transition: color .35s;
}
.course .name {
  font-family: var(--serif);
  font-weight: 500; font-size: 1.75rem; line-height: 1.2;
  transition: color .35s;
}
/* per-work status annotation, set beside the name like a drawing note */
.course .status {
  font-family: var(--mono);
  font-size: .58rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-dim);
  margin-left: 10px;
  vertical-align: .4em;
  white-space: nowrap;
}
.course .desc {
  color: var(--ivory-dim); font-size: .94rem;
  margin-top: 4px; max-width: 56ch;
}
.course .cta {
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-dim); white-space: nowrap;
  transition: color .35s;
}
/* domain in the action column reads as a technical label, not a button */
.cta.url {
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: .08em;
  font-size: .68rem;
}
a.course:hover .no,
a.course:hover .name,
a.course:hover .cta { color: var(--gold); }

/* schematic thumbnails in fine gold linework */
.schem { width: 96px; height: 54px; }
.schem svg { width: 100%; height: 100%; display: block; }
.schem svg * {
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 1.1;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke .35s;
}
a.course:hover .schem svg * { stroke: var(--gold); }

/* ---- centered callout (atelier / contact blocks) ---- */
.atelier { text-align: center; padding: 0 0 120px; }
.atelier h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 24px auto 16px; max-width: 28ch; line-height: 1.25;
}
.atelier h2 em { font-style: italic; }
.atelier p {
  max-width: 56ch; margin: 0 auto 36px;
  color: var(--ivory-dim); font-size: .98rem;
}
.link-gold {
  font-size: .76rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: border-color .3s;
}
.link-gold:hover { border-color: var(--gold); }

/* ---- prose pages (about) ---- */
.prose { max-width: 640px; margin: 0 auto; padding: 20px 0 60px; }
.prose p { margin-bottom: 1.5em; color: var(--ivory); }
.prose p.aside { color: var(--ivory-dim); font-size: .96rem; }
.prose .sig {
  font-family: var(--serif); font-style: italic;
  font-size: 1.35rem; color: var(--gold);
  margin-top: 2.2em;
}

/* framed panel with a label set into the border, like a drawing's title block */
.tblock {
  position: relative;
  border: 1px solid var(--hairline);
  padding: 14px 24px 4px;
}
.tblock-title {
  position: absolute; top: 0; left: 20px;
  transform: translateY(-50%);
  background: var(--espresso);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: .66rem; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}

/* founder specs table */
.specs { margin: 3.4em 0 3em; }
.specs div {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--hairline);
}
.specs div:last-child { border-bottom: none; }
.specs dt {
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-dim);
  align-self: center;
}
.specs dd { font-size: .95rem; color: var(--ivory); text-align: right; text-wrap: balance; }
.specs dd a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .3s, text-decoration-color .3s;
}
.specs dd a:hover { color: var(--gold); text-decoration-color: var(--gold); }

/* ---- contact form ---- */
.write {
  margin: 30px 0 26px;
  padding: 32px 26px 34px;
}
.field { margin-bottom: 30px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none; border-bottom: 1px solid var(--hairline-strong);
  color: var(--ivory);
  font-family: var(--serif); font-size: 1.2rem;
  padding: 6px 2px 10px;
  transition: border-color .3s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.send {
  display: block; margin: 0 auto;
  background: none; cursor: pointer;
  border: 1px solid var(--hairline-strong);
  color: var(--gold);
  font-family: var(--sans); font-weight: 400;
  font-size: .74rem; letter-spacing: .3em; text-transform: uppercase;
  padding: 14px 36px;
  transition: border-color .3s;
}
.send:hover, .send:focus-visible { border-color: var(--gold); }
.formnote {
  margin: 0 2px 50px;
  color: var(--ivory-dim); font-size: .88rem;
}
/* honeypot field, parked far offscreen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- contact channels ---- */
.channels { max-width: 560px; margin: 0 auto; padding: 10px 0 110px; }
.channel {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 26px 2px;
  border-bottom: 1px solid var(--hairline);
}
.prose .channel { margin: 3em 0 0; padding-bottom: 60px; }
.channel .site + .site { margin-top: 18px; }
.channel .label {
  font-family: var(--mono);
  font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-dim);
}
.channel a {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 500;
  color: var(--ivory); text-decoration: none;
  transition: color .3s;
}
.channel a:hover { color: var(--gold); }
.channel .note { color: var(--ivory-dim); font-size: .88rem; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 70px 0 100px; text-align: center;
}
.monogram {
  font-family: var(--serif); font-style: italic;
  font-size: 1.9rem; color: var(--gold);
  text-align: center;
}
footer .sign {
  max-width: 44ch; margin: 16px auto 30px;
  color: var(--ivory-dim); font-size: .94rem;
}
footer .legal {
  font-size: .68rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-dim);
}

/* ---- small screens ---- */
@media (max-width: 760px) {
  .navrow { flex-direction: column; gap: 14px; }
  nav { gap: 22px; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 90px 0 80px; }
  .course { grid-template-columns: 52px 1fr; gap: 14px 18px; }
  .schem, .course .cta { display: none; }
  .course .name { font-size: 1.45rem; }
  .channel { flex-direction: column; gap: 6px; }
  .channel .note { text-align: left; }
}
