/* ---------------------------------------------------------------
   tonyhou.com — static site
   white page, black Adobe Garamond Pro (EB Garamond) serif,
   nav left / "Tony Hou" centered / social icons right.
----------------------------------------------------------------*/

:root {
  --ink: #000000;
  --bg: #ffffff;
  --serif: "EB Garamond", "Adobe Garamond Pro", Garamond, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

/* Accessibility skip link (hidden until focused) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Header ----------------------------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.5rem;
  padding: 2.5rem 3.4rem;
  position: relative;
  z-index: 1000; /* keep title + hamburger above the mobile menu overlay */
}

.nav-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-left a {
  text-decoration: none;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.nav-left a:hover { opacity: 0.55; }

.site-title {
  grid-column: 2;
  justify-self: center;
  text-decoration: none;
  font-size: 2.0625rem;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.site-title:hover { opacity: 0.55; }

.social {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.social a {
  display: inline-flex;
  width: 18px;
  height: 18px;
  transition: opacity 0.2s ease;
}
.social a:hover { opacity: 0.55; }
.social svg { width: 100%; height: 100%; fill: var(--ink); }

/* Hamburger (mobile only) */
.menu-toggle {
  display: none;
  justify-self: end;
  width: 30px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.menu-toggle span:nth-child(1) { top: 2px; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 18px; }
.menu-toggle.is-open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ------------------------- Mobile menu --------------------------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 900;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  text-decoration: none;
  font-size: 1.75rem;
}
.mobile-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}
.mobile-social a { width: 1.5rem; height: 1.5rem; }
.mobile-social svg { width: 100%; height: 100%; fill: var(--ink); }
body.menu-open { overflow: hidden; }

/* ----------------------------- Hero ----------------------------- */
.hero {
  text-align: center;
  padding: clamp(4rem, 21vh, 13rem) 1.5rem 6rem;
}

.hero h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 5.3rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.lead {
  max-width: 63rem;
  margin: 2.1rem auto 0;
  font-size: clamp(1.25rem, 0.5rem + 2.2vw, 1.6rem);
  line-height: 1.7;
}

.lead a {
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s ease;
}
.lead a:hover { opacity: 0.55; }

/* --------------------------- Responsive -------------------------- */
@media screen and (max-width: 767px) {
  .site-header {
    grid-template-columns: 1fr auto 1fr;
    padding: 1.6rem 1.5rem;
  }
  .nav-left,
  .social { display: none; }
  .site-title { font-size: 1.6rem; }
  .menu-toggle { display: block; }
  .mobile-menu { display: flex; }
}
