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

:root {
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --nav-bg: #0f172a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.13);
  --max-width: 1120px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Nav ───────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-links .nav-contact {
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-left: 0.5rem;
}

.nav-links .nav-contact:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ── Main wrapper ──────────────────────────────────── */

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

/* ── Section shared ────────────────────────────────── */

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section:first-child {
  border-top: none;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0 3rem;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: block;
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 1.075rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 7px;
  transition: background 0.15s, transform 0.1s;
}

.hero-cta:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* ── Featured grid ─────────────────────────────────── */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card-featured {
  border-top: 3px solid var(--accent);
}

/* ── Filter bar ────────────────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}

.filter-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: #bfdbfe;
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Portfolio grid ────────────────────────────────── */

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

/* ── Card ──────────────────────────────────────────── */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-hidden {
  display: none;
}

.card-img {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.card-img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.card-body {
  padding: 1rem 1.25rem 1.375rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* ── About ─────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.about-highlights ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-highlights li {
  font-size: 0.9375rem;
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
}

.about-highlights li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 0.1em;
}

/* ── Skills ────────────────────────────────────────── */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-group h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-group li {
  font-size: 0.9rem;
  color: var(--text);
}

/* ── Testimonials ──────────────────────────────────── */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.testimonial {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial blockquote {
  position: relative;
}

.testimonial blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: -0.25rem;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-family: Georgia, serif;
  pointer-events: none;
}

.testimonial blockquote p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
  padding-top: 0.75rem;
}

.testimonial figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ── Involvement ───────────────────────────────────── */

.involvement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.involvement-group h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.involvement-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.involvement-group li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.involvement-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.involvement-org {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.involvement-link {
  text-decoration: none;
  transition: opacity 0.15s;
}

.involvement-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.involvement-detail {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Testimonial variants ──────────────────────────── */

.testimonial-wide {
  grid-column: 1 / -1;
}

.testimonial-fun {
  border-left-color: #7c3aed;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 1.75rem;
}

.testimonial-fun blockquote::before {
  color: #7c3aed;
}

.testimonial-fun blockquote p {
  font-size: 1.05rem;
  font-weight: 500;
  padding-top: 0.5rem;
}

.testimonial-fun figcaption {
  color: #7c3aed;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────────── */

footer {
  background: var(--nav-bg);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 1.75rem 1.5rem;
  font-size: 0.875rem;
  margin-top: 3rem;
}

footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover {
  color: #fff;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.5rem;
    padding: 2.5rem 0 2rem;
  }

  .hero-text h1 {
    font-size: 1.9rem;
  }

  .hero-bio {
    font-size: 1rem;
  }

  .hero-cta {
    width: 100%;
    text-align: center;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-fun {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .testimonial-fun figcaption {
    white-space: normal;
  }

  .involvement-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-links a:not(.nav-contact) {
    display: none;
  }
}
