/* ------------------------------------------------------------------
   Nico Dominguez — personal site
   Layout modeled on a minimal academic template; text set in Gentium Basic.
   ------------------------------------------------------------------ */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --rule: #e4e4e4;
  --pill: #d6d6d6;
  --accent: #1f5c99;
  --serif: "Gentium Basic", "Gentium Book Plus", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #141414;
  --text: #f3f3f3;
  --muted: #a8a8a8;
  --rule: #2a2a2a;
  --pill: #3d3d3d;
  --accent: #8eb8e0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.6;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

.container {
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1.35rem 0 .8rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-title a { text-decoration: none; }

nav { display: flex; align-items: center; gap: 1.15rem; font-size: 1.02rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.theme {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme svg { width: 1.05rem; height: 1.05rem; }
.theme .sun { display: none; }
html[data-theme="dark"] .theme .sun { display: block; }
html[data-theme="dark"] .theme .moon { display: none; }

/* ---------- Home intro ---------- */
.intro {
  display: grid;
  grid-template-columns: 22rem 1fr;
  gap: 1.35rem 2.25rem;
  align-items: start;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  font-size: .95rem;
}
.contact strong { margin-right: .2rem; }

.pill {
  display: inline-block;
  padding: .12rem .7rem;
  border: 1px solid var(--pill);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.5;
}
.pill:hover { color: var(--text); border-color: var(--muted); }

.welcome { margin: 0 0 .6rem; font-size: 1.5rem; font-weight: 400; }

.bio p { margin: 0 0 1rem; text-align: justify; hyphens: auto; }

/* ---------- Inner pages ---------- */
.page-title {
  margin: 0 0 .25rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section { margin-top: 2.1rem; }

.section h3 {
  margin: 0 0 .85rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry { margin: 0 0 1.15rem; }
.entry p { margin: .15rem 0 0; }

.title { font-weight: 700; }
a.title { text-decoration: underline; }

.detail { color: var(--muted); }
.status { color: var(--accent); }

.abstract-toggle {
  margin-left: .35rem;
  padding: .1rem .55rem;
  border: 1px solid var(--pill);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .8rem;
  line-height: 1.2;
  vertical-align: 2px;
  cursor: pointer;
}
.abstract-toggle:hover { border-color: var(--muted); }

.abstract {
  margin: .35rem 0 0;
  padding-top: .5rem;
  color: var(--muted);
  font-size: .95rem;
  text-align: justify;
  hyphens: auto;
}
.abstract[hidden] { display: none; }

.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li { margin-bottom: .35rem; }

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .site-header { position: static; }
  .intro { grid-template-columns: 1fr; }
  .portrait { max-width: 20rem; }
  .bio p { text-align: left; }
}
