/* =========================================================
   Kristina Lagasca, portfolio
   Plain CSS, no build step. Shared by every page.

   Direction: minimal, white, warm. The page is white; brown
   appears only where it earns attention: links and labels
   in sienna, hairlines and tints warmed slightly, the
   portrait ring and bullet marks in clay. Dark mode is
   espresso rather than blue-black so it stays warm.
   ========================================================= */

/* ---------- Tokens: light (default) ---------- */
:root {
  --bg:            #ffffff;
  --bg-tint:       #faf6f1;  /* faintest oat, for chips and hovers only */
  --border:        #ebe4db;  /* warm hairline */
  --border-hi:     #d8cabb;

  --text:          #241f1c;  /* near-black, very slightly warm */
  --muted:         #5f564f;
  --faint:         #7a7065;  /* dark enough for AA as normal-size text */

  --accent:        #8a5230;  /* sienna: links, labels, active nav */
  --accent-hi:     #6d3f23;  /* chestnut, for hover */
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(138, 82, 48, 0.07);
  --accent-line:   rgba(138, 82, 48, 0.24);
  --clay:          #99603c;  /* secondary brown: tagline, bullet marks */
  --rule:          #b9a389;  /* vertical connector line; darker than
                                --border so 1px stays visible (2.42:1) */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 660px;
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #17120d;
    --bg-tint:     #221a13;
    --border:      #332a21;
    --border-hi:   #4a3b2d;

    --text:        #efe5d7;
    --muted:       #b5a491;
    --faint:       #90816f;

    --accent:      #dba36f;
    --accent-hi:   #efbf90;
    --accent-ink:  #241a0e;
    --accent-soft: rgba(219, 163, 111, 0.09);
    --accent-line: rgba(219, 163, 111, 0.26);
    --clay:        #c08a5e;
    --rule:        #6a5745;
  }
}

:root[data-theme="dark"] {
  --bg:          #17120d;
  --bg-tint:     #221a13;
  --border:      #332a21;
  --border-hi:   #4a3b2d;

  --text:        #efe5d7;
  --muted:       #b5a491;
  --faint:       #90816f;

  --accent:      #dba36f;
  --accent-hi:   #efbf90;
  --accent-ink:  #241a0e;
  --accent-soft: rgba(219, 163, 111, 0.09);
  --accent-line: rgba(219, 163, 111, 0.26);
  --clay:        #c08a5e;
  --rule:        #6a5745;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;   /* body copy; the rest of the scale keys off this */
  line-height: 1.74;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 20, "WONK" 0;
}

p { margin: 0 0 1.15em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  font-weight: 500;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 16px; color: var(--accent-ink); }

/* ---------- Header ---------- */
.site-header { padding: 26px 0 0; }

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.wordmark {
  margin-right: auto;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a {
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13.5px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-tint); }
.nav a[aria-current="page"] { color: var(--accent); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show the icon for the theme you would switch TO. Light is the default. */
.icon-sun { display: none; }
.icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Home: portrait beside the name ---------- */
.home { padding: 48px 0 70px; }

.intro {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 30px);
  margin-bottom: 34px;
}

.portrait {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  width: clamp(136px, 31vw, 212px);
  aspect-ratio: 1;
}
.portrait::after {
  /* thin clay ring, one of the brown accents */
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  pointer-events: none;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-tint);
}

.intro-text { min-width: 0; }

.name {
  font-size: clamp(1.75rem, 6.2vw, 2.6rem);
  letter-spacing: -0.028em;
  margin-bottom: 8px;
}
.pronouns {
  display: inline-block;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0;
  vertical-align: 0.42em;
}

.tagline {
  margin: 0;
  color: var(--clay);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.home-bio { color: var(--muted); }
.home-bio p:last-child { margin-bottom: 0; }
.home-bio strong { color: var(--text); font-weight: 500; }

.home-note {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
}

/* ---------- Interior pages ---------- */
.page { padding: 42px 0 70px; }

.page-title {
  font-size: clamp(1.75rem, 5vw, 2.15rem);
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}
.page-intro {
  margin-bottom: 38px;
  color: var(--muted);
}

.prose { color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

/* Hairline-separated blocks: the one layout primitive these pages use */
.rows { border-top: 1px solid var(--border); }
.row { padding: 26px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }

.row-label {
  display: block;
  margin-bottom: 7px;
  color: var(--clay);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.row h2 { font-size: 1.2rem; margin-bottom: 4px; }

/* One-line takeaway under a heading, so the page can be skimmed on
   headings and leads alone without reading the detail beneath. */
.lead {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 14px;
}
.row h3 { font-size: 1.05rem; margin-bottom: 4px; }

.meta { color: var(--faint); font-size: 11.5px; letter-spacing: 0.02em; }

/* Themed sub-section inside a role. Responsibilities are indented and sit on
   one continuous vertical line, so it is unambiguous where a company's work
   ends and the next begins. Vertical space is padding, not margin: adjacent
   blocks then share a left border that reads as a single unbroken rule. */
.detail {
  padding: 18px 0 0 24px;
  border-left: 1px solid var(--rule);
}
.detail:last-of-type { padding-bottom: 4px; }

.detail h4 {
  position: relative;
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.008em;
}
/* Marker pinned onto the line, level with the sub-heading */
.detail h4::before {
  content: "";
  position: absolute;
  left: -28px;          /* content starts 25px in, so this centers a 7px dot on the line */
  top: 0.42em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px var(--bg);   /* punches through the line so the dot sits on top */
}

.detail p {
  margin: 0 0 0.9em;
  color: var(--muted);
}
.detail p:last-child { margin-bottom: 0; }

.block-heading {
  margin: 48px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
}
.block-heading + .rows,
.block-heading + .defs,
.block-heading + .prose { margin-top: 18px; }

/* ---------- Definition rows ---------- */
.defs { border-top: 1px solid var(--border); }
.defs > div {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 8px 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.defs dt {
  padding-top: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.defs dd { margin: 0; color: var(--text); }

/* ---------- Work: problem / approach / outcome ---------- */
.pac { margin: 14px 0 0; }
.pac dt {
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pac dd {
  margin: 0 0 16px;
  color: var(--muted);
}
.pac dd:last-child { margin-bottom: 0; }

/* Link out to a public artifact beneath an entry */
.row-links {
  margin: 10px 0 0;
  font-size: 13px;
}
.row-links a::after {
  content: " \2197";
  font-size: 0.9em;
}

.stack {
  margin-top: 16px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.tag-status {
  display: inline-block;
  margin-left: 9px;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}

/* ---------- Bulleted detail lists ---------- */
.bullets {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  color: var(--muted);
}
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clay);
}

.bullets code,
.prose code {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-tint);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); color: var(--accent-ink); }

/* ---------- Footer: icon links live here ---------- */
.site-footer {
  margin-top: auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.social a:hover { color: var(--accent); background: var(--accent-soft); }
.social svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Not found ---------- */
.nf { padding: 90px 0 110px; }
.nf .page-title { margin-bottom: 14px; }
.nf p { color: var(--muted); margin-bottom: 28px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }

  .header-inner { gap: 10px 12px; }
  .wordmark { margin-right: 0; width: 100%; }
  .nav { margin-right: auto; margin-left: -9px; }

  /* Portrait stays beside the name, just smaller */
  .intro { gap: 16px; }

  .defs > div { grid-template-columns: 1fr; gap: 4px; }
  .defs dt { padding-top: 0; }

  .detail { padding-left: 20px; }
  .detail h4::before { left: -24px; }
}
