:root {
  --red: #c00404;
  --ink: #221a13;
  --brown: #4e3629;
  --body-text: #4b4038;
  --muted: #6b6156;
  --border: #ddd8d0;
  --cream: #f7f5f2;
  --footer-muted: #b89e8c;
  --footer-link: #e7d9cd;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
}

.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 3px solid var(--red);
}

.site-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--brown);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__links a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.site-nav__links a[aria-current="page"] {
  text-decoration: underline;
}

.site-nav__links a.btn-connect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: var(--red);
  padding: 9px 18px;
  border-radius: 4px;
}

/* Page hero (Projects / Resume) */
.page-hero {
  background: var(--cream);
  padding: 80px 32px;
}

.page-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}

.page-hero h1 {
  font-size: 52px;
  font-weight: 700;
  margin: 16px 0 0;
  color: var(--ink);
}

.page-hero p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--body-text);
  max-width: 660px;
  margin: 16px 0 0;
}

/* Home hero */
.hero {
  background: var(--cream);
  padding: 80px 32px;
}

.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1 {
  font-size: 60px;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  max-width: 780px;
  color: var(--ink);
}

.hero p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--body-text);
  margin: 0;
  max-width: 660px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 4px;
  text-decoration: none;
}

/* Stats */
.stats {
  background: #ffffff;
  padding: 64px 32px;
}

.stats__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.stats__cell {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--brown);
}

.stats__value--sm {
  font-size: 20px;
  line-height: 1.3;
}

.stats__label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* About */
.about {
  background: var(--cream);
  padding: 72px 32px;
}

.about__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
}

.about__photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 4px;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about__body h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.about__body p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--body-text);
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--brown);
}

.tag--sm {
  font-size: 12px;
  padding: 4px 10px;
}

/* Featured work / project cards */
.featured {
  background: #ffffff;
  padding: 72px 32px;
}

.featured__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.featured__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.featured__header h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.link-arrow {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a.card {
  text-decoration: none;
  color: var(--ink);
}

.card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__body h4 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.card__body p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body-text);
  margin: 0;
}

/* Placeholder image slot */
.img-placeholder {
  width: 100%;
  height: 220px;
  border: 1.5px dashed var(--border);
  background: var(--cream);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  padding: 8px;
}

.img-placeholder--tall {
  height: 240px;
}

.img-placeholder--square {
  height: 100%;
  border-radius: 4px;
}

.card__photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.project-card__photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.photo-crazyflie {
  object-position: center 60%;
}

/* Projects page */
.projects {
  background: #ffffff;
  padding: 64px 32px;
}

.projects__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__body h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.project-card__meta {
  font-size: 13px;
  color: var(--muted);
}

.project-card__body ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body-text);
}

/* Resume page */
.resume-section {
  background: #ffffff;
  padding: 64px 32px;
}

.resume-section__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.resume-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 40px;
}

.resume-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resume-block h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--brown);
}

.resume-block__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resume-entry-title {
  font-size: 17px;
  font-weight: 600;
}

.resume-entry-sub {
  font-size: 16px;
  color: var(--body-text);
  margin-top: 2px;
}

.resume-entry-meta {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.skill-group + .skill-group {
  margin-top: 20px;
}

.skill-group__label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.job {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job + .job {
  margin-top: 32px;
}

.job__header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.job__title {
  font-size: 16px;
  font-weight: 600;
}

.job__dates {
  font-size: 14px;
  color: var(--muted);
}

.job__subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-top: 2px;
}

.job ul {
  margin: 8px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body-text);
}

.awards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.award {
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 16px;
  font-size: 16px;
}

/* Footer */
.site-footer {
  background: var(--brown);
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.site-footer__col a {
  font-size: 14px;
  color: var(--footer-link);
  text-decoration: none;
}

.site-footer__heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

.site-footer__bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 32px;
  font-size: 13px;
  color: var(--footer-muted);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    background: #ffffff;
    padding: 24px 32px 32px;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .site-nav__links.is-open {
    display: flex;
  }

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

  .about__photo {
    width: 100%;
    height: 220px;
  }

  .stats__grid,
  .card-grid,
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .resume-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .page-hero h1 {
    font-size: 38px;
  }
}
