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

:root {
  --color-bg: #F8F9FA;
  --color-text: #212529;
  --color-accent: #0D6E6E;
  --color-section-bg: #E9ECEF;
  --font-family: 'Inter', sans-serif;
  --max-width: 800px;
  --section-gap: 60px;
}

html {
  scroll-behavior: smooth;
}

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

/* ===========================
   Navigation
   =========================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-section-bg);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--color-accent);
}

nav a:focus-visible {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===========================
   Main Layout
   =========================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px var(--section-gap);
}

section {
  padding-top: var(--section-gap);
}

/* ===========================
   Hero
   =========================== */
#hero {
  text-align: center;
  padding-top: 52px;
  padding-bottom: 8px;
}

.headshot {
  display: block;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  margin: 0 auto 22px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.tagline {
  font-size: 1.05rem;
  color: var(--color-text);
  max-width: 580px;
  margin: 0 auto;
}

/* ===========================
   Section Headings
   =========================== */
h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-section-bg);
}

/* ===========================
   About
   =========================== */
#about p + p {
  margin-top: 14px;
}

/* ===========================
   Skills
   =========================== */
.skill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background-color: var(--color-section-bg);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.875rem;
  font-weight: 600;
}

.skill-list.small .skill-tag {
  font-size: 0.8rem;
  padding: 3px 12px;
}

/* ===========================
   Experience
   =========================== */
.experience-card {
  background-color: var(--color-section-bg);
  border-radius: 8px;
  padding: 24px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 2px;
}

.experience-company {
  font-size: 0.95rem;
  color: var(--color-text);
}

.experience-date {
  font-size: 0.875rem;
  color: #495057;
  white-space: nowrap;
}

.experience-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}

.experience-list li {
  padding-left: 1.2em;
  position: relative;
}

.experience-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ===========================
   Projects
   =========================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  background-color: var(--color-section-bg);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card h3 {
  margin-bottom: 0;
}

/* ===========================
   Contact
   =========================== */
#contact p {
  margin-bottom: 20px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-list a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}

.contact-list a:hover {
  border-bottom-color: var(--color-accent);
}

.contact-list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 28px 20px;
  font-size: 0.85rem;
  color: #6c757d;
  border-top: 1px solid var(--color-section-bg);
  margin-top: var(--section-gap);
}

/* ===========================
   Responsive — Desktop (640px+)
   =========================== */
@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
  }
}
