/* Manuel Quintero Coronel — site styles */

:root {
  color-scheme: light;
  --bg: #F6F7F5; --surface: #FFFFFF; --ink: #16232A; --text: #2B3940; --muted: #62707A; --line: #E2E6E3;
  --accent: #A04A2A; --soft: #F5E6DF;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101719; --surface: #162023; --ink: #EEF3F2; --text: #CCD7D6; --muted: #8C9A9C; --line: #25323A;
    --accent: #EC9A78; --soft: #3A2119;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- masthead ---------- */
.mast { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mast-in { max-width: 1120px; margin: 0 auto; padding-inline: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font: 500 20px/1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.tabs { position: relative; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { font: 500 15px/1 var(--sans); color: var(--muted); padding: 12px; white-space: nowrap; border-radius: 8px; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); }
.tab.cv { color: var(--accent); }
.ink-bar { position: absolute; bottom: 2px; left: 0; width: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: left .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); }

/* ---------- layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 40px 24px 96px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
aside { position: sticky; top: 104px; align-self: start; display: grid; gap: 18px; }
.portrait { aspect-ratio: 1; max-width: 100%; border-radius: 20px; overflow: hidden; background: var(--soft); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who h1 { font: 500 28px/1.15 var(--serif); color: var(--ink); margin: 0 0 6px; text-wrap: balance; }
.who p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.who .role { color: var(--text); font-weight: 500; }
.links { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.links li { display: flex; align-items: center; gap: 10px; }
.links svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.links a { color: var(--text); text-decoration: none; }
.links a:hover { color: var(--accent); }

/* ---------- sections (tabs) ---------- */
.js .panel:not(.active) { display: none; }
.js .panel.active { animation: rise .45s cubic-bezier(.2,.8,.2,1); }
.panel + .panel { margin-top: 72px; }
.js .panel + .panel { margin-top: 0; }
@keyframes rise { from { opacity: .001; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lede { font: 400 clamp(26px, 3.2vw, 34px)/1.25 var(--serif); color: var(--ink); margin: 0 0 22px; max-width: 30ch; text-wrap: balance; }
.prose p { margin: 0 0 14px; max-width: 64ch; }
section + section { margin-top: 52px; }
.prose + section { margin-top: 44px; }
h2 { font: 600 12.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.interests { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.interest { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; transition: border-color .2s, transform .2s; }
.interest:hover { border-color: var(--accent); transform: translateY(-2px); }
.interest i { display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 14px; }
.interest b { display: block; font: 500 19px/1.25 var(--serif); color: var(--ink); margin-bottom: 6px; }
.interest span { font-size: 14.5px; color: var(--muted); line-height: 1.5; display: block; }

.timeline { display: grid; }
.row { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.news .row { padding: 10px 0; }
.when { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.what b { color: var(--ink); font-weight: 600; }
.what span { display: block; color: var(--muted); font-size: 15px; }
.what ul { margin: 8px 0 0; padding-left: 18px; font-size: 15px; }
.what li { margin-bottom: 4px; }

.paper { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 8px; }
.paper + .paper { margin-top: 14px; }
.paper .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.pill { background: var(--soft); color: var(--accent); font-weight: 600; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; }
.paper h3 { font: 500 21px/1.3 var(--serif); color: var(--ink); margin: 0; text-wrap: balance; }
.paper .authors { font-size: 15px; color: var(--muted); }
.paper .authors b { color: var(--ink); font-weight: 600; }
.paper p { margin: 2px 0 0; font-size: 15.5px; max-width: 66ch; }
.abc { font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; margin-left: 4px; white-space: nowrap; }
.note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.what .btns { margin-top: 10px; }
.btn { font: 600 13.5px/1 var(--sans); text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--bg); padding: 9px 13px; border-radius: 10px; transition: border-color .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }

.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skills span { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.contact { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 880px) {
  .page { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  aside { position: static; grid-template-columns: 120px 1fr; align-items: center; column-gap: 18px; }
  .portrait { border-radius: 16px; }
  .links { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .interests { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mast-in, .page { padding-inline: 16px; }
  .brand { display: none; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
