/* Raymond Amador — portfolio landing page.
   Single-screen, two-column layout. Shares the course books' identity:
   Fraunces (display), Source Serif 4 (body), JetBrains Mono (labels),
   ink #16213e + amber #c0851a on parchment #faf7f0. Light and dark. */

:root {
  --ink:        #16213e;
  --ink-soft:   #46506b;
  --accent:     #c0851a;   /* brand amber: icons, underlines, decoration */
  --accent-text:#946011;   /* deeper amber for small TEXT — WCAG AA on parchment */
  --paper:      #faf7f0;
  --hairline:   #dcd6c8;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --mono:    'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:      #ece6d8;
    --ink-soft: #9aa0b4;
    --accent:   #e0a93f;
    --accent-text:#e0a93f;   /* bright amber already passes on dark ink */
    --paper:    #11182b;
    --hairline: #2b3450;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* shared editorial label */
.eyebrow {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.9rem;
}

/* ============================ TOP BAR ============================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.4rem, 5vw, 3rem);
  border-bottom: 1px solid var(--hairline);
}
.wordmark {
  font-family: var(--display);
  font-variation-settings: 'opsz' 40;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.contact { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.5rem); }
.contact a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; transition: color .18s ease; }
.contact a:hover, .contact a:focus-visible { color: var(--accent); outline: none; }
.contact .icon { width: 20px; height: 20px; fill: currentColor; opacity: 0.85; }
.contact a:hover .icon { opacity: 1; }
.cv-link {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.45em 0.9em;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cv-link:hover, .cv-link:focus-visible { background: var(--ink); color: var(--paper) !important; }

/* ============================== STAGE ============================= */
.stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.4rem, 5vw, 3rem);
}
.grid {
  width: 100%;
  max-width: 64rem;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

/* ---- identity (left) ---- */
.identity { display: flex; flex-direction: column; gap: 1.1rem; }
.portrait {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--hairline);
}
.identity h1 {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144;
  font-weight: 900;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}
.lead {
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 26rem;
}

/* ---- detail (right): work + education ---- */
.detail {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 3.5vw, 2.4rem);
  border-left: 1px solid var(--hairline);
  padding-left: clamp(2rem, 5vw, 3.5rem);
}

.work-list, .edu-list { list-style: none; margin: 0; padding: 0; }
.work + .work { margin-top: 1.3rem; }

.work-head { display: flex; align-items: center; gap: 0.7rem; }
.work-logo { flex: none; width: 38px; height: 38px; border-radius: 8px; }
.work-title {
  font-family: var(--display);
  font-variation-settings: 'opsz' 60;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}
.work-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 92%;
  transition: background-size .25s ease;
}
.work-title a:hover, .work-title a:focus-visible { background-size: 100% 2px; outline: none; }
.work-desc {
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.5;
  margin: 0.45rem 0 0;
}
.inline-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
}
.inline-link:hover { text-decoration: underline; }

.edu + .edu { margin-top: 0.95rem; }
.edu-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.deg {
  font-family: var(--display);
  font-variation-settings: 'opsz' 40;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.inst { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.03em; color: var(--ink-soft); }
.edu-note { color: var(--ink-soft); margin: 0.15rem 0 0; font-size: 0.9rem; line-height: 1.4; }
.edu-note em { font-style: italic; }

/* ============================== FOOTER =========================== */
.footer { padding: 0.9rem clamp(1.4rem, 5vw, 3rem); }
.fineprint {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
}

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

/* ---- narrow screens: stack, allow natural scrolling ---- */
@media (max-width: 54rem) {
  .grid { grid-template-columns: 1fr; gap: 2rem; }
  .detail { border-left: 0; padding-left: 0; }
  .lead { max-width: none; }
  .stage { align-items: flex-start; }
}
