/* Heon Lee — personal site
   Ryan-Jung-spare aesthetic. Jason-Zhao single-column format.
   Black on white, generous whitespace, one quiet serif. */

:root {
  --ink: #111;
  --ink-soft: #555;
  --ink-faint: #999;
  --paper: #fafaf7;
  --rule: #e6e4dd;
  --measure: 620px;
  --gap: 2.25rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", "Palatino",
               "Georgia", "Source Serif Pro", serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

/* --- Nav ----------------------------------------------------- */

.topnav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.topnav .brand {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.topnav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 120ms ease;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--ink);
}

/* --- Bio header ---------------------------------------------- */

.bio p {
  margin: 0 0 1.15rem;
}

.bio .about {
  color: var(--ink-soft);
}

/* --- Interests list ------------------------------------------ */

.interests {
  margin-top: var(--gap);
  margin-bottom: calc(var(--gap) * 1.5);
}

.interests ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.interests li {
  padding: 0.35rem 0;
  color: var(--ink);
}

.interests li::before {
  content: "—";
  color: var(--ink-faint);
  display: inline-block;
  width: 1.5rem;
  margin-left: -1.5rem;
}

/* --- Sections (Writing, Projects, Elsewhere) ----------------- */

section[id] {
  margin-top: calc(var(--gap) * 1.6);
}

section h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

ul.lined {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.lined > li {
  padding: 0.75rem 0;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
}

ul.lined > li + li {
  border-top: 1px dotted var(--rule);
}

ul.lined .year {
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
}

ul.lined .entry {
  display: block;
  min-width: 0;
}

ul.lined .meta {
  color: var(--ink-soft);
}

ul.lined a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 120ms ease;
}

ul.lined a:hover {
  border-bottom-color: var(--ink);
}

ul.lined strong {
  font-weight: 600;
}

/* --- Elsewhere (inline links) -------------------------------- */

ul.inline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 14px;
}

ul.inline a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 120ms ease;
}

ul.inline a:hover {
  color: var(--ink);
}

/* --- Closing quote ------------------------------------------- */

.closing {
  margin-top: calc(var(--gap) * 2);
  padding-top: var(--gap);
  border-top: 1px solid var(--rule);
}

.closing blockquote {
  margin: 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}

.closing cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 13px;
  color: var(--ink-faint);
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
}

/* --- Contact page -------------------------------------------- */

.contact h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Inter",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.contact p {
  margin: 0 0 1.1rem;
}

.contact .email a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 18px;
}

.contact .email a:hover {
  border-bottom-color: var(--ink);
}

.contact .closing-line {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* --- Small screens ------------------------------------------- */

@media (max-width: 540px) {
  main { padding: 2.5rem 1.25rem 4rem; }
  .topnav { margin-bottom: 2.5rem; }
  .topnav ul { gap: 1rem; }
  ul.lined > li {
    grid-template-columns: 1fr;
    row-gap: 0.2rem;
  }
  ul.lined .year { padding-top: 0; }
}
