/* ============================================================================
   chloeyang.art — styles
   You should not need to edit this file to change content. See site-data.js.
   Colours and sizes all live in the :root block below.
   ========================================================================= */

:root {
  /* palette */
  --pink-50:  #fff7fb;
  --pink-100: #fdeef4;
  --pink-200: #ffe3ef;
  --pink-300: #ffd0e4;
  --pink-400: #f7a8c8;
  --pink-500: #e8579a;
  --pink-600: #cf3f82;
  --pink-700: #a8306a;

  --ink:      #3f2a35;
  --ink-soft: #7a6270;
  --ink-mute: #a4899a;

  --cream:    #fffdf9;
  --line:     #fbe1ec;
  --white:    #ffffff;

  /* type — Google Fonts first, then a rounded system stack so the page still
     looks right if the font request fails. */
  --font-display: 'Baloo 2', 'Noto Sans TC', 'Trebuchet MS', 'Avenir Next Rounded',
                  system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Quicksand', 'Noto Sans TC', 'Avenir Next', system-ui,
                  -apple-system, 'Segoe UI', sans-serif;

  /* spacing / shape */
  --wrap: 1180px;
  --gut: clamp(1rem, 4vw, 2.75rem);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow-sm: 0 6px 14px -8px rgba(140, 60, 100, .35);
  --shadow-md: 0 16px 30px -18px rgba(140, 60, 100, .45);
  --shadow-lg: 0 30px 56px -26px rgba(140, 60, 100, .5);

  --ring: 3px solid var(--pink-600);
  --ring-off: 3px;
}

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

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

body {
  margin: 0;
  /* Nothing may cause sideways scrolling of the page. */
  overflow-x: hidden;
  background: var(--pink-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.015em;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--pink-600); text-decoration: none; }
a:hover { color: var(--pink-700); text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; color: inherit; }

/* One visible focus style for the whole site. */
:focus-visible {
  outline: var(--ring);
  outline-offset: var(--ring-off);
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  z-index: 100; background: var(--pink-600); color: #fff;
  font-family: var(--font-display); font-weight: 600;
  padding: .7rem 1.3rem; border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform .18s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); text-decoration: none; }

.anchor { display: block; height: 0; scroll-margin-top: 90px; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: .75rem 1.25rem;
  flex-wrap: wrap;
  padding-block: .6rem;
}

.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 2.5px solid var(--pink-200);
}
.brand__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.05rem, 1rem + .7vw, 1.4rem);
  color: var(--ink); white-space: nowrap;
}
.brand__dot { color: var(--pink-500); }

.nav {
  display: flex; gap: .15rem .35rem; flex-wrap: wrap;
  margin-inline-start: auto;
}
.nav__link {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600;
  font-size: .98rem;
  color: var(--ink-soft);
  padding: .5rem .8rem;
  border-radius: 999px;
  transition: background .16s ease, color .16s ease;
}
.nav__link:hover { background: var(--pink-100); color: var(--pink-600); text-decoration: none; }
.nav__link[aria-current="true"] { background: var(--pink-200); color: var(--pink-700); }

.langs {
  display: flex; gap: 2px; flex: none;
  background: var(--pink-100);
  border-radius: 999px;
  padding: 3px;
}
/* `display: flex` above beats the browser's default [hidden] rule, so the
   switcher would still paint as a small empty pill when it hides itself
   (single-language site). Restate it explicitly. */
.langs[hidden] { display: none; }
.lang {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700;
  font-size: .82rem; letter-spacing: .02em;
  color: var(--ink-mute);
  padding: .42rem .68rem;
  border-radius: 999px;
  transition: background .16s ease, color .16s ease;
}
.lang:hover { color: var(--pink-600); }
.lang[aria-pressed="true"] { background: var(--pink-500); color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 0%, var(--pink-200) 0%, var(--pink-100) 55%, var(--pink-50) 100%);
  padding-block: clamp(2rem, 5vw, 4.25rem) clamp(2.5rem, 5vw, 4rem);
}

.hero__inner {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--pink-600);
  background: rgba(255, 255, 255, .78);
  border-radius: 999px;
  padding: .4rem .9rem;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 1.35rem + 4.4vw, 3.9rem);
  color: var(--ink);
  max-width: 18ch;
}
.hero__title em { font-style: normal; color: var(--pink-500); }

.hero__lead {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1rem;
  /* comfortable tap target on phones */
  min-height: 48px;
  padding: .7rem 1.5rem;
  border: 0; border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary {
  background: var(--pink-500); color: #fff;
  box-shadow: 0 10px 20px -8px rgba(207, 63, 130, .65);
}
.btn--primary:hover { background: var(--pink-600); color: #fff; }
.btn--ghost {
  background: var(--white); color: var(--pink-600);
  box-shadow: inset 0 0 0 2px var(--pink-300);
}
.btn--ghost:hover { color: var(--pink-700); }
.btn--tiny {
  min-height: 42px; padding: .5rem 1rem; font-size: .9rem;
  background: var(--pink-100); color: var(--pink-700);
}
.btn--tiny:hover { background: var(--pink-200); }
.btn--tiny[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

.hero__media { position: relative; }

.hero__figure {
  margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--pink-300);
}
.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.stat-badge {
  position: absolute;
  left: clamp(-.5rem, -1vw, 0rem);
  bottom: -1.1rem;
  display: flex; align-items: center; gap: .7rem;
  background: var(--white);
  border-radius: var(--r-md);
  padding: .6rem .95rem;
  box-shadow: var(--shadow-md);
}
.stat-badge__mark {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none;
}
.stat-badge strong {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.08rem; line-height: 1.15; color: var(--ink);
}
.stat-badge small { display: block; font-size: .82rem; color: var(--ink-mute); font-weight: 600; }

/* sparkles */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkle {
  position: absolute;
  color: var(--pink-400);
  font-size: 1.4rem;
  animation: twinkle 4s ease-in-out infinite;
}
.sparkle--1 { top: 12%; left: 5%; }
.sparkle--2 { top: 62%; left: 12%; font-size: 1rem; animation-delay: .8s; }
.sparkle--3 { top: 22%; right: 7%; color: var(--pink-300); animation-delay: 1.5s; }
.sparkle--4 { bottom: 14%; right: 16%; font-size: .95rem; animation-delay: 2.2s; }

@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(.8) rotate(0deg); }
  50%      { opacity: 1;  transform: scale(1.12) rotate(18deg); }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(2.75rem, 6vw, 4.75rem); scroll-margin-top: 76px; }
.section--alt { background: var(--white); border-block: 1px solid var(--line); }

.section__head { max-width: 54ch; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section__title { font-size: clamp(1.6rem, 1.25rem + 1.9vw, 2.5rem); }
.section__lead { margin-top: .6rem; color: var(--ink-soft); }

/* ---------- filters ---------- */
.filters { margin-bottom: clamp(1.25rem, 3vw, 1.9rem); }
.filters__label {
  font-family: var(--font-display); font-weight: 600;
  font-size: .95rem; color: var(--ink-soft);
  margin-bottom: .6rem;
}
.filters__row { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--font-display); font-weight: 600;
  font-size: .93rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--pink-300); color: var(--pink-600); }
.chip[aria-pressed="true"] {
  background: var(--pink-500); border-color: var(--pink-500); color: #fff;
}
.chip[aria-pressed="true"] .chip__dot { background: #fff !important; }
.chip__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.chip__count { font-size: .8rem; opacity: .75; font-variant-numeric: tabular-nums; }

.filters__count {
  margin-top: .8rem;
  font-size: .88rem; font-weight: 600;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-mute);
  font-family: var(--font-display); font-weight: 600;
  background: var(--white);
  border: 2px dashed var(--pink-300);
  border-radius: var(--r-lg);
}

/* ---------- works grid ---------- */
.grid {
  display: grid;
  /* min() keeps a single column from overflowing a 320px phone */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-5px) rotate(-.5deg);
  box-shadow: var(--shadow-lg);
}

.card__media { position: relative; background: var(--pink-100); }

/* The whole picture is the button that opens the lightbox. */
.card__open {
  display: block; width: 100%;
  border: 0; padding: 0; margin: 0;
  background: none; cursor: pointer;
}
.card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}
.card__open:hover .card__img { transform: scale(1.05); }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: .74rem; letter-spacing: .03em; text-transform: uppercase;
  background: rgba(255, 255, 255, .93);
  border-radius: 999px;
  padding: .3rem .65rem;
  box-shadow: var(--shadow-sm);
}
.card__tag { position: absolute; top: .7rem; left: .7rem; }

.card__photos {
  position: absolute; bottom: .7rem; right: .7rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: .74rem;
  background: rgba(63, 42, 53, .72);
  color: #fff;
  border-radius: 999px;
  padding: .25rem .6rem;
}

.card__body {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .85rem 1rem 1rem;
}
.card__title {
  font-size: 1.06rem;
  flex: 1 1 auto;
  min-width: 0;
}
.card__title--todo { color: var(--pink-700); }

/* heart */
.likebtn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin: -.25rem -.25rem 0 0;
  border: 0; border-radius: 50%;
  background: var(--pink-100);
  color: var(--pink-300);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.likebtn svg { width: 22px; height: 22px; }
.likebtn:hover { background: var(--pink-200); color: var(--pink-400); transform: scale(1.1); }
.likebtn[aria-pressed="true"] { color: var(--pink-500); background: var(--pink-200); }
.likebtn[aria-pressed="true"]:hover { color: var(--pink-600); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--pink-100);
  color: var(--pink-600);
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover { background: var(--pink-200); transform: scale(1.06); }

/* ---------- journal ---------- */
.journal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
.journal__item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.journal__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.journal__body { padding: .9rem 1.1rem 1.15rem; }
.journal__date {
  font-family: var(--font-display); font-weight: 700;
  font-size: .78rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--pink-500);
  margin-bottom: .3rem;
}
.journal__caption { color: var(--ink-soft); font-size: .96rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--pink-100);
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.site-footer__inner { display: grid; justify-items: center; gap: .5rem; text-align: center; }
.site-footer__mark {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
  margin-bottom: .3rem;
}
.site-footer__made { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: center; }
.site-footer__contact, .site-footer__domain { font-size: .88rem; color: var(--ink-mute); }
.site-footer__contact:empty, .site-footer__links:empty { display: none; }

.noscript {
  margin: 0; padding: 1rem var(--gut);
  background: var(--pink-500); color: #fff; text-align: center;
  font-weight: 600;
}

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; }
.lb[hidden] { display: none; }

.lb__backdrop {
  position: absolute; inset: 0;
  background: rgba(63, 42, 53, .72);
  backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb__dialog {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  width: 100%; height: 100%;
  background: var(--white);
  overflow: hidden;
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.lb__close {
  position: absolute; top: .7rem; right: .7rem; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.lb__close svg { width: 22px; height: 22px; }
.lb__close:hover { background: var(--pink-200); color: var(--pink-700); }

.lb__stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  background: var(--pink-100);
  padding: .5rem;
}
.lb__figure { margin: 0; display: flex; min-height: 0; max-height: 100%; }
.lb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  background: var(--white);
}

.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.lb__nav svg { width: 24px; height: 24px; }
.lb__nav:hover { background: var(--pink-200); color: var(--pink-700); }
.lb__nav--prev { left: .6rem; }
.lb__nav--next { right: .6rem; }
.lb__nav[hidden] { display: none; }

.lb__panel {
  padding: 1rem var(--gut) 1.15rem;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  max-height: 46vh;
}
.lb__heading { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lb__title { font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); }
.lb__note { margin-top: .5rem; color: var(--ink-soft); font-size: .96rem; max-width: 60ch; }
.lb__note:empty { display: none; }

.lb__facts {
  display: flex; flex-wrap: wrap; gap: .35rem 1.4rem;
  margin: .7rem 0 0;
}
.lb__facts:empty { display: none; }
.lb__facts div { display: flex; gap: .4rem; align-items: baseline; }
.lb__facts dt {
  font-family: var(--font-display); font-weight: 700;
  font-size: .76rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-mute);
}
.lb__facts dd { margin: 0; font-size: .93rem; font-weight: 600; }

.lb__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-top: .9rem;
}
.lb__counter {
  font-size: .86rem; font-weight: 600; color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.lb__tools { display: flex; gap: .5rem; }

.lb__thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.lb__thumbs:empty { display: none; }
.lb__thumb {
  width: 64px; height: 52px;
  padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--pink-100);
  transition: border-color .14s ease, transform .14s ease;
}
.lb__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb__thumb:hover { transform: translateY(-2px); border-color: var(--pink-300); }
.lb__thumb[aria-current="true"] { border-color: var(--pink-500); }

.lb__works { display: flex; gap: .5rem; margin-top: 1rem; }

/* ---------- responsive ---------- */
@media (min-width: 700px) {
  .hero__inner { grid-template-columns: 1.02fr 1fr; }
  .hero__text { order: 1; }
  .hero__media { order: 2; }
  .stat-badge { left: -1.25rem; }
}

@media (min-width: 900px) {
  .lb__dialog {
    inset: 3vh 3vw;
    width: auto; height: auto;
    grid-template-rows: 1fr;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr);
    border-radius: var(--r-xl);
    max-width: 1400px;
    margin-inline: auto;
  }
  .lb__panel {
    border-top: 0;
    border-left: 1px solid var(--line);
    max-height: none;
    padding: 2rem 1.75rem;
    align-content: start;
  }
  .lb__close { top: 1rem; right: 1rem; }
  .lb__stage { padding: 1.5rem; }
}

@media (max-width: 640px) {
  .site-header__inner { padding-block: .5rem; }
  .nav { order: 3; width: 100%; margin-inline-start: 0; justify-content: center; }
  .langs { margin-inline-start: auto; }
  .stat-badge { position: static; margin-top: .9rem; width: fit-content; }
}

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .card:focus-within { transform: none; }
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .langs, .lb, .skip-link, .sparkles, .hero__actions { display: none !important; }
  body { background: #fff; }
}
