:root {
  --bg: #f7f4ef;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #fffdfa;
  --surface-soft: #f2ebe1;
  --text: #202022;
  --muted: #6c6c70;
  --line: rgba(197, 160, 89, 0.28);
  --line-strong: rgba(197, 160, 89, 0.48);
  --gold: #c5a059;
  --gold-deep: #ab8337;
  --dark-pill: #1d1d1f;
  --shadow: 0 18px 50px rgba(31, 26, 18, 0.06);
  --shadow-soft: 0 10px 30px rgba(31, 26, 18, 0.04);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top right, rgba(197, 160, 89, 0.09), transparent 22%),
    radial-gradient(circle at 0% 20%, rgba(197, 160, 89, 0.06), transparent 20%),
    linear-gradient(180deg, #faf8f4 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

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

code,
.eyebrow,
.meta-pill,
.tag,
.micro-label,
.mini-note,
.stat-label {
  font-family: "Fragment Mono", ui-monospace, monospace;
}

code {
  font-size: 0.94em;
}

.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;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-image {
  width: min(150px, 22vw);
  height: auto;
  display: block;
}

.footer-logo-image {
  width: min(220px, 100%);
}

.brand-mark {
  display: grid;
  gap: 0.05rem;
}

.brand-initials {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  line-height: 0.75;
  letter-spacing: -0.08em;
}

.brand-caption {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  flex-wrap: wrap;
  min-width: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 180ms ease, opacity 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.lang-link.active {
  background: rgba(197, 160, 89, 0.16);
  color: var(--text);
}

.site-main {
  display: grid;
  gap: 2.2rem;
  padding-bottom: 4rem;
}

.site-footer-wrap {
  margin-top: 3rem;
  background: rgba(241, 236, 227, 0.82);
  border-top: 1px solid rgba(197, 160, 89, 0.22);
}

.site-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(200px, 1fr) minmax(220px, 260px);
  gap: 2rem;
  align-items: start;
}

.footer-block {
  display: grid;
  gap: 0.5rem;
}

.footer-heading {
  color: var(--gold-deep);
  font-size: 0.95rem;
}

.footer-link {
  text-decoration: none;
  color: var(--muted);
}

.footer-link:hover {
  color: var(--text);
}

.page-panel,
.quote-panel,
.hero-visual,
.resume-panel,
.case-study,
.gallery-card,
.post-card,
.article-frame,
.empty-state,
.footer-logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.page-panel {
  padding: clamp(1.4rem, 4vw, 2.3rem);
}

.section-stack {
  display: grid;
  gap: 1.2rem;
}

.section-heading {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.eyebrow,
.micro-label {
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.mini-note {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
}

h1 {
  font-size: clamp(3.8rem, 9vw, 6rem);
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4rem);
}

h3 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  margin: 0;
}

.lede {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.body-copy {
  color: #313134;
}

.accent-script {
  font-family: "Cormorant Garamond", serif;
  color: var(--gold);
  font-style: italic;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.92rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  color: #fff;
  background: linear-gradient(180deg, #1d1d1f 0%, #2c2c30 100%);
  box-shadow: 0 10px 20px rgba(29, 29, 31, 0.18);
}

.button-light {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(197, 160, 89, 0.28);
}

.divider-line {
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.8);
}

.hero-grid,
.split-grid,
.stats-grid,
.cards-grid,
.blog-cards,
.gallery-grid,
.resume-grid {
  display: grid;
  gap: 1.1rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 2rem;
}

.hero-visual {
  padding: 1rem;
  position: relative;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -10px -10px auto;
  width: 68%;
  height: 68%;
  border: 1px solid rgba(197, 160, 89, 0.5);
  border-radius: 28px;
  z-index: 0;
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.home-title {
  max-width: 10ch;
}

.role-list {
  display: grid;
  gap: 0.25rem;
  color: #69707b;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.9rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  --home-reveal-y: 0px;
  --home-tilt-x: 0deg;
  --home-tilt-y: 0deg;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.55rem;
  min-height: 168px;
  display: grid;
  align-content: start;
  gap: 0.3rem;
  box-shadow: var(--shadow-soft);
  transform: translateY(var(--home-reveal-y)) rotateX(var(--home-tilt-x)) rotateY(var(--home-tilt-y));
  transform-style: preserve-3d;
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.stat-card p {
  margin: 0;
}

.stat-value {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  color: var(--gold);
  line-height: 0.95;
}

.stat-card strong {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gold);
  font-weight: 600;
  line-height: 0.95;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.recommendation-card {
  --home-reveal-y: 0px;
  --home-tilt-x: 0deg;
  --home-tilt-y: 0deg;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.55rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-soft);
  transform: translateY(var(--home-reveal-y)) rotateX(var(--home-tilt-x)) rotateY(var(--home-tilt-y));
  transform-style: preserve-3d;
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.home-js-ready .home-reveal-target {
  --home-reveal-y: 18px;
  opacity: 0;
  transition-delay: calc(var(--home-reveal-index, 0) * 75ms);
}

.home-js-ready .home-reveal-target.is-visible {
  --home-reveal-y: 0px;
  opacity: 1;
}

.home-js-ready .stat-card.is-active {
  border-color: rgba(77, 86, 196, 0.34);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(77, 86, 196, 0.1), var(--shadow-soft);
  transform: translateY(calc(var(--home-reveal-y) - 4px)) rotateX(var(--home-tilt-x)) rotateY(var(--home-tilt-y)) scale(1.012);
}

.home-js-ready .stat-card.is-active strong {
  color: #b38b3f;
  text-shadow: 0 8px 28px rgba(197, 160, 89, 0.2);
}

.home-js-ready .recommendation-card:hover {
  border-color: rgba(197, 160, 89, 0.42);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px rgba(31, 26, 18, 0.08), var(--shadow-soft);
}

@media (prefers-reduced-motion: reduce) {
  .home-js-ready .home-reveal-target,
  .home-js-ready .home-reveal-target.is-visible {
    --home-reveal-y: 0px;
    opacity: 1;
    transition: none;
  }

  .stat-card,
  .recommendation-card,
  .home-js-ready .stat-card.is-active,
  .home-js-ready .recommendation-grid.is-spotlight-active .recommendation-card.is-focused,
  .quote-panel,
  .quote-mark img,
  .quote-copy {
    transform: none;
  }

  .home-js-ready .recommendation-grid.is-spotlight-active .recommendation-card,
  .home-js-ready .quote-reveal-target,
  .home-js-ready .quote-reveal-target .quote-mark img,
  .home-js-ready .quote-reveal-target .quote-copy {
    opacity: 1;
    filter: none;
    transition: none;
  }
}

.recommendation-meta {
  display: grid;
  gap: 0.45rem;
}

.recommendation-role {
  color: var(--gold-deep);
  font-size: 0.95rem;
}

.recommendation-meta .meta-pill {
  width: fit-content;
}

.recommendation-copy {
  color: #38383d;
}

.home-js-ready .recommendation-grid.is-spotlight-active .recommendation-card {
  opacity: 0.56;
  filter: saturate(0.86);
}

.home-js-ready .recommendation-grid.is-spotlight-active .recommendation-card.is-focused {
  opacity: 1;
  filter: saturate(1);
  border-color: rgba(77, 86, 196, 0.28);
  box-shadow: 0 22px 54px rgba(31, 26, 18, 0.1), var(--shadow-soft);
  transform: translateY(calc(var(--home-reveal-y) - 6px)) rotateX(var(--home-tilt-x)) rotateY(var(--home-tilt-y)) scale(1.01);
}

.quote-panel {
  --quote-reveal-y: 0px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.8rem;
  padding: 1.6rem;
  align-items: center;
  overflow: hidden;
  transform: translateY(var(--quote-reveal-y));
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.quote-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 180px;
  justify-self: center;
  min-height: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.12), rgba(255, 255, 255, 0.92) 58%);
  font-family: "Cormorant Garamond", serif;
  font-size: 7rem;
  color: rgba(197, 160, 89, 0.55);
  line-height: 1;
  overflow: hidden;
}

.quote-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: sepia(0.16) saturate(0.82) contrast(0.96);
  transform: scale(1.08);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.quote-mark span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.66);
  backdrop-filter: blur(2px);
}

.quote-copy {
  display: grid;
  gap: 1rem;
  color: #47474b;
  font-style: italic;
  transition: opacity 0.7s ease 120ms, transform 0.7s ease 120ms;
}

.quote-author {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-style: normal;
}

.home-js-ready .quote-reveal-target {
  --quote-reveal-y: 20px;
  opacity: 0;
}

.home-js-ready .quote-reveal-target .quote-mark img {
  opacity: 0;
  transform: scale(1.16);
}

.home-js-ready .quote-reveal-target .quote-copy {
  opacity: 0;
  transform: translateX(18px);
}

.home-js-ready .quote-reveal-target.is-visible {
  --quote-reveal-y: 0px;
  opacity: 1;
}

.home-js-ready .quote-reveal-target.is-visible .quote-mark img {
  opacity: 0.34;
  transform: scale(1.08);
}

.home-js-ready .quote-reveal-target.is-visible .quote-copy {
  opacity: 1;
  transform: translateX(0);
}

.home-js-ready .quote-panel.is-visible:hover {
  border-color: rgba(197, 160, 89, 0.42);
  box-shadow: 0 18px 52px rgba(31, 26, 18, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .home-js-ready .quote-reveal-target,
  .home-js-ready .quote-reveal-target.is-visible,
  .home-js-ready .quote-reveal-target .quote-copy,
  .home-js-ready .quote-reveal-target.is-visible .quote-copy {
    --quote-reveal-y: 0px;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-js-ready .quote-reveal-target .quote-mark img,
  .home-js-ready .quote-reveal-target.is-visible .quote-mark img {
    opacity: 0.34;
    transform: scale(1.08);
    transition: none;
  }
}

.pill-row,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag,
.meta-pill,
.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(197, 160, 89, 0.25);
  color: #5d5f63;
  font-size: 0.72rem;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.explore-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resume-panel {
  padding: 1.3rem;
  display: grid;
  gap: 0.9rem;
}

.chronicle-panel {
  position: relative;
  overflow: hidden;
  color: #f5efe5;
  background:
    linear-gradient(155deg, rgba(26, 23, 27, 0.96), rgba(60, 33, 34, 0.94) 58%, rgba(18, 20, 25, 0.98)),
    #1a171b;
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 18px 44px rgba(18, 16, 18, 0.16);
}

.chronicle-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.12), transparent),
    linear-gradient(180deg, rgba(255, 253, 250, 0.08), transparent 42%);
  opacity: 0.68;
}

.chronicle-panel > * {
  position: relative;
  z-index: 1;
}

.chronicle-panel .eyebrow,
.chronicle-panel .contact-inline {
  color: #d9b66f;
}

.chronicle-panel h3 {
  color: #fff8ed;
}

.chronicle-panel .body-copy {
  color: rgba(245, 239, 229, 0.82);
}

.chronicle-subtitle {
  color: #d9b66f;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.1;
}

.resume-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: rgba(197, 160, 89, 0.45);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  display: grid;
  gap: 0.7rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.resume-points {
  display: grid;
  gap: 0.55rem;
  color: #36363a;
}

.resume-points p {
  position: relative;
  padding-left: 1rem;
}

.resume-points p::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 0.8rem;
}

.portfolio-header {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.portfolio-feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
}

.portfolio-feature-copy {
  display: grid;
  gap: 0.55rem;
}

.case-study {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.case-study-header {
  display: grid;
  gap: 0.55rem;
}

.case-study-text {
  display: grid;
  gap: 0.75rem;
  color: #38383d;
}

.case-study-text strong {
  color: var(--text);
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1.25 / 0.9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.gallery-copy {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.1rem 1.2rem;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.86rem;
  border: 1px solid rgba(197, 160, 89, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 26, 18, 0.08);
}

.gallery-link.primary {
  background: linear-gradient(180deg, #1d1d1f 0%, #2c2c30 100%);
  border-color: #1d1d1f;
  color: #fff;
}

.gallery-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  line-height: 1;
}

.post-card {
  padding: 1.35rem;
  display: grid;
  gap: 0.85rem;
}

.post-card-cover,
.article-cover {
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
}

.post-card-cover {
  margin: -0.2rem -0.2rem 0;
}

.post-card-cover img,
.article-cover img {
  width: 100%;
  object-fit: cover;
  border: 1px solid rgba(197, 160, 89, 0.18);
}

.post-card-cover img {
  aspect-ratio: 1.45 / 1;
}

.blog-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card p,
.article-content p,
.article-content li {
  color: #404045;
}

.post-title,
.article-back-link,
.footer-link-inline {
  text-decoration: none;
}

.post-link {
  color: var(--gold-deep);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-frame {
  padding: clamp(1.5rem, 4vw, 2.6rem);
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.article-header,
.article-content {
  display: grid;
  gap: 1rem;
}

.article-cover {
  margin: 1.35rem 0 1.5rem;
}

.article-cover img {
  aspect-ratio: 1.7 / 1;
  border-radius: calc(var(--radius-lg) - 2px);
  box-shadow: var(--shadow-soft);
}

.article-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.article-back-link {
  color: var(--muted);
  font-size: 0.92rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 1.1rem;
}

.article-content blockquote {
  margin: 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: rgba(197, 160, 89, 0.08);
  border-radius: 18px;
  color: #3d3d42;
}

.code-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.code-preview-card,
.code-snippet-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.code-preview-card img {
  width: 100%;
  display: block;
}

.code-preview-copy,
.code-snippet-copy {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.1rem 1.2rem;
}

.code-snippet-copy pre {
  font-size: 0.82rem;
  line-height: 1.55;
}

.ad-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.4rem;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.ad-hero-panel::before {
  content: "";
  position: absolute;
  left: clamp(1.2rem, 4vw, 2.3rem);
  right: clamp(1.2rem, 4vw, 2.3rem);
  top: 1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(197, 160, 89, 0), rgba(197, 160, 89, 0.68), rgba(197, 160, 89, 0));
}

.ad-hero-copy,
.ad-hero-note,
.ad-leadership-card,
.ad-process article,
.ad-framework-card,
.ad-creative-card,
.ad-hook-panel article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.ad-hero-copy {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--radius-lg);
}

.ad-hero-copy h1 {
  max-width: 9ch;
}

.ad-hero-note {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  color: #38383d;
  border-left: 4px solid rgba(197, 160, 89, 0.7);
}

.ad-hero-cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(197, 160, 89, 0.22);
  box-shadow: 0 14px 34px rgba(31, 26, 18, 0.08);
}

.ad-slide-panel {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.ad-slide-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: rgba(77, 86, 196, 0.11);
  border: 1px solid rgba(77, 86, 196, 0.18);
  color: #4d56c4;
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slide-heading {
  display: grid;
  gap: 0.9rem;
  max-width: 980px;
}

.ad-slide-heading h2 {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
}

.ad-slide-heading p {
  color: #3d3d42;
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 82ch;
}

.ad-framework-slide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.ad-framework-item {
  --reveal-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: clamp(1.3rem, 3vw, 1.8rem);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(31, 26, 18, 0.05);
  transform: translateY(var(--reveal-y)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.ad-framework-item:hover {
  box-shadow: 0 16px 44px rgba(31, 26, 18, 0.09);
}

.ad-framework-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.01em;
}

.ad-framework-item h3,
.ad-role-column h3,
.ad-flow-column h3 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
}

.ad-framework-item h3 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.ad-framework-item p {
  color: #3d3d42;
  font-size: 1rem;
}

.ad-rules-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: stretch;
}

.ad-role-column,
.ad-flow-column {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.ad-role-column h3,
.ad-flow-column h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.ad-role-card,
.ad-flow-card,
.ad-scale-rules article {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.ad-role-card {
  --reveal-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  border-left: 4px solid rgba(197, 160, 89, 0.55);
  transform: translateY(var(--reveal-y)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.ad-role-card--lead {
  border-left-color: var(--gold);
  background: linear-gradient(160deg, rgba(255, 253, 250, 0.97), rgba(244, 237, 225, 0.5));
}

.ad-role-card h4,
.ad-flow-card h4 {
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.ad-role-card p,
.ad-flow-card p,
.ad-scale-rules p,
.ad-rules-note {
  color: #3d3d42;
}

.ad-flow-column {
  align-content: center;
}

.ad-flow-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
  padding: 2.4rem 0;
}

.ad-flow-track::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.48);
  transform: translateY(-50%);
}

.ad-rules-slide.is-running .ad-flow-track::before {
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.22), rgba(77, 86, 196, 0.72), rgba(197, 160, 89, 0.22));
  background-size: 220% 100%;
  animation: adFlowLine 3.9s ease-in-out infinite;
}

.ad-flow-card {
  --reveal-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  min-height: 170px;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  transform: translateY(var(--reveal-y)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.ad-flow-card:nth-child(2)::before {
  content: "";
  position: absolute;
  inset: -1.1rem -0.7rem;
  border: 2px solid rgba(197, 160, 89, 0.68);
  border-radius: 50%;
  pointer-events: none;
}

.ad-flow-card span,
.ad-scale-rules span {
  display: inline-flex;
  width: fit-content;
  justify-self: center;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 226, 110, 0.82);
  color: #202022;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.ad-scale-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ad-scale-rules article {
  --reveal-y: 0px;
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 12px;
  border-top: 2px solid var(--line-strong);
  background: rgba(255, 253, 250, 0.85);
  transform: translateY(var(--reveal-y));
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.ad-scale-rules span {
  justify-self: start;
}

.ad-rules-note {
  max-width: 92ch;
  font-size: 1.05rem;
}

.ad-js-ready .ad-reveal-target {
  --reveal-y: 18px;
  opacity: 0;
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.ad-js-ready .ad-reveal-target.is-visible {
  --reveal-y: 0px;
  opacity: 1;
}

.ad-flow-card.is-active,
.ad-scale-rules article.is-active {
  border-color: rgba(77, 86, 196, 0.42);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 44px rgba(77, 86, 196, 0.12), var(--shadow-soft);
}

.ad-flow-card.is-active {
  transform: translateY(calc(var(--reveal-y) - 4px)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.015);
}

.ad-scale-rules article.is-active {
  transform: translateY(calc(var(--reveal-y) - 4px));
}

.ad-flow-card.is-active span,
.ad-scale-rules article.is-active span {
  background: rgba(77, 86, 196, 0.18);
  color: #3f49b8;
}

@keyframes adFlowLine {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ad-js-ready .ad-reveal-target,
  .ad-js-ready .ad-reveal-target.is-visible {
    --reveal-y: 0px;
    opacity: 1;
    transition: none;
  }

  .ad-framework-item,
  .ad-role-card,
  .ad-flow-card,
  .ad-scale-rules article,
  .ad-flow-card.is-active,
  .ad-scale-rules article.is-active {
    transform: none;
  }

  .ad-rules-slide.is-running .ad-flow-track::before {
    animation: none;
  }
}

.ad-leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ad-leadership-card {
  display: grid;
  gap: 0.7rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
}

.ad-leadership-card--lead {
  border-color: rgba(197, 160, 89, 0.52);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 237, 225, 0.72));
}

.ad-leadership-card h3,
.ad-framework-card h3,
.ad-hook-panel h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.ad-leadership-card p,
.ad-process p,
.ad-framework-card p,
.ad-hook-panel p,
.ad-creative-copy p {
  color: #3d3d42;
}

.ad-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ad-process article {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
}

.ad-process span,
.ad-type-number {
  font-family: "Cormorant Garamond", serif;
  color: var(--gold);
  font-size: 2rem;
  line-height: 0.9;
}

.ad-process h4 {
  line-height: 1;
}

.ad-framework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ad-framework-card {
  display: grid;
  gap: 0.7rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  position: relative;
}

.ad-framework-card::after {
  content: "";
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.75);
}

.ad-category-section {
  display: grid;
  gap: 0.25rem;
}

.ad-creative-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ad-creative-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.ad-creative-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, rgba(29, 29, 31, 0.96), rgba(52, 48, 43, 0.94)),
    #111;
  border-bottom: 1px solid var(--line);
}

.ad-creative-media img,
.ad-creative-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.ad-creative-media video {
  background: #111;
}

.ad-creative-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem 1rem;
}

.ad-creative-copy h3 {
  font-size: 1.35rem;
  line-height: 1;
}

.ad-hook-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ad-hook-panel article {
  display: grid;
  gap: 0.7rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
}

.article-content pre,
pre {
  margin: 0;
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: #19191b;
  color: #f8f8f4;
}

.empty-state {
  padding: 1.4rem;
}

.contact-inline {
  color: var(--gold-deep);
  text-decoration: none;
}

.text-center {
  text-align: center;
}

.align-center {
  justify-items: center;
}

/* ── Idol Hero Sections ── */
.idol-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.8rem;
  align-items: center;
}

.idol-hero-text {
  display: grid;
  gap: 0.85rem;
}

.idol-hero-name {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--text);
}

.idol-brand-badge {
  display: inline-flex;
  align-items: center;
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  width: fit-content;
}

.idol-brand-badge--dior {
  background: rgba(16, 24, 60, 0.06);
  color: #1a2050;
  border: 1px solid rgba(16, 24, 60, 0.18);
}

.idol-brand-badge--miumiu {
  background: rgba(210, 100, 150, 0.07);
  color: #b03870;
  border: 1px solid rgba(210, 100, 150, 0.22);
}

.idol-brand-badge--valentino {
  background: rgba(140, 20, 40, 0.06);
  color: #8c1428;
  border: 1px solid rgba(140, 20, 40, 0.18);
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.petite-chat {
  position: fixed;
  right: clamp(1rem, 3vw, 1.6rem);
  bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 50;
  display: grid;
  justify-items: end;
  gap: 0.8rem;
  pointer-events: none;
}

@keyframes petite-toggle-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes petite-panel-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
  }

  58% {
    opacity: 1;
    transform: translateY(-5px) scale(1.018);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes petite-message-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes petite-thinking-pulse {
  0%,
  100% {
    box-shadow: 0 10px 22px rgba(31, 26, 18, 0.08);
    transform: translateY(0) rotate(0deg);
  }

  50% {
    box-shadow: 0 14px 30px rgba(197, 160, 89, 0.2);
    transform: translateY(-2px) rotate(-2deg);
  }
}

@keyframes petite-dot-bounce {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes petite-heart-float {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.55) rotate(0deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translateY(calc(-56px - var(--heart-index) * 5px))
      translateX(calc((var(--heart-index) - 3) * 16px))
      scale(1)
      rotate(calc((var(--heart-index) - 3) * 9deg));
  }
}

.petite-chat * {
  box-sizing: border-box;
}

.petite-chat-toggle,
.petite-chat-panel {
  pointer-events: auto;
}

.petite-chat-toggle,
.petite-chat-close,
.petite-chat-prompts button,
.petite-chat-form button {
  font: inherit;
}

.petite-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.2rem;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  border: 1px solid rgba(197, 160, 89, 0.42);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 16px 38px rgba(31, 26, 18, 0.12);
  cursor: pointer;
  backdrop-filter: blur(12px);
  animation: petite-toggle-float 3.8s ease-in-out infinite;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  will-change: transform;
}

.petite-chat-toggle:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
  border-color: rgba(197, 160, 89, 0.68);
  box-shadow: 0 20px 44px rgba(31, 26, 18, 0.16);
}

.petite-chat-toggle-mark {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  color: #fffdfa;
  background: #fffdfa;
  border: 1px solid rgba(197, 160, 89, 0.34);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.petite-chat-toggle-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.42);
}

.petite-chat-toggle-copy {
  font-size: 0.88rem;
  font-weight: 700;
}

.petite-chat-panel {
  width: min(390px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 6rem));
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(247, 244, 239, 0.96)),
    var(--surface-solid);
  box-shadow: 0 24px 70px rgba(31, 26, 18, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(18px) scale(0.9);
  transform-origin: calc(100% - 2rem) 100%;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.25, 1.25);
  will-change: opacity, transform;
}

.petite-chat.is-open .petite-chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: petite-panel-pop 360ms cubic-bezier(0.2, 0.9, 0.25, 1.25) both;
}

.petite-chat.is-open .petite-chat-toggle {
  animation-play-state: paused;
  transform: translateY(-2px) scale(0.98);
}

.petite-chat.is-closing .petite-chat-panel {
  pointer-events: none;
}

.petite-chat-panel[hidden] {
  display: none;
}

.petite-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
}

.petite-chat-identity {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.petite-chat-avatar {
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 18px;
  object-fit: cover;
  object-position: 50% 44%;
  background: #fffdfa;
  box-shadow: 0 10px 22px rgba(31, 26, 18, 0.08);
}

.petite-chat.is-thinking .petite-chat-avatar {
  animation: petite-thinking-pulse 1s ease-in-out infinite;
}

.petite-chat.is-thinking .petite-chat-toggle-mark {
  border-color: rgba(197, 160, 89, 0.62);
}

.petite-chat-kicker {
  margin: 0 0 0.3rem;
  color: var(--gold-deep);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.petite-chat-header h2 {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.petite-chat-close {
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 0.78rem;
}

.petite-chat-close:hover {
  color: var(--text);
  border-color: rgba(197, 160, 89, 0.48);
}

.petite-chat-log {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.petite-chat-message {
  display: flex;
  transform-origin: bottom center;
}

.petite-chat.is-open .petite-chat-message {
  animation: petite-message-pop 240ms ease both;
}

.petite-chat-message-user {
  justify-content: flex-end;
}

.petite-chat-message-bot {
  justify-content: flex-start;
}

.petite-chat-bubble {
  width: fit-content;
  max-width: min(290px, 84%);
  padding: 0.75rem 0.86rem;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 8px 22px rgba(31, 26, 18, 0.06);
}

.petite-chat-message-bot .petite-chat-bubble {
  color: #37373d;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-bottom-left-radius: 8px;
}

.petite-chat-message-user .petite-chat-bubble {
  color: #fffdfa;
  background: linear-gradient(180deg, #1d1d1f, #303035);
  border-bottom-right-radius: 8px;
}

.petite-chat-bubble a {
  color: #4d56c4;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.petite-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.petite-chat-typing span {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

.petite-chat-typing i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.84);
  animation: petite-dot-bounce 820ms ease-in-out infinite;
}

.petite-chat-typing i:nth-child(2) {
  animation-delay: 120ms;
}

.petite-chat-typing i:nth-child(3) {
  animation-delay: 240ms;
}

.petite-chat-bubble-rich {
  width: min(330px, 92%);
  max-width: 92%;
}

.petite-chat-card {
  display: grid;
  gap: 0.65rem;
}

.petite-chat-card-title {
  color: var(--gold-deep);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.petite-chat-card p {
  color: #37373d;
}

.petite-chat-list {
  display: grid;
  gap: 0.45rem;
}

.petite-chat-list span {
  position: relative;
  padding-left: 0.85rem;
  color: #4b4b51;
  font-size: 0.82rem;
  line-height: 1.42;
}

.petite-chat-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.84);
}

.petite-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.petite-chat-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 253, 250, 0.86);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.petite-chat-actions a:hover {
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 8px 18px rgba(31, 26, 18, 0.08);
}

.petite-chat-quiz {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.petite-chat-quiz button {
  min-height: 2.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 12px;
  color: #333339;
  background: rgba(255, 253, 250, 0.9);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.petite-chat-quiz button:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 86, 196, 0.36);
  box-shadow: 0 8px 18px rgba(31, 26, 18, 0.08);
}

.petite-heart-burst {
  position: absolute;
  right: 1.25rem;
  bottom: 4rem;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.petite-heart-burst span {
  position: absolute;
  left: 0;
  bottom: 0;
  color: #b98aa8;
  font-size: 1rem;
  line-height: 1;
  text-shadow: 0 6px 18px rgba(185, 138, 168, 0.22);
  animation: petite-heart-float 1.25s ease-out both;
  animation-delay: calc(var(--heart-index) * 55ms);
}

.petite-chat-prompts {
  display: flex;
  gap: 0.45rem;
  padding: 0 1rem 0.75rem;
  overflow-x: auto;
}

.petite-chat-prompts button {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.3rem 0.72rem;
  border: 1px solid rgba(197, 160, 89, 0.26);
  border-radius: 999px;
  color: #4f5056;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 0.76rem;
  white-space: nowrap;
}

.petite-chat-prompts button:hover {
  color: var(--text);
  border-color: rgba(197, 160, 89, 0.5);
}

.petite-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.85rem;
  border-top: 1px solid rgba(197, 160, 89, 0.22);
  background: rgba(255, 253, 250, 0.78);
}

.petite-chat-form input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.petite-chat-form input:focus {
  border-color: rgba(77, 86, 196, 0.46);
  box-shadow: 0 0 0 3px rgba(77, 86, 196, 0.12);
}

.petite-chat-form button {
  min-height: 2.65rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid #1d1d1f;
  border-radius: 999px;
  color: #fffdfa;
  background: linear-gradient(180deg, #1d1d1f, #2c2c30);
  cursor: pointer;
  font-size: 0.86rem;
}

.petite-chat-form button:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .petite-chat-toggle,
  .petite-chat.is-open .petite-chat-panel,
  .petite-chat.is-open .petite-chat-message,
  .petite-chat.is-thinking .petite-chat-avatar,
  .petite-chat-typing i,
  .petite-heart-burst span {
    animation: none;
  }

  .petite-chat-toggle,
  .petite-chat-toggle:hover,
  .petite-chat.is-open .petite-chat-toggle,
  .petite-chat-panel,
  .petite-chat.is-open .petite-chat-panel,
  .petite-chat-quiz button:hover {
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .split-grid,
  .resume-grid,
  .gallery-grid,
  .portfolio-metrics,
  .portfolio-feature-panel,
  .ad-hero-panel,
  .ad-framework-slide-grid,
  .ad-rules-layout,
  .ad-flow-track,
  .ad-scale-rules,
  .ad-leadership-grid,
  .ad-process,
  .ad-framework-grid,
  .ad-hook-panel,
  .recommendation-grid,
  .quote-panel,
  .site-footer,
  .idol-hero-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .cards-grid,
  .blog-cards,
  .ad-creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-feature-panel .button {
    width: fit-content;
  }

  .ad-flow-track {
    padding: 0;
  }

  .ad-flow-track::before,
  .ad-flow-card:nth-child(2)::before {
    display: none;
  }

  .site-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .site-brand {
    flex: 0 0 auto;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
    gap: 0.9rem;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(calc(100% - 1.2rem), var(--max));
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1rem 0 1.1rem;
  }

  .site-brand {
    width: fit-content;
  }

  .site-logo-image {
    width: min(104px, 32vw);
  }

  .site-nav {
    order: initial;
    width: 100%;
    justify-content: flex-start;
    gap: 0.9rem 1rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .header-actions {
    margin-left: 0;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .lang-switch {
    flex: 0 0 auto;
  }

  .header-actions .button {
    flex: 0 0 auto;
  }

  .article-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-panel,
  .quote-panel,
  .article-frame,
  .post-card,
  .resume-panel,
  .case-study,
  .gallery-card {
    border-radius: 24px;
  }

  .page-panel {
    padding: 1.2rem;
  }

  .hero-grid {
    gap: 1.15rem;
  }

  .home-title,
  h1 {
    max-width: none;
    font-size: clamp(2.8rem, 12vw, 4.2rem);
    line-height: 0.96;
  }

  .accent-script {
    font-size: clamp(1.15rem, 5vw, 1.6rem);
  }

  .role-list {
    font-size: 0.76rem;
    letter-spacing: 0.16em;
  }

  .button-row {
    width: 100%;
  }

  .button-row .button {
    width: 100%;
  }

  .quote-panel {
    padding: 1.2rem;
  }

  .quote-mark {
    min-height: 120px;
    font-size: 4.5rem;
  }

  .stats-grid,
  .cards-grid,
  .blog-cards,
  .ad-framework-slide-grid,
  .ad-scale-rules,
  .ad-creative-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: auto;
  }

  .code-showcase {
    grid-template-columns: 1fr;
  }

  .hero-visual::after,
  .timeline::before {
    display: none;
  }

  .meta-row,
  .pill-row,
  .tag-row {
    gap: 0.45rem;
  }

  .timeline-item {
    padding-left: 0;
  }

  .timeline-item::before {
    display: none;
  }

  .idol-hero-inner {
    grid-template-columns: 1fr;
  }

  .portfolio-feature-panel .button {
    width: 100%;
  }

  .petite-chat {
    right: 0.6rem;
    bottom: 0.6rem;
  }

  .petite-chat-panel {
    width: calc(100vw - 1.2rem);
    max-height: min(620px, calc(100vh - 5rem));
    border-radius: 20px;
  }

  .petite-chat-toggle-copy {
    display: none;
  }

  .petite-chat-toggle {
    padding: 0.42rem;
  }

  .petite-chat-bubble {
    max-width: 88%;
  }

  .petite-chat-quiz {
    grid-template-columns: 1fr;
  }
}
