/* =========================
   Global Variables & Resets
========================= */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", Ubuntu, Cantarell, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --container: 960px;
  --gap: 1rem;
  --social-icon: clamp(28px, 2.5vw, 36px);
  --cv-year-col: 10ch;
}

h3, h4 {
  margin-bottom: 0rem; /* reduce space after the heading */
}

figure {
  margin: 0;
}

ul, ol {
  margin-top: 0.25rem;  /* reduce gap before the list */
  margin-bottom: 1rem;  /* keep a little breathing room after */
  padding-left: 1.5rem; /* keep indentation */
}


* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

img,
iframe,
video {
  max-width: 100%;
  height: auto;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   Base Layout
========================= */
main {
  flex: 1 0 auto;
}

header,
footer {
  flex-shrink: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gap);
}

header,
nav,
main,
footer {
  padding: 0.5rem;
}

/* =========================
   Header & Navigation
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.92);
  overflow: visible;
  backdrop-filter: saturate(1.05) blur(6px);
  will-change: backdrop-filter;
}

.brand-link {
  text-decoration: none;
}

.brand-img {
  max-width: 250px;
  height: auto;
  width: 100%;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
}

.desktop-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.desktop-nav li img {
  max-width: 150px;
  height: auto;
}

/* Mobile Navigation */
.primary-nav {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle .menu-icon {
  width: 24px;
  height: auto;
}

.icon-close {
  display: none;
}

.icon-hamburger {
  display: inline-block;
}

.menu-toggle.is-open .icon-hamburger {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: inline-block;
}

@media (max-width: 700px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10000;
    background: #fff;
    border-radius: 8px;
  }

  .menu-toggle.is-open {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
  }

  .primary-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    padding: 2rem 1.25rem;
    overflow-y: auto;
  }
  
  .primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .primary-nav li img {
    width: min(70vw, 260px);
    height: auto;
  }

  .primary-nav.open {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* =========================
   Footer
========================= */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1.25rem;
  row-gap: 0;
  align-items: center;
  padding-top: 5rem;
}

.site-footer p,
.site-footer small,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.35;
}

.footer-contact {
  grid-column: 1;
  grid-row: 1;
}

.footer-copy {
  grid-column: 1;
  grid-row: 2;
}

.social-instagram {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.social-linkedin {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.site-footer .social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}

.site-footer .social-link::before {
  content: "";
  position: absolute;
  inset: -10px;
}

.site-footer .social-link img {
  display: block;
  height: var(--social-icon);
  width: auto;
  max-width: none;
}

.site-footer .social-link .img-hover {
  display: none;
}

.site-footer .social-link:hover .img-default {
  display: none;
}

.site-footer .social-link:hover .img-hover {
  display: block;
}

@media (max-width: 600px) {
  .site-footer {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: 0.5rem;
    justify-items: start;
  }

  .footer-right {
    align-items: flex-start;
  }

  .social-instagram,
  .social-linkedin {
    justify-self: start;
  }
}


body {
  min-height: 100vh; /* instead of 100dvh */
}

main {
  flex: 1; /* simpler: fill remaining space */
  padding: 0.5rem; /* keep if you want, but this adds to height */
}

footer {
  flex-shrink: 0;
  padding: 0.5rem; /* keep if desired */
}

/* FIX overflow from social links */
.site-footer .social-link::before {
  content: "";
  position: absolute;
  inset: 0; /* instead of -10px */
}
