/* Justin.vn — personal site. Ported 1:1 from the claude.ai/design export
   (Justin.vn.dc.html), with the design-tool runtime (support.js,
   image-slot.js, <x-dc>/<sc-if>) replaced by plain HTML/CSS/JS. */

:root {
  --bg: #F7F1E8;
  --bg-warm: #F1DDCB;
  --text: #3A2A22;
  --text-strong: #2E1F18;
  --text-soft: #6B564A;
  --text-softer: #8A7466;
  --text-body: #4A372D;
  --accent: #A5492C;
  --accent-hover: #8A3A20;
  --accent-hover-dark: #7E3419;
  --border: #E3D5C7;
  --card-bg: #FFFBF6;
  --cream: #FFF3E8;
  --dark: #3A2419;
  --dark-2: #3A2A19;
  --selection: #E8C9B6;
  --max: 640px;
  --wide: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 0 0.12 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--bg-warm) 0%, rgba(247, 241, 232, 0) 70%);
  background-repeat: repeat, no-repeat;
  color: var(--text);
  font-family: 'Be Vietnam Pro', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover-dark); }
::selection { background: var(--selection); }

img { max-width: 100%; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- nav ---------- */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0 0;
}

.nav__logo {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  color: var(--text-strong);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__logo:hover { color: var(--text-strong); }
.nav__logo em { color: var(--accent); font-style: normal; }

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
}

.nav__links a {
  color: var(--text-soft);
  text-decoration: none;
}
.nav__links a:hover { color: var(--accent); }

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

.hero { padding: 72px 0 56px; }

.hero__frame {
  position: relative;
  margin: 0 14px 14px 0;
}
.hero__frame-outline {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid #C98A6E;
  border-radius: 4px;
}
.hero__frame-dot {
  position: absolute;
  top: -28px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #E9C3AA;
  opacity: 0.7;
}
.hero__photo {
  position: relative;
  aspect-ratio: 1452 / 1206;
  border-radius: 4px;
  overflow: hidden;
  background: #EADFD2;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.hero .eyebrow { margin: 40px 0 12px; }

.hero__title {
  margin: 0;
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(40px, 8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.hero__lede {
  margin: 28px 0 0;
  font-family: 'Newsreader', serif;
  font-size: 21px;
  line-height: 1.6;
  color: var(--text-body);
  text-wrap: pretty;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.btn--solid {
  background: var(--accent);
  color: #FFF8F1;
}
.btn--solid:hover { background: var(--accent-hover); color: #FFF8F1; }
.btn--outline {
  border: 1px solid #CDB4A3;
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--light {
  background: var(--cream);
  color: var(--dark);
  position: relative;
}
.btn--light:hover { background: #E9C3AA; color: var(--dark); }

/* ---------- stats ---------- */

.stats {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__num {
  font-family: 'Newsreader', serif;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}
.stat__title {
  font-family: 'Newsreader', serif;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-strong);
}
.stat__label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ---------- photo gallery (breakout to 960px) ---------- */

.breakout-960 {
  position: relative;
  left: 50%;
  width: min(960px, calc(100vw - 40px));
  margin: 24px 0 64px calc(min(960px, calc(100vw - 40px)) / -2);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.photo-slot {
  aspect-ratio: 4 / 5;
}
.photo-slot--offset { margin-top: 48px; }

/* placeholder card standing in for an unfilled <image-slot> */
.placeholder {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border: 1px dashed #CDB4A3;
  background: #EFE3D4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  color: var(--text-softer);
}
.placeholder svg { opacity: 0.55; }
.placeholder span {
  font-size: 13px;
  line-height: 1.5;
  max-width: 20ch;
}

/* ---------- journey section ---------- */

.journey {
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
}
.journey h2 {
  margin: 0 0 36px;
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  color: var(--text-strong);
}
.journey__body {
  font-family: 'Newsreader', serif;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-wrap: pretty;
}
.journey__body p { margin: 0; }
.journey__dropcap {
  float: left;
  font-size: 72px;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

.timeline {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 8px 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}
.timeline strong { font-weight: 600; color: var(--accent); }

.pull-quote {
  position: relative;
  left: 50%;
  width: 100vw;
  margin: 32px 0 32px -50vw;
  background: var(--accent);
  overflow: hidden;
}
.pull-quote__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 228, 0.18);
}
.pull-quote__ring--1 { width: 520px; height: 520px; margin: -260px 0 0 -260px; }
.pull-quote__ring--2 { width: 780px; height: 780px; margin: -390px 0 0 -390px; border-color: rgba(255, 240, 228, 0.12); }
.pull-quote__ring--3 { width: 1040px; height: 1040px; margin: -520px 0 0 -520px; border-color: rgba(255, 240, 228, 0.08); }
.pull-quote blockquote {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 20px;
  font-style: italic;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.4;
  color: var(--cream);
  text-align: center;
  text-wrap: balance;
}

.journey__signoff {
  margin: 8px 0 0;
  font-style: italic;
  font-size: 30px;
  color: var(--text-strong);
}

/* ---------- meditation section ---------- */

.practice {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 64px 0;
}
.practice h2 {
  margin: 0 0 32px;
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  color: var(--text-strong);
}
.practice__cover {
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.link-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}
.link-card:hover { border-color: var(--accent); color: var(--text); }
.link-card__text { display: flex; flex-direction: column; gap: 4px; }
.link-card__title { font-family: 'Newsreader', serif; font-size: 24px; color: var(--text-strong); }
.link-card__sub { font-size: 14px; color: var(--text-soft); }
.link-card__arrow { font-size: 22px; color: var(--accent); }

/* ---------- app promo ---------- */

.promo {
  position: relative;
  overflow: hidden;
  margin: 0 0 64px;
  padding: 48px 36px;
  background: var(--dark);
  border-radius: 8px;
}
.promo__dot-1 {
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
.promo__dot-2 {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #E9C3AA;
  opacity: 0.35;
}
.promo .eyebrow { position: relative; color: #E9C3AA; margin: 0 0 12px; }
.promo h2 {
  position: relative;
  margin: 0 0 16px;
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.15;
  color: var(--cream);
}
.promo p {
  position: relative;
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.7;
  color: #EADBCF;
  text-wrap: pretty;
  max-width: 440px;
}

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

.contact {
  border-top: 1px solid var(--border);
  padding: 64px 0 48px;
}
.contact h2 {
  margin: 0 0 20px;
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  color: var(--text-strong);
}
.contact__lede {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 520px;
}
.contact__email {
  font-family: 'Newsreader', serif;
  font-size: clamp(22px, 5vw, 32px);
  color: var(--accent);
  word-break: break-all;
}
.contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  font-size: 15px;
}
.contact__social a { color: var(--text); }
.contact__social a:hover { color: var(--accent); }

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

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-softer);
}

/* ---------- reveal-on-scroll ----------
   Only elements the script decides are below the fold on load get the
   hidden state (see js/main.js) — this keeps the page fully visible for
   no-JS / no-IntersectionObserver visitors instead of staying blank. */

[data-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-reveal].reveal-pending.is-visible {
  opacity: 1;
  transform: none;
}
