/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  /* Color: neutral base + single accent */
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-surface: #ffffff;
  --color-border: #e5e5e0;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c58;
  --color-text-faint: #8a8a85;
  --color-accent: #2f6f4f;
  --color-accent-hover: #244f39;
  --color-accent-soft: #e8f0ea;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 2.75rem;

  --lh-tight: 1.2;
  --lh-normal: 1.6;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;

  /* Layout */
  --content-max-width: 52rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition-fast: 150ms ease;

  /* Photo slot fallback — overridden with a real image later */
  --hero-portrait-img: none;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

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

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

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-border);
}

.section:first-of-type {
  border-top: none;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-6);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.site-header__name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
}

.nav-list {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
}

.nav-list.is-open {
  display: flex;
}

.nav-list a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.nav-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

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

  .nav-list {
    display: flex;
    flex-direction: row;
    gap: var(--space-5);
    padding-bottom: 0;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: var(--space-12) var(--space-10);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.hero__portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--color-bg-alt);
  background-image: var(--hero-portrait-img);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  --hero-portrait-img: url('../assets/images/headshot.jpeg');
}

.hero__name {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}

.hero__title {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.hero__location {
  font-size: var(--fs-sm);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

.hero__lede {
  margin-top: var(--space-4);
  font-size: var(--fs-md);
  color: var(--color-text);
  max-width: 40rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 640px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
  }

  .hero__portrait {
    width: 160px;
    height: 160px;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
}

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

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

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

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

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

/* ==========================================================================
   About
   ========================================================================== */

.about__body {
  max-width: 42rem;
  font-size: var(--fs-md);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Cards (experience + projects)
   ========================================================================== */

.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.experience-card,
.project-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.experience-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.experience-card__header h3,
.project-card h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.experience-card__dates,
.project-card__dates {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  white-space: nowrap;
}

.experience-card__meta {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
}

.experience-card ul,
.project-card p {
  color: var(--color-text-muted);
}

.experience-card li {
  position: relative;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-2);
}

.experience-card li:last-child {
  margin-bottom: 0;
}

.experience-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.project-card p {
  font-size: var(--fs-sm);
  margin-top: var(--space-1);
}

/* ==========================================================================
   Tag lists (skills, project tech)
   ========================================================================== */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.tag-list li {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-accent-hover);
  background-color: var(--color-accent-soft);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.skills-group h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
}

.skills-group p {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

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

/* ==========================================================================
   Interests
   ========================================================================== */

.interest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.interest-tile {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.interest-tile__image {
  aspect-ratio: 4 / 3;
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
}

.interest-tile__body {
  padding: var(--space-5);
}

.interest-tile__body h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.interest-tile__body p {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

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

/* ==========================================================================
   Resume section
   ========================================================================== */

.resume__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.resume__meta {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Contact section
   ========================================================================== */

.contact-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.contact-list__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contact-list__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
}

.contact-list__item a,
.contact-list__item span:not(.contact-list__label) {
  font-size: var(--fs-sm);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-8);
}

.site-footer__inner {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
