  /* ══════════════════════════════════════════════
     RESET & TOKENS
  ══════════════════════════════════════════════ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg:            #0a0705;
    --bg2:           #0e0a07;
    --crimson:       #8b0000;
    --gold:          #c9a84c;
    --gold2:         #d4af37;
    --gold3:         #a07820;
    --gold-dim:      #7a5e18;
    --gold-bright:   #ead870;
    --parchment:     #f0e6d3;
    --parchment2:    #e0ceaf;
    --parchment-dim: #b89970;
    --frame-outer:   #1a0c00;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--parchment);
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    line-height: 1.8;
    overflow-x: hidden;
  }

  /* ── Grain overlay ── */
  body::after {
    content: '';
    position: fixed; inset: 0;
    z-index: 9999; pointer-events: none; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 250px 250px;
  }

  /* ── Utility ── */
  img { display: block; width: 100%; }

  .gold-rule {
    display: flex; align-items: center; gap: 0.9rem;
    max-width: 520px; margin: 0 auto;
  }
  .gold-rule::before, .gold-rule::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold3), var(--gold), var(--gold3), transparent);
  }
  .gold-rule-gem {
    color: var(--gold); font-size: 0.85rem;
    letter-spacing: 0.2em; white-space: normal;
    word-wrap: break-word; overflow-wrap: break-word;
    max-width: 100%; text-align: center; padding: 0 1rem;
  }

  .eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem; letter-spacing: 0.6em;
    color: var(--gold3); text-transform: uppercase;
    margin-bottom: 1.2rem;
  }

  /* ══════════════════════════════════════════════
     HERO
  ══════════════════════════════════════════════ */
  #hero {
    position: relative;
    min-height: 100svh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    overflow: hidden; padding: 3rem 1.5rem 6rem;
  }

  /* Background painting */
  .hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-image: url('../assets/main.webp');
    background-size: cover; background-position: center 30%;
    filter: brightness(0.2) saturate(0.6);
    transform: scale(1.06);
    transition: transform 24s ease;
  }
  #hero:hover .hero-bg { transform: scale(1.0); }

  /* Dark vignette */
  .hero-vignette {
    position: absolute; inset: 0; z-index: 1;
    background:
      radial-gradient(ellipse at 50% 45%, rgba(10,7,5,0.1) 0%, rgba(10,7,5,0.75) 65%, rgba(10,7,5,0.97) 100%),
      linear-gradient(180deg, rgba(10,7,5,0.55) 0%, transparent 25%, transparent 72%, rgba(10,7,5,0.92) 100%);
  }

  /* Aged parchment / canvas texture layer */
  .hero-texture {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.04' numOctaves='5' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23t)' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 400px 400px; mix-blend-mode: overlay; opacity: 0.4;
  }

  /* Illuminated manuscript border */
  .hero-border {
    position: absolute; inset: 1.2rem; z-index: 3; pointer-events: none;
    border: 1px solid rgba(201,168,76,0.12);
    outline: 1px solid rgba(201,168,76,0.06); outline-offset: -8px;
  }
  /* border corner flourishes */
  .hero-border::before, .hero-border::after {
    content: '✦';
    position: absolute; color: rgba(201,168,76,0.35); font-size: 0.8rem;
  }
  .hero-border::before { top: -0.55rem; left: 50%; transform: translateX(-50%); }
  .hero-border::after  { bottom: -0.55rem; left: 50%; transform: translateX(-50%); }

  .hero-content {
    position: relative; z-index: 4;
    max-width: 820px; width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 0;
    padding: 1.8rem 2rem;
  }

  .hero-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem; letter-spacing: 0.65em;
    color: var(--gold3); text-transform: uppercase;
    margin-bottom: 1.6rem;
    opacity: 0; animation: riseIn 1.2s ease 0.4s forwards;
  }

  .hero-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(3.5rem, 14vw, 10.5rem);
    font-weight: 900; letter-spacing: 0.15em; line-height: 1;
    color: var(--parchment);
    text-shadow: 0 0 70px rgba(201,168,76,0.22), 0 0 180px rgba(139,0,0,0.14), 0 3px 8px rgba(0,0,0,0.9);
    margin-bottom: 2.4rem;
    opacity: 0; animation: riseIn 1.6s ease 0.6s forwards;
  }

  .hero-divider-wrap {
    width: 100%; margin-bottom: 2.4rem;
    opacity: 0; animation: riseIn 1s ease 1s forwards;
  }

  .hero-quote {
    font-family: 'EB Garamond', serif; font-style: italic;
    font-size: clamp(0.95rem, 2.2vw, 1.3rem);
    color: var(--parchment2); line-height: 1.95;
    max-width: 520px; margin-bottom: 3rem;
    opacity: 0; animation: riseIn 1.2s ease 1.3s forwards;
  }

  /* Redesigned Instagram link — copperplate/engraved style */
  .ig-link {
    display: inline-flex; flex-direction: column;
    align-items: center; gap: 0.5rem;
    text-decoration: none;
    opacity: 0; animation: riseIn 1s ease 1.7s forwards;
  }
  .ig-link-inner {
    display: flex; align-items: center; gap: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem; letter-spacing: 0.55em;
    color: var(--gold-dim); text-transform: uppercase;
    transition: color 0.35s ease, letter-spacing 0.35s ease;
  }
  .ig-link-ornament { color: var(--gold3); font-size: 0.8rem; transition: color 0.35s ease; }
  .ig-link-rule {
    width: 100%; max-width: 220px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold3), transparent);
    transition: max-width 0.4s ease, opacity 0.35s ease; opacity: 0.5;
  }
  .ig-link:hover .ig-link-inner  { color: var(--gold); letter-spacing: 0.65em; }
  .ig-link:hover .ig-link-ornament { color: var(--gold); }
  .ig-link:hover .ig-link-rule { max-width: 280px; opacity: 0.8; }

  /* Scroll cue */
  .scroll-cue {
    position: absolute; bottom: 2rem;
    left: 0; right: 0;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    z-index: 4;
    opacity: 0; animation: riseIn 1s ease 2.2s forwards;
  }
  .scroll-cue-label {
    font-family: 'Cinzel', serif; font-size: 0.55rem;
    letter-spacing: 0.5em; color: var(--gold-dim); text-transform: uppercase;
  }
  .scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(180deg, var(--gold3), transparent);
    animation: linePulse 2.2s ease infinite;
  }

  /* ══════════════════════════════════════════════
     BIO SECTION — De Artifice
  ══════════════════════════════════════════════ */
  #bio {
    padding: 5rem 1.5rem 5rem;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%);
    position: relative;
  }
  #bio::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold3) 30%, var(--gold) 50%, var(--gold3) 70%, transparent 100%);
  }

  .bio-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 3rem;
  }

  .bio-header { text-align: center; }
  .bio-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700; letter-spacing: 0.12em;
    color: var(--parchment);
    text-shadow: 0 0 40px rgba(201,168,76,0.15);
    margin-bottom: 1.5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Portrait + text layout */
  .bio-body {
    display: flex; flex-direction: column; gap: 2.5rem;
    width: 100%;
  }

  /* Portrait frame — layout only; .frame class handles the visual styling */
  .portrait-wrap {
    flex-shrink: 0;
    width: 100%; max-width: 340px;
    margin: 0 auto;
  }
  .portrait-wrap::before { display: none; }
  .portrait-img {
    width: 100%; display: block;
    filter: sepia(0.15) brightness(0.92);
  }
  /* Portrait corner ornaments */
  .portrait-corners {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 3;
  }
  .pcorner {
    position: absolute; width: 28px; height: 28px;
    fill: none; stroke: #c9a84c; stroke-width: 1.5;
  }
  .pcorner.tl { top: 4px; left: 4px; }
  .pcorner.tr { top: 4px; right: 4px; transform: scaleX(-1); }
  .pcorner.bl { bottom: 4px; left: 4px; transform: scaleY(-1); }
  .pcorner.br { bottom: 4px; right: 4px; transform: scale(-1,-1); }

  /* Bio text */
  .bio-text { flex: 1; }

  .bio-paragraphs p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--parchment2); line-height: 1.9;
    margin-bottom: 1.4rem;
  }

  .bio-pullquote {
    margin: 2.2rem 0;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    border-left: 2px solid var(--gold3);
    position: relative;
  }
  .bio-pullquote::before {
    content: '\201C';
    position: absolute; top: -0.4rem; left: 0.6rem;
    font-family: 'EB Garamond', serif; font-size: 4rem;
    color: var(--gold3); line-height: 1; opacity: 0.7;
  }
  .bio-pullquote p {
    font-family: 'EB Garamond', serif; font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--parchment); line-height: 1.8;
  }

  .bio-ig {
    display: flex; flex-direction: column;
    align-items: center; gap: 0.4rem;
    text-decoration: none; margin: 1.5rem auto 0;
    width: fit-content;
  }
  .bio-ig-inner {
    display: flex; align-items: center; gap: 1rem;
    font-family: 'Cinzel', serif; font-size: 0.62rem;
    letter-spacing: 0.5em; color: var(--gold-dim);
    text-transform: uppercase;
    transition: color 0.3s, letter-spacing 0.3s;
  }
  .bio-ig-ornament { color: var(--gold3); transition: color 0.3s; }
  .bio-ig-rule {
    width: 160px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold3), transparent);
    opacity: 0.5; transition: width 0.35s, opacity 0.3s;
  }
  .bio-ig:hover .bio-ig-inner { color: var(--gold); letter-spacing: 0.6em; }
  .bio-ig:hover .bio-ig-ornament { color: var(--gold); }
  .bio-ig:hover .bio-ig-rule { width: 220px; opacity: 0.8; }

  /* ══════════════════════════════════════════════
     GALLERY
  ══════════════════════════════════════════════ */
  #gallery {
    padding: 5rem 1.25rem 6rem;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 40%, var(--bg2) 60%, var(--bg) 100%);
    position: relative;
  }
  #gallery::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold3) 30%, var(--gold) 50%, var(--gold3) 70%, transparent 100%);
  }

  .gallery-header {
    text-align: center; margin-bottom: 4rem;
  }

  .gallery-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700; letter-spacing: 0.12em;
    color: var(--parchment);
    text-shadow: 0 0 50px rgba(201,168,76,0.14);
    margin-bottom: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .gallery-sub {
    font-family: 'EB Garamond', serif; font-style: italic;
    color: var(--parchment-dim); font-size: 1.05rem;
    max-width: 420px; margin: 0 auto 1.8rem;
  }

  /* ── Gallery grid (mobile-first: 1 col) ── */
  .gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem 0;
    max-width: 1340px; margin: 0 auto;
  }

  /* ── Painting card ── */
  .card {
    display: flex; flex-direction: column; gap: 1.4rem;
    opacity: 0; transform: translateY(30px);
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
  }
  .card.visible { opacity: 1; transform: translateY(0); }

  /* ── Scroll-reveal: headings & portrait ── */
  .animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.8s ease-out, transform 1.8s ease-out;
  }
  .animate-in.visible { opacity: 1; transform: translateY(0); }
  .animate-in.anim-portrait { transition-duration: 2s; }

  /* ── Gothic/Victorian double-line frame ── */
  .frame {
    position: relative;
    border: 1px solid #c9a84c;
    outline: 1px solid rgba(201,168,76,0.4);
    outline-offset: 5px;
    padding: 10px;
    background: #080503;
    box-shadow:
      0 6px 28px rgba(0,0,0,0.85),
      0 18px 48px rgba(0,0,0,0.5),
      inset 0 0 12px rgba(0,0,0,0.6);
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.5s ease;
  }
  .frame:hover {
    transform: translateY(-4px);
    box-shadow:
      0 10px 38px rgba(0,0,0,0.9),
      0 24px 60px rgba(0,0,0,0.6),
      0 0 30px rgba(201,168,76,0.1),
      inset 0 0 12px rgba(0,0,0,0.5);
  }

  /* inner rabbet line */
  .frame-bevel {
    position: absolute; inset: 4px;
    border: 1px solid rgba(201,168,76,0.18);
    pointer-events: none; z-index: 5;
  }
  .frame-bevel::before { display: none; }

  /* inner shadow on painting surface */
  .frame-inner {
    position: relative;
    overflow: hidden; line-height: 0;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.55);
    aspect-ratio: 3/4;
  }

  /* SVG corner ornaments */
  .frame-corners { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
  .fc { position: absolute; width: 28px; height: 28px; }
  .fc.tl { top: 2px;  left: 2px; }
  .fc.tr { top: 2px;  right: 2px;  transform: scaleX(-1); }
  .fc.bl { bottom: 2px; left: 2px;  transform: scaleY(-1); }
  .fc.br { bottom: 2px; right: 2px; transform: scale(-1,-1); }

  /* Swiper */
  .frame-swiper { position: absolute; inset: 0; width: 100%; height: 100%; }
  .frame-swiper .swiper-slide img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
  }
  .frame-swiper .swiper-pagination { bottom: 7px; }
  .frame-swiper .swiper-pagination-bullet {
    background: var(--gold3); opacity: 0.5; width: 6px; height: 6px;
  }
  .frame-swiper .swiper-pagination-bullet-active {
    background: var(--gold); opacity: 1; transform: scale(1.3);
  }

  .swipe-hint {
    position: absolute; bottom: 28px; right: 9px; z-index: 10;
    font-family: 'Cinzel', serif; font-size: 0.45rem;
    letter-spacing: 0.3em; color: rgba(201,168,76,0.55);
    text-transform: uppercase; pointer-events: none;
  }

  /* ── Card info ── */
  .card-info { padding: 0 0.4rem; text-align: center; }
  .card-title {
    font-family: 'Cinzel', serif; font-size: 0.82rem;
    font-weight: 600; color: var(--gold);
    letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.2rem;
  }
  .card-date {
    font-family: 'EB Garamond', serif; font-style: italic;
    font-size: 0.8rem; color: var(--gold-dim);
    letter-spacing: 0.1em; margin-bottom: 0.8rem;
  }
  .card-desc {
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 0.97rem; color: var(--parchment2); line-height: 1.85;
  }

  /* ══════════════════════════════════════════════
     CLOSING
  ══════════════════════════════════════════════ */
  #closing {
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    background: var(--bg);
    position: relative;
  }
  #closing::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold3), var(--gold), var(--gold3), transparent);
  }
  .closing-inner { max-width: 540px; margin: 0 auto; }
  .closing-text {
    font-family: 'EB Garamond', serif; font-style: italic;
    color: var(--parchment-dim); font-size: 1.05rem; line-height: 2;
    margin: 2rem 0;
  }
  .closing-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem; color: var(--gold-dim); letter-spacing: 0.35em;
    margin-top: 2rem;
  }

  /* ══════════════════════════════════════════════
     ANIMATIONS
  ══════════════════════════════════════════════ */
  @keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes linePulse {
    0%, 100% { opacity: 0.25; transform: scaleY(1); }
    50%       { opacity: 0.9;  transform: scaleY(0.75); }
  }

  /* ══════════════════════════════════════════════
     RESPONSIVE — tablet 640px
  ══════════════════════════════════════════════ */
  @media (min-width: 640px) {
    body { font-size: 18px; }

    #bio { padding: 6rem 2.5rem; }
    .bio-inner { gap: 3.5rem; }

    #gallery { padding: 7rem 2rem 7rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 5rem 3rem; }

    .portrait-wrap { max-width: 380px; }
  }

  /* ══════════════════════════════════════════════
     RESPONSIVE — desktop 960px
  ══════════════════════════════════════════════ */
  @media (min-width: 960px) {
    #bio { padding: 8rem 3rem; }
    .bio-body {
      flex-direction: row; align-items: flex-start; gap: 4rem;
    }
    .portrait-wrap { max-width: 360px; margin: 0; }

    #gallery { padding: 9rem 2.5rem 8rem; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 6rem 3rem; }
    .gallery-header { margin-bottom: 6rem; }
  }

  /* ══════════════════════════════════════════════
     RESPONSIVE — wide 1280px
  ══════════════════════════════════════════════ */
  @media (min-width: 1280px) {
    .gallery-grid { max-width: 1340px; gap: 7rem 3.5rem; }
    .portrait-wrap { max-width: 400px; }
  }
  @media (max-width: 768px) {
    .subtitle-separator { display: none; }
    .subtitle-part { display: block; text-align: center; }
  }

  /* ── Lightbox ── */
  #lightbox {
    display: none;
    position: fixed; inset: 0; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    background: rgba(0,0,0,0.92);
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
    overflow: hidden; box-sizing: border-box;
  }
  #lightbox.lb-open { display: flex; }
  #lightbox.lb-visible { opacity: 1; }
  #lb-img {
    max-width: 90vw; max-height: 80vh;
    width: auto; height: auto;
    object-fit: contain; display: block;
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
  }
  #lb-close {
    position: fixed; top: 16px; right: 16px;
    background: none; border: none; cursor: pointer;
    color: var(--gold); font-size: 2rem; line-height: 1;
    opacity: 0.8; transition: opacity 0.2s, transform 0.2s;
    z-index: 10001;
  }
  #lb-close:hover { opacity: 1; transform: scale(1.15); }
  #lb-prev, #lb-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); border: 1px solid rgba(201,168,76,0.3);
    color: var(--gold); font-size: 2.5rem; line-height: 1;
    padding: 0.4rem 0.8rem; cursor: pointer;
    opacity: 0.7; transition: opacity 0.2s;
    z-index: 10001;
  }
  #lb-prev { left: 1rem; }
  #lb-next { right: 1rem; }
  #lb-prev:hover, #lb-next:hover { opacity: 1; }

  .lightbox-dots {
    position: fixed;
    bottom: 24px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10001;
  }
  .lightbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.35);
    transition: background 0.3s;
    cursor: pointer;
  }
  .lightbox-dot.active {
    background: #c9a84c;
  }
