/* ==========================================================================
   Holly Kwan - base stylesheet
   Palette: white + jade
   ========================================================================== */

:root {
  /* color */
  --white:      #ffffff;
  --paper:      #f5faf8;
  --paper-deep: #eef6f2;

  --jade-950:   #07281f;
  --jade-900:   #0b3b2e;
  --jade-700:   #10614a;
  --jade-500:   #1a9a75;
  --jade-400:   #38b391;
  --jade-300:   #83d3ba;
  --jade-150:   #d6ece3;
  --jade-100:   #e6f4ee;

  --ink:        #16211d;
  --muted:      #5c6b66;
  --line:       rgba(16, 97, 74, 0.13);

  /* type */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;

  /* shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --r-pill: 999px;

  /* elevation, kept soft */
  --shadow-sm: 0 1px 2px rgba(11, 59, 46, 0.04), 0 4px 14px rgba(11, 59, 46, 0.05);
  --shadow-md: 0 2px 6px rgba(11, 59, 46, 0.05), 0 18px 42px rgba(11, 59, 46, 0.08);
  --shadow-lg: 0 4px 10px rgba(11, 59, 46, 0.05), 0 34px 76px rgba(11, 59, 46, 0.11);

  /* rhythm */
  --shell: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 11vw, 148px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--jade-700);
  text-decoration: none;
  transition: color 0.22s var(--ease);
}
a:hover { color: var(--jade-500); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--jade-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--jade-700);
  color: var(--white);
  font-size: 14px;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* ---------- type scale ---------- */

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: var(--jade-950);
}

.display {
  font-size: clamp(2.6rem, 6.2vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.display--sm { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }

.display em,
h2 em {
  font-style: italic;
  color: var(--jade-500);
}

h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.24rem; letter-spacing: -0.012em; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--jade-500);
}

.lede {
  max-width: 54ch;
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  font-weight: 300;
  color: var(--muted);
}

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section--tinted {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  border-block: 1px solid var(--line);
}

.section__grid {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  grid-template-columns: 1fr;
}

.section__head h2 { margin-bottom: 0; max-width: 16ch; }
/* Full width head. Carries only the eyebrow label, so it sits close to its list. */
.section__head--wide { margin-bottom: clamp(22px, 3vw, 34px); max-width: 22ch; }
.section__head--wide h2 { max-width: none; }

.section__body { color: var(--muted); font-weight: 300; }

@media (min-width: 880px) {
  .section__grid { grid-template-columns: 0.85fr 1fr; align-items: start; }
  /* Only pins in the two column layout, where it has a column to itself. */
  .section__grid > .section__head { position: sticky; top: 118px; }
}

/* ---------- ambient background ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.aurora__orb--a {
  top: -18vh;
  right: -12vw;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(circle at 35% 35%, var(--jade-150), transparent 68%);
}

.aurora__orb--b {
  top: 46vh;
  left: -22vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle at 60% 40%, var(--jade-100), transparent 70%);
  opacity: 0.7;
}

.aurora__orb--c {
  bottom: -20vh;
  right: 6vw;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle at 50% 50%, rgba(131, 211, 186, 0.4), transparent 70%);
  opacity: 0.45;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.topbar.is-stuck {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(11, 59, 46, 0.05);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--jade-950);
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}
.mark:hover { color: var(--jade-700); }

.mark__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--jade-500);
  box-shadow: 0 0 0 4px var(--jade-100);
}

.nav {
  display: none;
  margin-left: auto;
  gap: 4px;
}

.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}

.nav a:hover { color: var(--jade-900); background: var(--jade-100); }
.nav a.is-active { color: var(--jade-700); background: var(--jade-100); }

/* Specificity bumped so the later .btn display rule does not win. */
.topbar .topbar__cta { display: none; }

@media (min-width: 940px) {
  .nav { display: flex; }
  .topbar .topbar__cta { display: inline-flex; margin-left: 8px; }
  .topbar__inner { min-height: 82px; }
}

/* burger */

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--jade-900);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 940px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: grid;
  overflow: hidden;
  max-height: 0;
  padding-inline: var(--gutter);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid transparent;
  transition: max-height 0.4s var(--ease), border-color 0.4s var(--ease);
}

.mobile-nav.is-open {
  max-height: 340px;
  border-top-color: var(--line);
}

.mobile-nav a {
  padding: 14px 2px;
  color: var(--jade-950);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; color: var(--jade-500); }

@media (min-width: 940px) { .mobile-nav { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
              background 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.btn--solid {
  background: linear-gradient(135deg, var(--jade-700), var(--jade-500));
  color: var(--white);
  box-shadow: 0 8px 22px rgba(16, 97, 74, 0.22);
}
.btn--solid:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 97, 74, 0.26);
}

.btn--ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--jade-900);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  color: var(--jade-700);
  border-color: var(--jade-300);
  background: var(--jade-100);
  transform: translateY(-2px);
}

.topbar__cta { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(56px, 9vw, 108px) clamp(56px, 8vw, 96px); }

.hero__grid {
  display: grid;
  gap: clamp(36px, 6vw, 68px);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 940px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* portrait card */

.hero__card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lg);
}

.portrait {
  overflow: hidden;
  border-radius: calc(var(--r-xl) - 14px);
  background: linear-gradient(160deg, var(--jade-100), var(--jade-150));
  aspect-ratio: 11 / 13;
}

.portrait img { width: 100%; height: 100%; object-fit: cover; }

.portrait__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 8px 6px;
}

.portrait__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--jade-950);
}

.portrait__role {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ---------- pills ---------- */

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.pill-list li {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 0.85rem;
  color: var(--jade-900);
}

/* ---------- experience ---------- */

.roles {
  display: grid;
  max-width: 74ch;
}

.role {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 300;
}

.role:first-child { padding-top: 0; }
.role:last-child { border-bottom: 0; padding-bottom: 0; }

.role__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.role__head h3 { margin-bottom: 0; }

.role__when {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.role__org {
  margin: 6px 0 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--jade-500);
}

.ticks { margin-top: 16px; display: grid; gap: 9px; }

.ticks li {
  position: relative;
  padding-left: 22px;
  font-size: 0.94rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade-300);
}

/* ---------- education entries ---------- */

.entry {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }

.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.entry__head h3 { margin-bottom: 0; }

.entry__year {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.entry__org {
  margin: 6px 0 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--jade-500);
}

/* ---------- contact ---------- */

.section--contact { padding-bottom: clamp(80px, 10vw, 130px); }

.contact {
  position: relative;
  padding: clamp(40px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--jade-100) 0%, transparent 55%),
    rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.contact .lede { margin-inline: auto; }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

/* ---------- footer ---------- */

.footer {
  padding-block: 34px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer p { margin: 0; }

/* ---------- reveal ---------- */

/* Scoped to .js so the page stays fully readable if JavaScript never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */

@media print {
  .topbar, .mobile-nav, .aurora, .hero__actions, .contact__actions, .skip-link { display: none !important; }
  body { font-size: 11pt; }
  .section { padding-block: 18pt; }
  .js .reveal { opacity: 1; transform: none; }
  .contact { box-shadow: none; }
}
