/* ==========================================================================
   Daniel Foust — site styles
   Plain CSS, no build step. Colors driven by custom properties below.
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-text: #1c2128;
  --color-text-muted: #57606a;
  --color-border: #e2e5e9;
  --color-accent: #1f5f4f;
  --color-accent-hover: #164539;
  --color-card-bg: #ffffff;
  --shadow-card: 0 1px 2px rgba(20, 24, 30, 0.06), 0 1px 1px rgba(20, 24, 30, 0.04);
  --max-width: 880px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14171c;
    --color-bg-alt: #1b1f26;
    --color-text: #e6e8eb;
    --color-text-muted: #9aa4af;
    --color-border: #2b3038;
    --color-accent: #4fb693;
    --color-accent-hover: #6fcaab;
    --color-card-bg: #1b1f26;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.hero-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-border);
}

.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.hero .role {
  font-size: 1.15rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.hero p.lede {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}

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

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

/* ---------- Sections ---------- */

section {
  padding: 2.5rem 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

section h2 {
  font-size: 1.4rem;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

section h3 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

/* ---------- Social / contact links ---------- */

.social-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.social-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.social-links a:hover {
  color: var(--color-accent);
}

/* ---------- Project cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  margin-bottom: 0.4rem;
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.project-card.placeholder {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
}

.project-card.placeholder p {
  flex-grow: 0;
}

/* ---------- Resume / timeline ---------- */

.timeline-item {
  margin-bottom: 1.5rem;
}

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

.timeline-item .meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.timeline-item .org {
  font-weight: 600;
  color: var(--color-text);
}

.timeline-item ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.timeline-item li {
  margin-bottom: 0.35rem;
}

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

.timeline-item p {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-list .tag {
  font-size: 0.85rem;
}

.resume-download {
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Utility / notes ---------- */

.note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 560px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .hero-photo {
    width: 110px;
    height: 110px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}
