/* Shared design system — quiet, typographic, light */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1c1c1c;
  --text-muted: #5a5a5a;
  --text-faint: #8a8a8a;
  --border: #e4e2dc;
  --link: #1c1c1c;
  --focus: #1c1c1c;
  --radius: 8px;
  --max-width: 840px;
  --nav-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text-muted);
}

/* ===== Navigation ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand:hover {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

.nav-links a:focus-visible,
.nav-brand:focus-visible,
.social-links a:focus-visible,
.info-list a:focus-visible,
.entry-title a:focus-visible,
.entry-meta a:focus-visible,
.entry-subtitle a:focus-visible,
.project-title a:focus-visible,
.project-desc a:focus-visible,
.project-kicker a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ===== Page shell ===== */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px 80px;
  min-height: calc(100vh - var(--nav-height));
}

.page-header {
  margin: 0 0 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
  text-align: left;
}

.page-lede {
  margin: 0;
  max-width: 42em;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.page-content--empty {
  min-height: 28vh;
}

/* ===== Sections ===== */
.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 20px;
}

.content-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 40px;
  margin: 0 0 8px;
  color: var(--text);
}

.content-card + .content-card {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ===== Experience entries ===== */
.entry-list {
  display: flex;
  flex-direction: column;
}

.entry-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.entry-item:first-child {
  padding-top: 0;
}

.entry-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.entry-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.entry-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
}

.entry-date {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.entry-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.entry-subtitle a {
  color: inherit;
}

.entry-meta {
  font-size: 0.9rem;
  color: var(--text-faint);
  line-height: 1.65;
}

.entry-meta a {
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Social links ===== */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 0;
  padding: 32px 0 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.social-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.social-links a:not(:last-child)::after {
  content: "·";
  display: inline-block;
  margin: 0 10px;
  color: var(--text-faint);
  pointer-events: none;
}

.social-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.social-links--on-card {
  border-top: 1px solid var(--border);
  justify-content: center;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .nav-inner,
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-inner {
    height: auto;
    min-height: var(--nav-height);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 10px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 4px 16px;
  }

  .page {
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .entry-item {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .entry-logo {
    width: 44px;
    height: 44px;
  }

  .entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
