/*
 * Static site — aligned visually with the Next.js app theme.
 *
 * Design tokens (palette, surfaces, accents, dark-mode overrides) live in
 * `common/css/tokens.css` at the repository root and are shared with the
 * Next.js site. The import below is resolved through the `static/common`
 * symlink so the static site remains servable as-is (no build step).
 */
@import url("../common/css/tokens.css");

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "DM Sans",
    ui-sans-serif,
    system-ui,
    sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.site-title {
  font-family:
    "Instrument Serif",
    ui-serif,
    Georgia,
    serif;
  font-weight: 400;
  line-height: 1.2;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 1rem 2rem;
  }
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
}

.brand-badge {
  border-radius: 0.125rem;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-name {
  font-size: 1rem;
}

.brand:hover .brand-name {
  color: var(--accent);
}

.nav {
  display: none;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--muted-surface);
  color: var(--text);
}

main {
  flex: 1;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

@media (min-width: 640px) {
  .wrap {
    padding: 4.5rem 2rem;
  }
}

.wrap-narrow {
  max-width: 48rem;
}

.eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin: 1rem 0 0;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.75;
}

.actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--muted-surface);
}

.panel {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
  padding: 2rem;
}

.grid-hero {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .grid-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

.glance dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.glance dd {
  margin: 0;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 16rem;
}

.glance-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.glance-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.section-lede {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 42rem;
}

.hobby-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .hobby-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin: 0.75rem 0 0;
  font-size: 1.5rem;
}

.card p {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 2rem;
  }
}

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

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

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

/* Blog list */
.post-list {
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-list a {
  display: block;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
}

.post-list a:hover {
  background: var(--muted-surface);
}

.post-list h2 {
  margin: 0;
  font-size: 1.5rem;
}

.post-list time {
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-list .excerpt {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Article */
.article-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.article-header .desc {
  margin-top: 1rem;
  color: var(--muted);
}

.article-body {
  margin-top: 2.5rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: color-mix(in oklab, var(--text) 88%, var(--muted));
}

.article-body h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.75rem;
}

.article-body h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.15rem;
  font-family: inherit;
  font-weight: 650;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.article-body code {
  font-size: 0.95em;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.12rem 0.35rem;
}

.back-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

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

/* About timeline */
.timeline {
  margin: 2.5rem 0 0;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.78rem;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
}

.timeline-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

.timeline-item ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.two-col {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.box {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  padding: 2rem;
}

.box-alt {
  background: var(--surface-2);
}

.skills h3 {
  margin: 1.5rem 0 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: inherit;
  font-weight: 600;
  color: var(--muted);
}

.skills h3:first-child {
  margin-top: 0;
}

.skills ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.mobile-nav {
  display: block;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface-2);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-menu {
  position: absolute;
  right: 1.5rem;
  margin-top: 0.5rem;
  width: 12rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.mobile-menu a:hover {
  background: var(--muted-surface);
  color: var(--text);
}

.header-wrap {
  position: relative;
}
