/* Shared styles for every page */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  /* Apple's system font (San Francisco), the same look as the "Who am I?" note */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  color: #111;
  background: #fafafa;
}

/* Button panel on the right side of Home */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem;
  background: #fafafa;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background: #1e4d2b;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

/* Same width for every button in the stack so they line up */
.panel .button {
  width: 15rem;
  justify-content: center;
}

.button:hover {
  background: #163a20;
  transform: translateX(4px);
}

/* Darkens when clicked; .is-pressed keeps it dark while the page slides away */
.button-nav:active,
.button-nav.is-pressed {
  background: #0e2715;
}

.button-outline {
  color: #1e4d2b;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px #1e4d2b;
}

.button-outline:hover {
  color: #fff;
  background: #1e4d2b;
  transform: none;
}

.button-outline svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

/* Sub-pages (About, Experiences, Skills) */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  min-height: 100vh;
}

/* Pages with cards or photos (Recent News, Life in My Eyes, What I'm Working On) */
.page.page-wide {
  max-width: 1100px;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 2rem;
  line-height: 1;
  color: #111;
  text-decoration: none;
  transition: transform 0.2s;
}

.back:hover {
  transform: translateX(-4px);
}

/* About page spans the full window: bio on the left, portrait centered in
   the middle, links stacked on the right (every sub-page slides in from there). */
.about-grid {
  display: grid;
  /* Text | photo | links, with the same gap before, between, and after them */
  grid-template-columns: minmax(0, 30rem) auto auto;
  justify-content: space-evenly;
  align-items: center;
  column-gap: 3rem;
  min-height: 100vh;
  /* Side margins so nothing touches the edges of the window */
  padding: 5rem 10vw;
}

.about-grid .page {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Back arrow floats above the text so only the text itself is centered
   vertically, lining it up with the photo and links beside it */
.about-grid .back {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 2rem;
}

/* Borderless text links for moving between sub-pages */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.nav-link:hover,
.nav-link:active,
.nav-link.is-pressed {
  color: #1e4d2b;
}

/* "Who am I?" styled like a note in Apple Notes */
/* No card or border: the note sits right on the page background */
.page .note h1 {
  font-size: clamp(1.875rem, 3vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

.page .note p {
  font-size: 1rem;
  line-height: 1.55;
  color: #1c1c1e;
  margin-bottom: 0.9rem;
}

/* "6:16 PM in Boston" in grey under the heading */
.page .note .local-time {
  margin: -0.75rem 0 1.5rem;
  font-size: 1.0625rem;
  color: #8e8e93;
}

.page .note p:last-child {
  margin-bottom: 0;
}

.page p u {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Portrait in the middle column, kept small enough to leave room on both sides */
.about-photo {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  position: relative;
  width: min(260px, 17vw);
  /* Same shape as the photo, so it shows whole */
  aspect-ratio: 768 / 1024;
}

.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.side-links {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.75rem;
}

.side-links .nav-link:hover {
  transform: translateX(4px);
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
    row-gap: 2rem;
    padding: 4rem 2rem 3rem;
  }
  .about-grid .page,
  .about-photo,
  .side-links {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin: 0;
  }
  /* Stacked on phones there's no text beside it to match, so give it its own shape */
  .about-photo {
    width: min(320px, 100%);
    aspect-ratio: 3 / 4;
  }
}

.page h1 {
  /* Same size as "Who am I?" on every page */
  font-size: clamp(1.875rem, 3vw, 2.375rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 2.25rem;
}

/* Section heading, e.g. "Work Experience" */
.page h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1e4d2b;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  margin: 2.5rem 0 1.25rem;
}

/* One job, role, or award */
.entry {
  margin-bottom: 1.25rem;
}

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

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

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

.entry-place {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
}

.page .meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  font-style: italic;
  color: #555;
  margin: 0.125rem 0 0.625rem;
}

.entry ul {
  margin-bottom: 0;
}

.entry li + li {
  margin-top: 0.375rem;
}

/* Label/value rows on the Skills page */
.skill-row {
  margin-bottom: 1rem;
}

.skill-row strong {
  color: #111;
}

@media (max-width: 700px) {
  .entry-head,
  .page .meta {
    flex-direction: column;
    gap: 0;
  }
}

.page p,
.page li {
  /* Same body size as the "Who am I?" text */
  font-size: 1rem;
  line-height: 1.65;
  color: #333;
}

.page p {
  margin-bottom: 1.25rem;
}

.page ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 700px) {
  .panel { padding: 2rem; }
}
