/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --paper: #F1ECDF;
  --paper-alt: #E9E1CB;
  --paper-line: rgba(23, 39, 51, 0.08);
  --rule: rgba(23, 39, 51, 0.16);

  --ink: #17222B;
  --ink-soft: #52616B;
  --ink-faint: #7C8A91;

  --blueprint: #143152;
  --blueprint-deep: #0E2540;
  --blueprint-line: rgba(157, 202, 224, 0.28);
  --blueprint-line-strong: rgba(157, 202, 224, 0.55);
  --on-blueprint: #EDEFE7;
  --on-blueprint-soft: rgba(237, 239, 231, 0.72);

  --accent: #D9601F;
  --accent-deep: #B84F17;
  --accent-ink: #1A1206;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --container: 1120px;
  --edge: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 14px;
}
.hero .eyebrow, .contact .eyebrow { color: var(--accent); }

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* grid-paper texture ------------------------------------------------ */
.grid-paper {
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 28px 28px;
}
.grid-blueprint {
  background-color: var(--blueprint);
  background-image:
    linear-gradient(var(--blueprint-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint-line) 1px, transparent 1px);
  background-size: 34px 34px;
}

.section { padding: 88px 0; position: relative; }
.section--muted { background: var(--paper-alt); }

/* registration / crosshair mark -------------------------------------- */
.reg-mark {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid var(--blueprint-line-strong);
  border-radius: 50%;
  color: var(--blueprint-line-strong);
}
.reg-mark::before, .reg-mark::after { content: ""; position: absolute; background: currentColor; }
.reg-mark::before { top: 50%; left: -5px; right: -5px; height: 1px; transform: translateY(-50%); }
.reg-mark::after { left: 50%; top: -5px; bottom: -5px; width: 1px; transform: translateX(-50%); }
.reg-mark--tl { top: 18px; left: 18px; }
.reg-mark--tr { top: 18px; right: 18px; }
.reg-mark--bl { bottom: 18px; left: 18px; }
.reg-mark--br { bottom: 18px; right: 18px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--edge);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo__sheet { color: var(--ink-faint); }
.nav {
  display: flex;
  gap: 22px;
  margin-right: auto;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 13px 22px;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(0,0,0,0.04); }
.hero .btn--ghost { border-color: var(--blueprint-line-strong); color: var(--on-blueprint); }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.06); }
.btn--large { padding: 16px 28px; font-size: 0.92rem; }
.btn--small { padding: 9px 16px; font-size: 0.78rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 96px 0 76px; color: var(--on-blueprint); overflow: hidden; }
.hero__inner { position: relative; max-width: 760px; }

.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 0.98;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.hero__title-box {
  display: inline-flex;
  flex-direction: column;
  border: 2px solid var(--accent);
  padding: 4px 14px 8px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  margin-top: 4px;
}
.hero__title-box span { color: var(--accent); }

.dim-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 30px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--on-blueprint-soft);
  max-width: 260px;
}
.dim-line::before, .dim-line::after { content: ""; height: 1px; background: var(--blueprint-line-strong); flex: 1; }
.dim-line span { white-space: nowrap; }

.hero__sub { font-size: 1.05rem; color: var(--on-blueprint-soft); max-width: 54ch; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.spec-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--blueprint-line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--on-blueprint-soft);
  max-width: 620px;
}
.spec-strip li { display: flex; align-items: center; }
.spec-strip li:not(:last-child)::after { content: "│"; margin: 0 14px; color: var(--blueprint-line-strong); }
.spec-strip .num { color: var(--accent); font-weight: 600; margin-right: 6px; }
.spec-strip .dot { width: 6px; height: 6px; border-radius: 50%; background: #7CD48A; display: inline-block; margin-right: 8px; }

/* ============================================================
   RULER DIVIDER
   ============================================================ */
.ruler {
  height: 34px;
  background: var(--paper-alt);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink-faint) 0, var(--ink-faint) 1px,
    transparent 1px, transparent 10px
  );
  background-size: 10px 8px;
  background-position: left bottom;
  background-repeat: repeat-x;
  position: relative;
}
.ruler::before, .ruler::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 16px;
  background: var(--ink-faint);
}
.ruler__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  background: var(--paper-alt);
  padding: 0 10px;
  width: max-content;
  margin: 0 auto;
}

/* ============================================================
   ABOUT / SPEC TABLE
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.about__copy p { color: var(--ink-soft); }
.about__copy p:first-of-type { color: var(--ink); font-size: 1.08rem; }

.spec-table {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.spec-table__row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  border-bottom: 1px solid var(--rule);
}
.spec-table__row:last-child { border-bottom: none; }
.spec-table dt, .spec-table dd {
  margin: 0;
  padding: 13px 18px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
.spec-table dt {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
}
.spec-table dd { color: var(--ink); }

/* ============================================================
   SKILLS / COMPONENT CARDS
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 8px;
}
.card {
  background: var(--paper-alt);
  padding: 30px 28px 26px;
  position: relative;
}
.card__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: none;
  margin-bottom: 10px;
}
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.card__tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.card__tags span::before { content: "["; }
.card__tags span::after { content: "]"; }

/* ============================================================
   PROJECTS + ANNOTATION SIGNATURE
   ============================================================ */
.projects { display: flex; flex-direction: column; gap: 72px; margin-top: 8px; }
.project__meta { font-family: var(--font-mono); font-weight: 400; font-size: 0.55em; text-transform: none; color: var(--ink-faint); letter-spacing: 0; }
.project h3 { font-size: 1.4rem; margin: 22px 0 10px; text-transform: none; }
.project > p { color: var(--ink-soft); max-width: 62ch; }
.project__link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--accent-deep);
  border-bottom: 1px solid currentColor;
}

.diagram {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.diagram__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--ink);
}
.diagram__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(237,239,231,0.25); }
.diagram__url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--on-blueprint-soft);
}
.diagram__frame { position: relative; line-height: 0; }
.diagram__frame img { width: 100%; }

/* numbered balloon markers over the screenshot — paired with the key below */
.callout {
  position: absolute;
  display: flex;
  cursor: default;
}
.callout__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 6px rgba(0,0,0,0.35);
}

/* callout key — itemized list, always visible, paired to the balloon numbers */
.callout-key {
  list-style: none;
  margin: 0;
  padding: 14px 18px;
  background: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.callout-key li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--on-blueprint-soft);
  padding: 4px 0;
}
.callout-key .callout__dot { width: 19px; height: 19px; font-size: 0.64rem; border-width: 1px; box-shadow: 0 0 0 1px var(--accent); }

@media (max-width: 560px) {
  .callout-key { flex-direction: column; gap: 2px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: left; max-width: 640px; }
.contact__sub { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 30px; max-width: 50ch; }
.socials { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; margin: 30px 0 0; padding: 0; }
.socials a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.socials a:hover { color: var(--ink); border-color: var(--ink); }

/* ============================================================
   FOOTER — title block
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.site-footer__inner {
  padding: 22px var(--edge) 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.site-footer__inner span { color: var(--ink-soft); }

/* ============================================================
   SCROLL RULER (side, decorative/functional)
   ============================================================ */
.scroll-ruler {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  height: 220px;
  width: 14px;
  z-index: 30;
  display: none;
}
.scroll-ruler__track {
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}
.scroll-ruler__thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  height: 13px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  background: var(--paper);
}
.scroll-ruler__thumb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
@media (min-width: 1180px) and (min-height: 640px) {
  .scroll-ruler { display: block; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 56px; }
}

@media (max-width: 560px) {
  .spec-table__row { grid-template-columns: 1fr; }
  .spec-table dt { border-right: none; border-bottom: 1px solid var(--rule); }
  .diagram__url { display: none; }
}
