:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #222222;
  --muted: #555555;
  --line: #dddddd;
  --accent: #333333;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181818;
    --paper: #181818;
    --ink: #ededed;
    --muted: #b8b8b8;
    --line: #3a3a3a;
    --accent: #f0f0f0;
  }
}

:root[data-theme="dark"] {
  --bg: #181818;
  --paper: #181818;
  --ink: #ededed;
  --muted: #b8b8b8;
  --line: #3a3a3a;
  --accent: #f0f0f0;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #222222;
  --muted: #555555;
  --line: #dddddd;
  --accent: #333333;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 24px 50px;
}

.profile-card {
  padding: 0;
  background: var(--paper);
}

.intro {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.portrait-wrap {
  width: 116px;
  height: 116px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper);
}

.portrait {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 38%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

.role {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 400;
}

.intro-text p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.link-row,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  color: var(--muted);
}

.link-row a + a::before,
.contact-links a::before,
.theme-toggle::before {
  color: var(--muted);
  content: "/";
  margin-right: 10px;
}

.theme-toggle {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.theme-toggle span {
  display: inline-block;
  filter: grayscale(1);
  opacity: 0.72;
}

.theme-toggle[aria-pressed="true"] span {
  filter: none;
  opacity: 1;
}

.content-section {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.intro + .content-section {
  border-top: 0;
}

.content-section h2 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.plain-list li + li {
  margin-top: 6px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline article {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
}

.time {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.timeline h3 {
  margin-bottom: 2px;
  font-size: 0.98rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.timeline p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
  }

  .page {
    padding: 22px 18px 40px;
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .portrait-wrap {
    width: 108px;
    height: 108px;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 1.72rem;
  }
}
