*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #1f1f1f;
  --text: #d0d0d0;
  --text-strong: #e8e8e8;
  --text-muted: #7c7c7c;
  --link: #6d84d6;
  --link-hover: #8ea2eb;
  --border: #323232;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --text: #2c2c2c;
  --text-strong: #111111;
  --text-muted: #6e6e6e;
  --link: #3b59c9;
  --link-hover: #243fa6;
  --border: #e5e5e5;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 1.5px solid var(--link);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Landing page */

.landing {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 7rem) 1.5rem 4rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.site-subtitle {
  margin-top: 0.45rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text);
  font-size: 1rem;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--link);
}

.nav-links a:hover {
  color: var(--text-strong);
  border-bottom-color: var(--link-hover);
}

.intro {
  font-size: 1rem;
  color: var(--text);
}

/* Theme toggle */

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-strong);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* Subpages */

.page {
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.back {
  align-self: flex-start;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.back:hover {
  color: var(--text-strong);
}

.page main {
  margin-top: 2.75rem;
  flex: 1;
}

.page-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Prose (About & Experience) */

.prose {
  margin-top: 2rem;
}

.prose p + p {
  margin-top: 1.15rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.25rem 0;
}

.prose h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.prose h2:not(:first-child) {
  margin-top: 1.75rem;
}

.prose .note {
  font-style: italic;
  color: var(--text-muted);
}

/* Posts list */

.post-list {
  list-style: none;
  margin-top: 2rem;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.35rem 0;
}

.post-item a {
  color: var(--link);
}

.post-item a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-date {
  color: var(--link);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty-note {
  margin-top: 1.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Experience list */

.entry-list {
  list-style: none;
  margin-top: 2rem;
}

.entry-list--compact {
  margin-top: 0.75rem;
}

.entry {
  padding: 0.85rem 0;
}

.entry + .entry {
  border-top: 1px solid var(--border);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
}

.entry-role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-strong);
}

a.entry-role {
  color: var(--link);
}

a.entry-role:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-org {
  font-size: 0.95rem;
  color: var(--link);
  white-space: nowrap;
}

.entry-desc {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--text);
}

.entry-meta {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */

.footer {
  margin-top: auto;
  padding-top: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-strong);
}

@media (max-width: 560px) {
  .post-item,
  .entry-header {
    flex-direction: column;
    gap: 0.15rem;
  }

  .post-item {
    padding: 0.55rem 0;
  }
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-icons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  color: var(--text-muted);
}

