/* ===========================================================================
   tjiaranata.com — base stylesheet
   Plain CSS, no framework. All theming lives in :root variables so a later
   restyle is a single-file change. Light is primary; dark via prefers-color-scheme.
   =========================================================================== */

:root {
  --max-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --bg: #ffffff;
  --fg: #1c1d20;
  --muted: #6b7280;
  --accent: #8a1538;          /* maroon — easy to swap later */
  --accent-hover: #b51d49;
  --rule: #e6e7ea;
  --tag-bg: #f4f1f2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --fg: #e6e7ea;
    --muted: #9aa0aa;
    --accent: #ff8fb0;
    --accent-hover: #ffb3c9;
    --rule: #2a2c33;
    --tag-bg: #22242b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Header ===== */
.hero {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}
.hero__photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}
.hero__intro h1 {
  margin: 0 0 .35rem;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero__title {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ===== Profile links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
}
.links a {
  font-size: .9rem;
  padding: .25rem .65rem;
  background: var(--tag-bg);
  border-radius: 999px;
}
.links a:hover { text-decoration: none; background: var(--accent); color: #fff; }

/* ===== Sections ===== */
section { margin-bottom: 2.25rem; }

h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); font-size: .9rem; }

/* ===== Research interests ===== */
.interests {
  margin: 0;
  padding-left: 1.1rem;
}
.interests li { margin-bottom: .35rem; }

/* ===== News & awards ===== */
.news, .awards {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news li, .awards li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: .25rem 1rem;
  padding: .35rem 0;
  align-items: baseline;
}
.news__date {
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ===== Publications ===== */
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pub;
}
.pub { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.pub:last-child { border-bottom: none; }
.pub__title { font-weight: 600; display: inline-block; margin-bottom: .15rem; }
.pub__authors { color: var(--fg); font-size: .92rem; opacity: .85; }
.pub__venue { color: var(--muted); font-size: .85rem; font-style: italic; }

/* ===== Communities ===== */
.communities { font-size: 1rem; }

/* ===== Footer ===== */
footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
footer p { margin: 0 0 .25rem; }

/* ===== Responsive ===== */
@media (max-width: 540px) {
  main { padding: 2rem 1.1rem 3rem; }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1.1rem;
  }
  .hero__photo { width: 120px; height: 120px; }
  .hero__intro h1 { font-size: 1.6rem; }
  .news li, .awards li {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .news__date { font-size: .78rem; }
}
