/* ============================================================
   Lynn Teoh — Portfolio (placeholder)
   Plain HTML/CSS/JS. Shared stylesheet for index + about.
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  --ink:        #1A1A1A;              /* primary text            */
  --ink-muted:  #1A1A1A80;             /* grey text (1A1A1A @ 50%) */
  --bg:         #F7F6F4;              /* page background         */

  --font-display: "Elsie", Georgia, serif;
  --font-body:    "Lato", -apple-system, BlinkMacSystemFont, sans-serif;

  --size-heading: 32px;   /* Elsie, consistent across screens  */
  --size-body:    16px;   /* Lato, consistent across screens   */

  --max-width: 1728px;
  --gutter:    24px;
  --margin:    40px;
}

/* ---- Reset-ish -------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---- Page shell ------------------------------------------- */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--margin);
}

/* ---- Header ----------------------------------------------- */
.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gutter);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--size-heading);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  font-family: var(--font-body);
  font-size: var(--size-body);
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

/* current page = solid black */
.nav a[aria-current="page"] { color: var(--ink); }

/* hover: darken to full black, bold, underline */
.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Home / hero ------------------------------------------ */
.hero {
  min-height: calc(100vh - 2 * var(--margin));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--size-heading);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.02em;
}

.hero__ticker {
  font-family: var(--font-body);
  font-size: var(--size-body);
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.hero__flower {
  width: auto;
  height: clamp(240px, 40vh, 480px);
  object-fit: contain;
}

.hero__footer {
  margin-top: 2rem;
  font-size: var(--size-body);
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.hero__footer a {
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}

.hero__footer a:hover,
.hero__footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- About: bio ------------------------------------------- */
.about { margin-top: 4rem; }

.section-title {
  font-family: var(--font-display);
  font-size: var(--size-heading);
  font-weight: 400;
  margin: 0 0 2rem 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.bio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gutter);
  align-items: start;
  margin-bottom: 6rem;
}

/* the heading spans the first column; the two paragraphs fill the rest */
.bio__title { grid-column: 1; }
.bio__col   { grid-column: auto; margin: 0; max-width: 42ch; }

/* ---- About: friends --------------------------------------- */
.friends { margin-top: 2rem; }

.friends__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem var(--gutter);
}

.friend {
  display: block;
  text-decoration: none;
  color: inherit;
}

.friend__name {
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--ink);
  margin: 0;
}

.friend__role,
.friend__link {
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--ink-muted);
  margin: 0;
  transition: color 0.15s ease;
}

.friend__link { display: inline-block; }

/* Hover (the Brian move): whole card darkens to full black,
   the domain line underlines. Works on <a> cards. */
.friend:hover .friend__role,
.friend:hover .friend__link,
.friend:focus-visible .friend__role,
.friend:focus-visible .friend__link {
  color: var(--ink);
}

.friend:hover .friend__link,
.friend:focus-visible .friend__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Frances has no link — she's a plain div, still darkens on hover */
.friend--nolink:hover .friend__role,
.friend--nolink:focus-within .friend__role {
  color: var(--ink);
}

/* ---- Responsive ------------------------------------------- */

/* 1280 and down: bio heading gets its own row, paragraphs sit 2-up;
   friends drop to 2 columns */
@media (max-width: 1280px) {
  .bio {
    grid-template-columns: 1fr 1fr;
  }
  .bio__title { grid-column: 1 / -1; }

  .friends__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768 and down: everything stacks to a single column */
@media (max-width: 768px) {
  .page { padding: var(--margin) 24px; }

  .bio {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

/* ---- Accessibility ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
