/* Dung Ho — portfolio
   Colours and type carried over from the Claude Design source. */

:root {
  --bg: #FBF0E4;
  --ink: #241C1A;
  --green: #2F6B3A;
  --red: #B0303F;
  --amber: #EFA93B;
  --rose: #E4636F;
  --cream: #FFF6EE;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: Karla, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad-x: clamp(20px, 5vw, 72px);
  --pad-y: clamp(56px, 8vw, 112px);
  --gap: clamp(16px, 2vw, 28px);
  --wide: 1400px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-decoration-color: rgba(47, 107, 58, .35);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--red);
  text-decoration-color: rgba(176, 48, 63, .6);
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }

.page { position: relative; overflow: hidden; max-width: 100%; }
.wrap { max-width: var(--wide); margin: 0 auto; }
.wrap-mid { max-width: 1250px; margin: 0 auto; }
.wrap-narrow { max-width: 1100px; margin: 0 auto; }
.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;
}

/* ---------- motion ---------- */

@keyframes drift {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); }
  100% { transform: translate3d(6vw, 108vh, 0) rotate(320deg); }
}
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes bloom {
  0%   { transform: scale(.94) rotate(0deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.petals {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 3; overflow: hidden;
}
.petal {
  position: absolute;
  border-radius: 60% 40% 55% 45%;
  animation: drift linear infinite;
}

[data-reveal] { opacity: 0; transform: translateY(22px); }
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1),
              transform .9s cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-art, .portrait-art { animation: none !important; }
  .marquee-track { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad-x);
  background: rgba(251, 240, 228, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 28, 26, .08);
}
.brand {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
}
.site-nav {
  display: flex; flex-wrap: wrap;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--red); }

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

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: .03em;
  text-decoration: none;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.btn-solid { background: var(--red); color: var(--cream); }
.btn-solid:hover { background: var(--green); color: var(--cream); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid rgba(36, 28, 26, .25); color: var(--ink); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-cream { background: var(--bg); color: var(--ink); }
.btn-cream:hover { background: var(--amber); color: var(--ink); }
.btn-lg { padding: 16px 34px; font-size: 16px; letter-spacing: .02em; }
.btn-contact { background: var(--cream); color: var(--ink); }
.btn-contact:hover { background: var(--green); color: var(--cream); }

.link-arrow {
  font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 107, 58, .4);
  padding-bottom: 3px;
}

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

.hero {
  position: relative;
  padding: clamp(36px, 6vw, 88px) var(--pad-x) clamp(32px, 5vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--wide); margin: 0 auto;
}
.hero-copy, .hero-figure { min-width: 0; }
.eyebrow {
  margin: 0 0 18px;
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--green);
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8.5vw, 116px);
  line-height: .95; letter-spacing: -.02em; text-wrap: balance;
}
.hero h1 em { color: var(--red); }
.lede {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: rgba(36, 28, 26, .82);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-figure { position: relative; }
.hero-bloom {
  position: absolute; inset: -8% -6% -10% -8%;
  border-radius: 48% 52% 44% 56%;
  background: radial-gradient(circle at 35% 30%,
    rgba(239, 169, 59, .4), rgba(47, 107, 58, .18) 62%, transparent 72%);
  animation: bloom 60s linear infinite;
}
.hero-art {
  position: relative;
  aspect-ratio: 5 / 6;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 34px 60px -30px rgba(36, 28, 26, .5);
  animation: sway 10s ease-in-out infinite;
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(36, 28, 26, .1);
  border-bottom: 1px solid rgba(36, 28, 26, .1);
  background: var(--green);
  padding: 14px 0;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 34s linear infinite;
  color: var(--bg);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 40px);
  white-space: nowrap;
}
.marquee-track span { padding-right: 40px; }
.marquee-track .star { color: var(--amber); }

/* ---------- sections ---------- */

.section { padding: var(--pad-y) var(--pad-x); }
.section-green { background: var(--green); color: var(--bg); }
.section-red { background: var(--red); color: var(--cream); }

.section-head {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1; letter-spacing: -.015em;
}
.section-note {
  margin: 0; max-width: 38ch;
  font-size: 15px; line-height: 1.65;
}

.page-title {
  margin: 0;
  font-size: clamp(44px, 8vw, 104px);
  line-height: .95; letter-spacing: -.02em;
}
.page-intro {
  margin: 20px 0 0; max-width: 52ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  color: rgba(36, 28, 26, .82);
  text-wrap: pretty;
}

/* ---------- gallery ---------- */

.gallery { column-width: 335px; column-gap: var(--gap); }
.gallery figure {
  margin: 0 0 var(--gap);
  break-inside: avoid;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s;
}
.gallery figure:hover {
  transform: translateY(-8px) rotate(var(--tilt, -1deg));
  box-shadow: 0 26px 50px -24px rgba(36, 28, 26, .45);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--gap);
}

/* ---------- images ---------- */

.img {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background: rgba(36, 28, 26, .07);
}
.img img {
  transition: opacity .5s ease, filter .5s ease;
}
.img img.is-lqip { filter: blur(14px); transform: scale(1.04); }
.img.is-empty { display: grid; place-items: center; }
.img.is-empty::after {
  content: attr(data-placeholder);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(36, 28, 26, .38);
  text-align: center; padding: 8px;
}
.section-green .img, .section-red .img { background: rgba(251, 240, 228, .12); }
.section-green .img.is-empty::after,
.section-red .img.is-empty::after { color: rgba(251, 240, 228, .55); }
.round { border-radius: 18px; }
.round-sm { border-radius: 14px; }
.round-xs { border-radius: 10px; }
.circle { border-radius: 50%; }

/* ---------- about teaser ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.split > * { min-width: 0; }
.teaser-eyebrow {
  margin: 0 0 18px;
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--amber);
}
.teaser-text {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.25; letter-spacing: -.01em;
  text-wrap: pretty;
}
.teaser-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.6vw, 20px);
}
.teaser-pair > div { aspect-ratio: .96; }
.teaser-pair > div:last-child { margin-top: clamp(18px, 3vw, 44px); }

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

.contact { text-align: center; max-width: 900px; margin: 0 auto; }
.contact h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1; letter-spacing: -.02em;
}
.contact p {
  margin: 22px auto 36px; max-width: 44ch;
  font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6;
}
.contact-social {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 26px; margin-top: 44px;
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.contact-social a {
  color: var(--cream); text-decoration: none;
  border-bottom: 1px solid rgba(255, 246, 238, .55);
}
.contact-social a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* ---------- books ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(20px, 2.6vw, 38px);
}
.book { min-width: 0; }
.book-cover {
  aspect-ratio: 5 / 6;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.book:hover .book-cover { transform: translateY(-10px) rotate(var(--tilt, -1deg)); }
.book h2 {
  margin: 16px 0 4px;
  font-size: 24px; line-height: 1.15;
}
.book p { margin: 0; font-size: 14px; color: rgba(36, 28, 26, .78); }

.press-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.press-list li {
  display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid rgba(251, 240, 228, .28);
}
.press-list li:last-child { border-bottom: 1px solid rgba(251, 240, 228, .28); }
.press-title { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); }
.press-kind {
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber);
}

/* ---------- about ---------- */

.bio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  max-width: 1250px; margin: 0 auto;
}
.bio > * { min-width: 0; }
.portrait { max-width: 440px; width: 100%; justify-self: center; position: relative; }
.portrait-bloom {
  position: absolute; inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,
    rgba(239, 169, 59, .4), rgba(47, 107, 58, .16) 62%, transparent 72%);
}
.portrait-art { position: relative; aspect-ratio: 1; animation: sway 12s ease-in-out infinite; }
.bio h1 {
  margin: 0 0 26px;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: .98; letter-spacing: -.02em;
}
.bio-body p {
  margin: 0 0 20px;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.65;
  text-wrap: pretty;
}
.bio-body p:last-of-type { margin-bottom: 34px; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px; margin: 0;
  padding-top: 28px;
  border-top: 1px solid rgba(36, 28, 26, .16);
}
.facts dt {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green);
}
.facts dd { margin: 6px 0 0; font-family: var(--serif); font-size: 24px; }

.print { min-width: 0; }
.print-frame {
  border-radius: 14px; overflow: hidden; aspect-ratio: 1.04;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.print:hover .print-frame { transform: translateY(-8px) rotate(var(--tilt, -1deg)); }
.print p { margin: 14px 0 0; font-size: 15px; }

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

.site-footer {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 26px var(--pad-x);
  font-size: 13px;
  color: rgba(36, 28, 26, .7);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { text-decoration: none; }

/* ---------- cursor trail ---------- */

.cursor-dot {
  position: fixed; left: 0; top: 0;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(228, 99, 111, .55), rgba(239, 169, 59, .3) 58%, rgba(239, 169, 59, 0) 72%);
  pointer-events: none; z-index: 9999;
  opacity: 0; transition: opacity .4s;
}
