/* =============================================================================
   PAGE LAYOUTS — reuses shared tokens/components in style.css.
   Sections: shell, home, projects, experience, about, fun.
   ========================================================================== */

/* -------- Shell: sticky nav host + wrapper -------- */
[data-nav] { position: sticky; top: 0; z-index: 80; display: block; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* Page headings (inner pages) */
.page-title { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 8px 0 4px; }
.page-lead { color: var(--ink-soft); font-size: 1.02rem; margin: 0 0 20px; max-width: 640px; }
.page-lead--wide { max-width: none; }

.section { margin-top: 36px; }
.section:first-of-type { margin-top: 16px; }
.section__title { font-size: 1.5rem; margin: 0 0 16px; text-align: center; }
.section__title--left { text-align: left; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.section__head .section__title { margin: 0; text-align: left; }

/* -------- Shared avatar image -------- */
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -------- Panels (glossy card) -------- */
.panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--gloss);
}
.panel + .panel { margin-top: 20px; }
.panel__title { margin: 0 0 12px; font-size: 1.15rem; }
.panel__desc { line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px; }
.panel__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.panel__links { display: flex; flex-wrap: wrap; gap: 10px; }

/* =====================  HOME  ===================== */
.hero { text-align: center; padding: 40px 16px 28px; }
.hero__avatar {
  font-size: 3rem;                 /* emoji fallback */
  width: clamp(160px, 34vw, 210px);
  height: clamp(160px, 34vw, 210px);
  margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--line);
}
.hero__name { font-size: clamp(1.9rem, 5.5vw, 2.8rem); margin: 0 0 4px; letter-spacing: -0.01em; }
.hero__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.2rem); color: var(--accent); margin: 0 0 12px;
}
.hero__tagline { max-width: 560px; margin: 0 auto; font-size: 1.02rem; line-height: 1.6; color: var(--ink-soft); }

.home-about .panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.home-about__text { margin: 0; line-height: 1.6; color: var(--ink-soft); flex: 1 1 320px; }

/* -------- Projects filter bar -------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: inset 0 1px 0 var(--gloss);
  transition: transform 0.12s var(--ease-pop), filter 0.15s ease;
}
.filter-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.filter-btn:active { transform: translateY(1px); }
.filter-btn[aria-pressed="true"] {
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bot));
  border-color: var(--accent-line);
}

/* -------- Projects "screen" frame -------- */
.screen {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--recess), var(--recess-2));
  box-shadow: var(--inset), 0 1px 0 var(--gloss);
  overflow: hidden;
}
.screen__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft);
  background: linear-gradient(180deg, var(--chrome-top), var(--chrome-bot));
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--gloss);
}
.screen__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-top), var(--accent-bot));
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 6px rgba(43, 143, 214, 0.5);
}
.screen__label { color: var(--ink); font-weight: 700; }
.screen__hint { margin-left: auto; opacity: 0.7; }

/* horizontal shelf (home) */
.shelf {
  display: flex; gap: 18px;
  overflow-x: auto;
  padding: 22px 18px 24px;
  scroll-snap-type: x proximity; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.shelf .app-card { flex: 0 0 auto; width: 132px; scroll-snap-align: start; }

/* wrapping grid inside a screen (projects page + creative) */
.grid-screen {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 20px;
  padding: 24px 20px 26px;
}

/* scrollbar for shelves */
.shelf::-webkit-scrollbar { height: 10px; }
.shelf::-webkit-scrollbar-track { background: transparent; }
.shelf::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: var(--radius-pill);
  border: 2px solid transparent; background-clip: padding-box;
}

/* =====================  EXPERIENCE  ===================== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.xp { display: grid; grid-template-columns: 60px 1fr; gap: 16px; }
.xp__rail { display: flex; flex-direction: column; align-items: center; }
.xp__logo {
  width: 60px; height: 60px; flex: none;
  box-sizing: border-box;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;              /* white bg — logos stay visible in light & dark */
  border: 1.5px solid #ffffff;     /* thin white ring, Logan-style */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-size: 1.3rem;
  color: #1f2430;                  /* emoji fallback stays dark on the white circle */
}
/* image logos: contain + generous padding so square logos aren't clipped by the circle */
img.xp__logo { object-fit: contain; padding: 5px; box-sizing: border-box; }
.xp__line { flex: 1; width: 2px; background: var(--line); margin-top: 6px; }
.xp:last-child .xp__line { display: none; }

.xp__body {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--gloss);
  margin-bottom: 22px;
}
.xp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xp__role { margin: 0; font-size: 1.15rem; }
.xp__dates { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.xp__meta { color: var(--accent); font-weight: 600; margin: 2px 0 10px; }
.xp__meta a { text-decoration: none; }
.xp__meta a:hover { text-decoration: underline; }
.xp__loc { color: var(--ink-soft); font-weight: 400; }
.xp__bullets { margin: 0 0 12px; padding-left: 18px; line-height: 1.6; color: var(--ink); }
.xp__bullets li { margin-bottom: 4px; }
.xp__tech { display: flex; flex-wrap: wrap; gap: 8px; }
.xp__key { margin-top: 12px; }
.xp__key summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.xp__key ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; color: var(--ink-soft); }
.xp__key li { margin-bottom: 6px; }
.xp__key-link { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.xp__key-link:hover { text-decoration: underline; }

/* =====================  ABOUT  ===================== */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: stretch; }
/* Right column's two panels fill the column so their combined height matches
   the "Angie Che" box, letting fun facts sit flush below both columns. */
.about__practical { display: flex; flex-direction: column; gap: 20px; }
.about__practical .panel { flex: 1; }
.about__funfacts { margin-top: 20px; }
.about__intro { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.about__avatar {
  width: 80px; height: 80px; flex: none;
  display: grid; place-items: center;
  font-size: 2.2rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--line);
}
.about__name { margin: 0; font-size: 1.4rem; }
.about__title { margin: 2px 0; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.about__loc { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.about__bio p { line-height: 1.7; color: var(--ink); margin: 0 0 12px; }
.about__bio p:last-child { margin-bottom: 0; }

.funfacts { margin: 0; padding-left: 18px; line-height: 1.7; color: var(--ink); }
.funfacts li { margin-bottom: 6px; }

.edu { margin-bottom: 12px; }
.edu:last-child { margin-bottom: 0; }
.edu__school { font-weight: 700; }
.edu__detail { color: var(--ink); }
.edu__dates { color: var(--ink-soft); font-size: 0.85rem; }

/* -------- Get in touch (full-width contact box) -------- */
.contact { margin-top: 24px; }
.contact__title { margin: 0 0 4px; font-size: 1.4rem; }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 14px; }

.contact__form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 143, 214, 0.28);
}
.contact__form .btn { align-self: flex-start; margin-top: 2px; }
.contact__form .btn:disabled { opacity: 0.6; cursor: default; }
.contact__status { margin: 4px 0 0; font-size: 0.9rem; min-height: 1.2em; color: var(--ink-soft); }
.contact__status.is-ok { color: #1f9d55; }
.contact__status.is-error { color: #e0574d; }

.contact__subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.contact__subtitle:not(:first-child) { margin-top: 18px; }
.contact__email { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--accent); word-break: break-word; }
.contact__email:hover { text-decoration: underline; }
.contact__socials { display: flex; flex-wrap: wrap; gap: 10px; }

/* =====================  FUN  ===================== */
/* Blurb (left) expands to meet a compact 2x2 square of now-cards (right). */
/* Full-width row: blurb is flush-left (in line with the "Right now" heading), the 2x2
   now-cards sit flush-right. Blurb stretches to the cards' height; its inner right
   padding keeps the text from running up against the cards. */
.now-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: stretch; }
.now-blurb { display: flex; flex-direction: column; justify-content: center; padding-right: clamp(28px, 8%, 88px); }
.now-blurb__lead { font-weight: 700; margin: 0 0 10px; }
.now-blurb__list { margin: 0 0 12px; padding-left: 18px; line-height: 1.6; color: var(--ink-soft); }
.now-blurb__list li { margin-bottom: 4px; }
.now-blurb__outro { margin: 14px 0 0; font-weight: 700; color: var(--ink); }

.now-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; width: min(320px, 100%); }
.now-card {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--gloss);
  text-align: center;
}
.now-card__icon { font-size: 1.7rem; display: block; }
.now-card__label { font-family: var(--font-head); font-weight: 700; font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.now-card__value { color: var(--ink); font-size: 0.82rem; line-height: 1.3; }

/* =====================  FOOTER  ===================== */
.footer { position: relative; z-index: 1; text-align: center; padding: 36px 20px 60px; }
.footer__links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 16px; }
.footer__note { color: var(--ink-soft); font-weight: 600; font-size: 0.85rem; margin: 0; }

/* =====================  RESPONSIVE  ===================== */
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .now-row { grid-template-columns: 1fr; }
  .now-blurb { padding-right: 24px; }
}
@media (max-width: 480px) {
  .shelf .app-card { width: 112px; }
  .grid-screen { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; }
}
