:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --border: #dde3ea;
  --accent: #2f5d8a;
  --accent-strong: #1d4268;
  --accent-soft: #e6eef6;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --surface: #1a2129;
    --text: #e4e9ee;
    --muted: #9aa8b6;
    --border: #2b3540;
    --accent: #8ab4e0;
    --accent-strong: #b5d0ec;
    --accent-soft: #1f2d3b;
    --shadow: none;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-strong);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.25;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  padding: 48px 0 32px;
  text-align: center;
}
@media (min-width: 720px) {
  .site-header {
    padding: 72px 0 40px;
  }
}
.site-header .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
@media (min-width: 720px) {
  .site-header .wrap {
    flex-direction: row;
    text-align: left;
    gap: 32px;
  }
}

.headshot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
@media (min-width: 720px) {
  .headshot {
    width: 168px;
    height: 168px;
  }
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
}
@media (min-width: 720px) {
  .site-title {
    font-size: 2.5rem;
  }
}

.site-role {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 1.125rem;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .header-links {
    justify-content: flex-start;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--surface);
}
.button .fa {
  font-size: 1.05em;
}

.section {
  padding: 32px 0;
}
@media (min-width: 720px) {
  .section {
    padding: 40px 0;
  }
}
.section > .wrap > h2 {
  font-size: 1.375rem;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.about p {
  max-width: 68ch;
  margin: 0 0 16px;
}
.about p:last-child {
  margin-bottom: 0;
}

.projects {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (min-width: 900px) {
  .project.featured {
    grid-column: 1/-1;
    flex-direction: row;
  }
  .project.featured .project-media {
    flex: 0 0 52%;
    aspect-ratio: auto;
    min-height: 300px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}
.project h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.project p {
  margin: 0 0 16px;
  color: var(--muted);
}

.project-media {
  aspect-ratio: 16/9;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.plain-list > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.plain-list > li:first-child {
  padding-top: 0;
}
.plain-list > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.row {
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) {
  .row {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
  }
}

.row-title {
  font-weight: 600;
}

.row-meta {
  color: var(--muted);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.row-detail {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}
