/* ─── Design tokens ─────────────────────────────────────── */
:root {
  --bg:       #ffffff;
  --text:     #1a1a1a;
  --muted:    #666666;
  --border:   #e0e0e0;
  --accent:   #2563eb; /* a clean blue for links and CTAs */

  --font: system-ui, -apple-system, sans-serif;

  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

/* ─── Nav ────────────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-weight: 600;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

/* ─── Main wrapper ───────────────────────────────────────── */
.wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ─── Hero ───────────────────────────────────────────────── */
/* Must be tall enough that all three CHECK 1 items are visible without scrolling */
.hero {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

/* CHECK 1 #1: Name */
.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

/* CHECK 1 #2: Role — reads like a job title */
.hero-role {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

/* CHECK 1 #3: Featured project card */
.featured-project {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md);
}

/* ─── Custom element display fix ────────────────────────── */
/* Browsers treat unknown elements (like <project-card>) as inline by default,
   which breaks border, padding, and layout. These rules make both card styles
   behave like block/flex containers as intended. */
project-card {
  display: block;
}

project-card.project-card {
  display: flex;
  flex-direction: column;
}

/* Reusable small label above project names */
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Primary CTA — the most important button on the page */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-weight: 500;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* Secondary CTA — visible but lower visual weight */
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  transition: border-color 0.15s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ─── Sections (below the fold) ─────────────────────────── */
section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

/* ─── Projects grid ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-sm);
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.card-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* ─── About ──────────────────────────────────────────────── */
.about-text {
  color: var(--muted);
  max-width: 560px;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 540px) {
  nav {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .project-links {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: var(--space-sm);
  }
}