/* =========================================
   Personal Website — dark editorial styles
   ========================================= */

/* Design tokens (edit here to re-theme) */
:root {
  --bg: #101010;
  --surface: #161616;
  --text: #F0EEE9;
  --text-secondary: #9A968C;
  --border: #2A2A2A;
  --accent: #C08A2E;
  --accent-hover: #E0A54A;
  --max-width: 720px;        /* readable line length */
  --space: 1.5rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Apple Garamond", "Times New Roman", "Liberation Serif", serif;
}

/* Reset & base */
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
}
* { box-sizing: border-box; }

/* Links */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Headings — serif for an editorial feel */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 1rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.35rem; }

/* Layout */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* Skip link (keyboard accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #101010;
  font-weight: 600;
  text-decoration: none;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}
.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--accent); text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent); }

/* Main content */
main {
  min-height: 40vh;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Hero */
.hero h1 { font-size: 3rem; margin-bottom: 0.75rem; }
.hero .intro {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 48ch;
}

/* Status line ("Currently exploring ...") */
.status-line {
  margin: 1.5rem 0 3rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
}
.status-text { color: var(--text-secondary); }

/* Typography helpers */
.page h2 { margin-top: 3rem; }
.page h3 { margin-top: 2rem; }
p { margin: 0 0 1.25rem; }
p + p { margin-top: 0; }

/* Standfirst (intro paragraph on section pages) */
.standfirst {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 2rem;
}

/* Projects list */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.project-item:last-child { border-bottom: none; }
.project-item h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.project-item p { margin-bottom: 0.75rem; font-size: 1rem; }
.tech-labels { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.tech-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.project-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.95rem;
}
.project-link:hover { color: var(--accent-hover); }

/* Panels (about page grid) */
.grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}
.three-col { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 6px;
}
.panel-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.plain-list { list-style: disc inside; margin: 0; padding: 0; color: var(--text-secondary); }
.plain-list li { margin-bottom: 0.5rem; }

/* Articles */
.article-list { list-style: none; margin: 0; padding: 0; }
.article-item { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.article-item:last-child { border-bottom: none; }
.article-item h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.article-item h3 a { color: var(--text); text-decoration: none; }
.article-item h3 a:hover { color: var(--accent); }
.article-date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}
.empty-state h2 { font-size: 1.6rem; margin-bottom: 0.5rem; color: var(--text); }

/* Contact */
.contact-details h2 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.social-list li { margin: 0; }
.social-list a { color: var(--text-secondary); text-decoration: none; }
.social-list a:hover { color: var(--text); }

/* Note callout (placeholder disclaimers) */
.note {
  margin-top: 3rem;
  padding: 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
@media (min-width: 600px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
.footer-inner p { margin: 0; }
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a { color: var(--text-secondary); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

/* Visually hidden (screen-reader only) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion — respect user preference */
@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;
  }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.15rem; }
  .site-header { padding: 1.25rem 0; }
  .site-header .wrapper { flex-direction: column; align-items: stretch; gap: 1rem; }
  .site-nav ul { justify-content: center; }
  main { padding-top: 1.5rem; padding-bottom: 2.5rem; }
}
