/* css/styles.css */

/* ---- base ---- */
:root{
  --accent: #7aa7d9; /* pastel blue */
}

html { scroll-behavior: smooth; }

body{
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.6;
  background: #fff;
  color: #000;
}

/* links */
a{
  color: #000;
  text-decoration: none;
}
a:visited{ color: #000; }

/* make external links look like links (but not nav links) */
main a[target="_blank"]{
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
main a[target="_blank"]:hover{
  text-decoration-thickness: 2px;
}

/* headings + rhythm */
section { margin-top: 3rem; }
main h1, main h2 { color: var(--accent); }
h1 { line-height: 1.15; margin: 2rem 0 0.75rem; }
h3 { margin: 1.6rem 0 0.25rem; }
p  { margin: 0.6rem 0 0.9rem; }

article{ margin-bottom: 2rem; }
.meta{ color: #555; font-size: 0.95rem; }

/* archived strike-through text */
del{
  color: #777;
  text-decoration-color: #bbb;
  text-decoration-thickness: 1px;
}

/* ---- homepage photo: float on desktop, stack on mobile ---- */
.home-photo{
  float: right;
  width: 220px;
  max-width: 45%;
  margin: 0.25rem 0 1rem 1.25rem;
  border-radius: 12px;
}

@media (max-width: 640px){
  .home-photo{
    float: none;
    display: block;
    width: 80%;
    max-width: 420px;
    margin: 1rem auto 1.25rem;
  }
}

/* prevent float from leaking */
#top::after{
  content: "";
  display: block;
  clear: both;
}

/* ---- photo grid (photos.html) ---- */
.photo-grid{
  columns: 2 180px;
  column-gap: 1rem;
}
.photo-grid img{
  width: 100%;
  display: block;
  margin-bottom: 1rem;
  border-radius: 3px;
}

.centered-image{
  display: block;
  margin: 2rem auto;
  max-width: 400px;
  width: 40%;
  border-radius: 10px;
}

/* ---- section dividers inside Experience/Education ---- */
#experience article + article,
#education article + article{
  border-top: 0.25px solid #eee;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* =========================
   Responsive navbar (clean)
   ========================= */
.site-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 2.5rem;
}

.site-title{
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
  white-space: nowrap;
}

/* keep navbar title/link black */
.site-nav a{
  color: #000;
  text-decoration: none;
}

.nav-links,
.nav-icons{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
}

.nowrap{ white-space: nowrap; }

/* CV button-ish styling */
.cv-link{
  padding: 6px 10px;
  border-radius: 8px;
}
.cv-link:hover{
  background: #f2f2f2;
}

/* icon links */
.site-nav a[aria-label]{
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
}
.site-nav a[aria-label]:hover{ background: #f2f2f2; }
.site-nav a[aria-label]:focus-visible{
  outline: 2px solid #000;
  outline-offset: 2px;
}
.site-nav svg{ display: block; }

/* burger hidden on desktop */
.nav-toggle{
  display: none;
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* =========================
   Mobile layout
   ========================= */
@media (max-width: 720px){
  .site-nav{
    flex-wrap: wrap;
  }

  /* Put the title left, and push everything else to the right */
  .site-title{
    margin-right: auto;
  }

  /* Burger sits to the right of the title */
  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;              /* important */
    order: 2;                    /* keep it near icons */
  }

  /* Icons stay at the far right */
  .nav-icons{
    order: 3;
    margin-left: 0;              /* important */
    gap: 0.4rem;
  }

  /* Links dropdown goes full width under the header row */
  .nav-links{
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    font-size: 1rem;
  }

  .nav-links.open{
    display: flex;
  }
}