/* carinamc.com — "notebook" theme
   Layout: graph-paper ground, one centered column, white paper cards with an
   offset shadow in the page's track color. One deliberate light look. */

:root {
  --ground: #F5F7F4;
  --grid: rgba(31, 58, 147, 0.07);
  --paper: #FFFFFF;
  --ink: #1A1D2E;
  --body: #3A3F52;
  --muted: #4A5063;
  --rule: #B9C0D0;
  --placeholder: #EEF1F6;
  --highlight: #FFE27A;

  /* Track colors; each page sets --accent from one of these */
  --c-analytics: #1F3A93;
  --c-design: #0E6B5C;
  --c-tutoring: #A43E1B;
  --accent: var(--c-analytics);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 70rem;
  color-scheme: light;
}

body.track-analytics { --accent: var(--c-analytics); }
body.track-design    { --accent: var(--c-design); }
body.track-tutoring  { --accent: var(--c-tutoring); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 2rem;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- Header / nav ---------- */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
}
.brand {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem;
  text-decoration: none;
}
.nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem;
  font-family: var(--mono); font-size: 0.82rem;
}
.nav a { text-decoration: none; padding: 0.5rem 0.25rem; }
.nav a[aria-current="page"] { background: var(--highlight); color: var(--ink); }
.nav .btn-resume {
  background: var(--ink); color: var(--paper); padding: 0.55rem 1rem;
}
.nav .btn-resume:hover { background: var(--accent); color: var(--paper); }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  color: var(--accent);
}
.label::before { content: "// "; }

.hl {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%);
}

.lede { font-size: 1.22rem; color: var(--body); max-width: 40rem; }

.meta { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }

/* ---------- Sections ---------- */
main > section { padding-block: 0 4.5rem; }

.hero { padding-block: 4.5rem 3.5rem !important; display: flex; flex-direction: column; gap: 1.5rem; }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.06; letter-spacing: -0.02em;
  max-width: 20ch;
}
.hero.hub h1 { max-width: 15ch; }

.section-head { margin-bottom: 1.75rem; }
.section-head .label { display: block; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; font-weight: 700;
  text-decoration: none; border: 1.5px solid var(--ink);
  background: var(--paper); color: var(--ink);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Paper (cards) ---------- */
.paper {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1.75rem;
}
.paper.raised { box-shadow: 5px 5px 0 var(--accent); }

.grid {
  display: flex; flex-wrap: wrap; gap: 1.75rem;
}
.grid > * { flex: 1 1 18rem; min-width: 0; }

/* Track doors on the hub */
.door { display: flex; flex-direction: column; gap: 0.85rem; }
.door h3 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.2; }
.door p { color: var(--body); }
.door .tools { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.door .go { margin-top: auto; padding-block: 0.5rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.door.analytics { --accent: var(--c-analytics); }
.door.design { --accent: var(--c-design); }
.door.tutoring { --accent: var(--c-tutoring); }

/* At-a-glance strip */
.glance { display: flex; flex-wrap: wrap; padding: 0; }
.glance > div {
  flex: 1 1 15rem; min-width: 0; padding: 1.5rem 1.75rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  border-left: 1px dashed var(--rule);
}
.glance > div:first-child { border-left: 0; }
.glance .k { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.glance .v { font-size: 1.12rem; font-weight: 500; }

/* How I work */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2rem 2.5rem; }
.steps li { flex: 1 1 17rem; min-width: 0; }
.steps .tag {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem;
  padding: 0.15rem 0.5rem; border: 1.5px solid var(--ink); background: var(--paper);
}
.steps h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.25; margin: 0.85rem 0 0.6rem; }
.steps p { color: var(--body); }

/* Projects */
.project { display: flex; flex-wrap: wrap; gap: 1.75rem 2.5rem; margin-bottom: 2.25rem; }
.project figure { flex: 1.4 1 24rem; min-width: 0; margin: 0; }
.project .body { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.project h3 { font-family: var(--display); font-weight: 600; font-size: 1.65rem; line-height: 1.2; }
.project p { color: var(--body); }
.project strong { color: var(--ink); }
.project .more { margin-top: auto; padding-block: 0.5rem; font-weight: 700; color: var(--accent); text-decoration: none; }

.shot {
  aspect-ratio: 16 / 10; max-width: 100%;
  background: var(--placeholder); border: 1px dashed var(--muted);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding: 1rem;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
/* A figure whose screenshot hasn't been added yet stays hidden; adding an <img> inside .shot shows it */
figure:has(> .shot:not(:has(img))) { display: none; }
figcaption { margin-top: 0.7rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

.mini { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.5rem 1.75rem; }
.mini h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.25; }
.mini p { color: var(--body); }
.mini .more { margin-top: auto; padding-block: 0.5rem; font-weight: 700; color: var(--accent); text-decoration: none; }

/* Lists of facts (tutoring, skills) */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 1.25rem; padding-block: 0.8rem; border-bottom: 1px dashed var(--rule); }
.facts li:last-child { border-bottom: 0; }
.facts .k { flex: 0 0 7rem; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 0.2rem; }
.facts .v { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-family: var(--mono); font-size: 0.82rem; color: var(--body); }

/* Timeline (hub + background) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem;
  padding-block: 1.1rem; border-bottom: 1px dashed var(--rule);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .when { flex: 0 0 7rem; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 0.2rem; }
.timeline .what { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.timeline .role { font-weight: 700; }
.timeline .track { font-family: var(--mono); font-size: 0.75rem; }
.timeline .track.analytics { color: var(--c-analytics); }
.timeline .track.design { color: var(--c-design); }
.timeline .track.tutoring { color: var(--c-tutoring); }
.timeline p { color: var(--body); }

.thread { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; padding: 2.5rem; }
.thread > div { flex: 1 1 18rem; min-width: 0; }
.thread > div + div { flex: 1.3 1 22rem; }
.statement { font-family: var(--display); font-size: 1.55rem; line-height: 1.35; margin-top: 1rem; }

/* Bio with photo */
.bio { display: flex; flex-wrap: wrap; gap: 1.75rem 2.5rem; align-items: center; }
.portrait {
  flex: 0 0 9.5rem; width: 9.5rem; aspect-ratio: 1 / 1; max-width: 100%;
  border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--accent);
  background: var(--placeholder); overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding: 0.5rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait:has(img) { padding: 0; }
.bio-text { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.bio-text p { color: var(--body); max-width: 42rem; }
.bio-text p.statement { color: var(--ink); margin-top: 0; }

/* Closing band */
.closing {
  background: var(--ink); color: var(--paper);
  padding: 2.75rem;
  display: flex; flex-wrap: wrap; gap: 1.75rem 3rem; align-items: flex-end; justify-content: space-between;
}
.closing > div:first-child { flex: 1 1 22rem; min-width: 0; }
.closing .label { color: var(--highlight); }
.closing h2 { font-family: var(--display); font-weight: 400; font-size: 2.3rem; line-height: 1.15; margin: 0.75rem 0 0.85rem; }
.closing p { color: #CDD1DC; max-width: 32rem; }
.closing .btn { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
.closing .btn.ghost { background: transparent; border-color: var(--paper); color: var(--paper); font-family: var(--mono); font-weight: 500; font-size: 0.9rem; }
.closing .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* Footer */
.site-footer { border-top: 1.5px solid var(--ink); background: var(--ground); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .wrap { padding-inline: 1rem; }
  .hero { padding-block: 3rem 2.5rem !important; }
  .paper, .closing, .thread { padding: 1.35rem; }
  .glance > div { border-left: 0; border-top: 1px dashed var(--rule); }
  .glance > div:first-child { border-top: 0; }
  .facts li { flex-direction: column; gap: 0.2rem; }
  .facts .k { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Print: a clean one-pager ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .nav, .actions, .skip, .closing .btn, .more, .go, .shot { display: none !important; }
  .paper, .paper.raised { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .closing { background: #fff; color: #000; border: 1px solid #999; }
  .closing p, .closing .label { color: #000; }
  a { color: #000; text-decoration: none; }
}
