/* Minimal one-page personal site. No framework. */

:root {
  --text: #111;
  --muted: #666;
  --link: #1a4fa3;
  --accent: #b4532a;
  --rule: #e5e5e5;
  --tag: #f1f1f1;
  --max: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}
h1 {
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 2rem;
  font-optical-sizing: auto;
}
h2 {
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.25rem;
  font-optical-sizing: auto;
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
h3 {
  font-size: 1rem;
  margin: 18px 0 6px;
}
h4 {
  font-size: 0.95rem;
  margin: 12px 0 4px;
  color: #333;
}

p {
  margin: 0 0 12px;
}
ul,
ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
li {
  margin-bottom: 4px;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--tag);
  padding: 1px 4px;
  border-radius: 3px;
}
blockquote {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}
img {
  max-width: 100%;
  height: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 8px 0 12px;
}
th,
td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-weight: 600;
}

/* ---------- header ---------- */
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.header-text {
  flex: 1;
}
.hangul {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: inherit;
  color: var(--accent);
}
.affiliation {
  margin: 8px 0 6px;
  color: var(--muted);
}
.links {
  margin: 0;
}
.portrait {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

#about {
  margin-top: 28px;
}

/* ---------- entries (education / experience) ---------- */
.entry {
  margin-bottom: 18px;
}
.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.entry-title {
  font-weight: 600;
}
.entry-date {
  color: var(--muted);
  white-space: nowrap;
}
.entry-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.entry ul {
  margin-bottom: 0;
}

/* ---------- projects ---------- */
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -4px;
}
.project {
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
}
.project:last-of-type {
  border-bottom: 0;
}
.project summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  position: relative;
  padding-right: 22px;
}
.project summary::-webkit-details-marker {
  display: none;
}
.project summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}
.project[open] summary::after {
  content: "–";
}
.project-title {
  font-weight: 600;
}
.tag {
  display: inline-block;
  justify-self: start;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tag);
  color: #333;
}
.tag-muted {
  font-weight: 400;
  color: var(--muted);
}
.project-meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.project-blurb {
  font-size: 0.95rem;
}
.project-links {
  font-size: 0.9rem;
}
.project-body {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
}
.project-body > :last-child {
  margin-bottom: 0;
}
.figure {
  text-align: center;
}

/* ---------- news ---------- */
.news {
  list-style: none;
  padding: 0;
}
.news li {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}
.news-date {
  flex: 0 0 72px;
  color: var(--muted);
  white-space: nowrap;
}
.news-text {
  flex: 1;
}

/* ---------- footer ---------- */
footer {
  margin-top: 48px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  main {
    padding: 28px 16px 48px;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  .portrait {
    width: 120px;
    height: 120px;
    margin-top: 12px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .entry-date {
    white-space: normal;
  }
}

/* ---------- print ---------- */
@media print {
  main {
    max-width: none;
    padding: 0;
  }
  a {
    color: inherit;
  }
  .hint,
  footer,
  .project summary::after {
    display: none;
  }
  .project-body {
    display: block;
  }
  details:not([open]) > *:not(summary) {
    display: block;
  }
}
