:root {
  --bg: #ffffff;
  --section: #f9f9f9;
  --text: #2a2a2a;
  --muted: #5a6777;
  --primary: #1770b5;
  --primary-light: #62a3ed;
  --border: #dbe4ee;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-width: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body::-webkit-scrollbar,
body::-webkit-scrollbar-track {
  background-color: #fff;
}

body::-webkit-scrollbar {
  width: 0.5rem;
}

body::-webkit-scrollbar-track {
  border-radius: 9999px;
}

body::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 9999px;
}

a {
  color: inherit;
  text-decoration: none;
}


.skip-link {
  position: fixed;
  top: -48px;
  left: 0.75rem;
  z-index: 50;
  border-radius: 0.5rem;
  background: #111827;
  padding: 0.5rem 0.75rem;
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 8rem 1rem;
}

.section.alt {
  background: var(--section);
}

.section-kicker {
  margin: 0 0 0.5rem;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
}

.section-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 3px solid var(--border);
  background: var(--bg);
}

.header-row {
  display: flex;
  min-height: 75px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
}

/* make site name smaller on narrow screens */
@media (max-width: 600px) {
  .brand {
    font-size: 1.1rem;
  }
}

.header-desktop {
  display: none;
  gap: 1rem;
}

.header-desktop a,
#menu a {
  border-bottom: 3px solid transparent;
  padding-bottom: 0.15rem;
}

.header-desktop a:hover,
#menu a:hover {
  color: var(--primary);
}

.header-desktop a.active,
#menu a.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.header-mobile {
  display: block;
}

.menu-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.7rem;
}

#menu {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  height: auto;
  z-index: 10;
}

#menu nav {
  position: fixed;
  top: 75px;
  right: 0;
  display: flex;
  width: 0;
  overflow: hidden;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg);
  text-align: center;
  transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
}

#menu.active nav {
  width: 100%;
  border-bottom: 3px solid var(--primary);
  padding: 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

#home {
  padding-top: calc(8rem + 32px);
}

#selfie {
  width: min(300px, 72vw);
  height: 400px;
  margin: 0 auto;
  border: 3px solid var(--primary);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  background: url('/images/selfie.jpg') center / cover no-repeat;
  animation: morph 8s ease-in-out infinite;
  transition: all 1s ease-in-out;
}

@keyframes morph {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: 2.25rem;
  font-weight: 800;
}

.hero p {
  line-height: 1.7;
  color: var(--muted);
}

.socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
}

.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.about-grid img {
  width: 100%;
  max-width: 450px;
  border-radius: 0.75rem;
  object-fit: cover;
}

.about-grid p {
  margin: 0;
  white-space: pre-line;
  line-height: 1.7;
  color: var(--muted);
}


.project-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-toggle {
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  background: transparent;
  padding: 0.3rem 0.6rem;
  color: var(--primary);
  font-weight: 600;
}

.project-toggle:hover {
  background: var(--primary);
  color: #fff;
}

.project-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.project-details.expanded {
  max-height: 420px;
  opacity: 1;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.project-links a {
  color: var(--primary);
  text-decoration: underline;
}

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

.card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: brightness(0.5);
  transition: filter 0.5s ease-in-out;
}

.card:hover img {
  filter: brightness(1);
}

.card-body,
.service-card {
  padding: 0.75rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.skills-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.skill-row {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.skill-bar {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: #a0acbd;
}

.skill-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.chip {
  border-radius: 0.25rem;
  background: var(--primary);
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  color: #fff;
}

.experience {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.year-pill {
  display: inline-block;
  width: max-content;
  border-radius: 999px;
  background: var(--primary);
  padding: 0.22rem 0.6rem;
  font-size: 0.8rem;
  color: #fff;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.cta-link {
  border: 1px solid var(--primary);
  border-radius: 1rem;
  background: var(--primary);
  padding: 0.75rem 1rem;
  color: #fff;
}

.cta-link:hover {
  border-color: var(--primary-light);
  background: var(--primary-light);
}

.footer-block {
  background: #2a2a2a;
  color: #fff;
}

#footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-block a {
  color: #a0acbd;
}

@media (min-width: 480px) {
  #menu.active nav {
    width: 200px;
    border-bottom: 0;
    border-left: 3px solid var(--primary);
    border-bottom-left-radius: 0.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    width: min(1200px, 95vw);
  }

  .section {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .header-desktop {
    display: flex;
  }

  .header-mobile,
  #menu {
    display: none;
  }

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

  .hero-grid > :first-child {
    order: 2;
  }

  .hero-grid > :last-child {
    order: 1;
  }

  .hero {
    text-align: left;
  }

  .about-grid {
    grid-template-columns: minmax(300px, 450px) 1fr;
    gap: 4rem;
    align-items: start;
  }

  #about .section-kicker,
  #about .section-title {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .cards,
  .skills-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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