:root {
  --ink: #1b2330;
  --muted: #5a6577;
  --paper: #f5f4ef;
  --card: #ffffff;
  --navy: #1f3a5f;
  --navy-dark: #152a46;
  --accent: #c2572b;
  --accent-soft: #f6e4da;
  --line: #e2e0d8;
  --shadow: 0 0.125rem 0 rgba(27, 35, 48, 0.06), 0 0.5rem 1.5rem rgba(27, 35, 48, 0.08);
  --shadow-lift: 0 0.25rem 0 rgba(27, 35, 48, 0.06), 0 1rem 2.5rem rgba(27, 35, 48, 0.16);
  --radius: 0.875rem;
  --max: 72rem;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0;
}

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

a {
  color: var(--navy);
}

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

:focus-visible {
  outline: 0.1875rem solid var(--accent);
  outline-offset: 0.1875rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(0.5rem);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0.25rem 1rem rgba(27, 35, 48, 0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.875rem 5%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--navy);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1rem;
  box-shadow: inset 0 -0.1875rem 0 var(--navy-dark);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.logo:hover {
  color: var(--ink);
}

.logo:hover .logo-mark {
  background: var(--accent);
  transform: rotate(-6deg);
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.375rem;
  height: 0.125rem;
  background: var(--accent);
  border-radius: 1rem;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links .nav-cta {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 -0.1875rem 0 var(--navy-dark);
}

.nav-links .nav-cta::after {
  display: none;
}

.nav-links .nav-cta:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 -0.1875rem 0 #9c4320;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.375rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-0.125rem);
}

.btn:active {
  transform: translateY(0.0625rem);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0.25rem 0 #9c4320;
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0.375rem 0 #9c4320;
}

.btn-secondary {
  background: var(--card);
  color: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 0.25rem 0 var(--navy);
}

.btn-secondary:hover {
  color: var(--navy);
  box-shadow: 0 0.375rem 0 var(--navy);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 5% 3rem;
}

.section {
  margin-top: 4.5rem;
  scroll-margin-top: 6rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2,
.contact h2 {
  font-size: 2.25rem;
  color: var(--navy);
}

.section-head h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.3125rem;
  margin-top: 0.625rem;
  border-radius: 1rem;
  background: var(--accent);
}

.section-head p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 3.5rem 3rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12) 0, transparent 40%),
    linear-gradient(135deg, var(--navy) 0%, #2c5282 100%);
  color: #fff;
  box-shadow: var(--shadow-lift);
  scroll-margin-top: 6rem;
}

.hero-text {
  flex: 1 1 60%;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 3rem;
  max-width: 18ch;
}

.lead {
  margin: 1.25rem 0 2rem;
  font-size: 1.1875rem;
  color: #d6e0ee;
  max-width: 36rem;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.hero .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0.25rem 0 rgba(255, 255, 255, 0.55);
}

.hero-avatar {
  flex: 0 0 auto;
  width: 15rem;
  border-radius: 50%;
  border: 0.375rem solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-0.5rem);
  }
}

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-0.375rem);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.04);
}

.card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1.375rem 1.5rem 1.5rem;
  background: var(--card);
}

.card h3 {
  font-size: 1.375rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
}

.card .stack {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.card-link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.tag {
  align-self: flex-start;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #e7edf5;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-award {
  background: var(--accent-soft);
  color: var(--accent);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 0.3125rem solid var(--navy);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.entry h3 {
  font-size: 1.25rem;
}

.org {
  display: inline-block;
  margin-left: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.date {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.entry ul {
  margin: 0.625rem 0 0;
  padding-left: 1.25rem;
}

.entry li {
  margin-bottom: 0.25rem;
}

.entry p {
  margin: 0.375rem 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-gap: 1.75rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.panel > h3 {
  font-size: 1.375rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.skills {
  margin: 0;
}

.skills dt {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.skills dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}

.skills dd:last-child {
  margin-bottom: 0;
}

.chip {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 0.125rem 0 var(--line);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  transform: translateY(-0.125rem);
  border-color: var(--accent);
}

.panel .entry {
  box-shadow: none;
  border-left-color: var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.panel .entry:last-child {
  margin-bottom: 0;
}

.entry h4 {
  font-size: 1.125rem;
}

.contact {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.contact p {
  margin: 0.875rem auto 1.75rem;
  max-width: 34rem;
  color: var(--muted);
}

.contact-links {
  justify-content: center;
}

.site-footer {
  text-align: center;
  padding: 1rem 5% 2.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

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

  .hero h1 {
    font-size: 2.5rem;
  }

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

@media (max-width: 768px) {

  html {
    font-size: 93.75%;
  }

  body {
    font-size: 1.0625rem;
    line-height: 1.65;
  }

  .site-header {
    position: static;
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem 1.25rem;
  }

  .logo {
    justify-content: center;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    width: 100%;
  }

  .nav-links a {
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1.0625rem;
    border: 1px solid var(--line);
    background: var(--paper);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links .nav-cta {
    border-color: var(--navy);
  }

  .project-grid {
    grid-template-columns: 1fr;
    grid-gap: 1.25rem;
  }

  main {
    padding: 1.25rem 1rem 2.5rem;
  }

  .section {
    margin-top: 3rem;
    scroll-margin-top: 1rem;
  }

  .section-head h2,
  .contact h2 {
    font-size: 1.875rem;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.5rem;
    padding: 2.25rem 1.25rem;
  }

  .hero h1 {
    font-size: 2.125rem;
    max-width: none;
  }

  .lead {
    font-size: 1.125rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-avatar {
    width: 9rem;
  }

  .card h3 {
    font-size: 1.375rem;
  }

  .card p {
    font-size: 1rem;
  }

  .panel {
    padding: 1.25rem;
  }

  .contact {
    padding: 2.25rem 1.25rem;
  }

  .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
