/* COLOR PALETTE & GLOBAL TOKENS */
:root {
    --cream:  #fbf3e4;
    --cream-deep: #f5e8c9;
    --cream-warm:  #f0dfb6;
    --gold: #e8c87c;
    --gold-deep: #d4a85a;
    --gold-bright: #f4d57e;
    --gold-glow: #fff3a8;
    --ink: #2e2415;
    --ink-soft: #5a4a35;
    --ink-muted: #8a7a5e;
    --line: #e6d4a8;
    --rose: #d8a899;
}

* {margin: 0; padding: 0; box-sizing: border-box;}

html, body{
    background: var(--cream);
    color: var(--ink);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
}
body.intro-active { overflow: hidden; height: 100vh; }

/* INTRO SCREEN with falling star and signature */

#intro {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, var(--cream) 0%, var(--cream-deep) 55%, var(--cream-warm) 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 1.4s ease-out, visibility 1.4s;
}
#intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* twinkling background stars */
.stars-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.bg-star {
  position: absolute;
  opacity: 0;
  animation: twinkle 3.5s ease-in-out infinite;
  filter:
    drop-shadow(0 0 4px var(--gold-bright))
    drop-shadow(0 0 10px var(--gold-glow));
}
.bg-star path { fill: var(--gold-bright); }
.bg-star.bright path { fill: var(--gold-glow); }
.bg-star.bright {
  filter:
    drop-shadow(0 0 6px var(--gold-glow))
    drop-shadow(0 0 16px var(--gold-bright))
    drop-shadow(0 0 24px var(--gold));
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50%      { opacity: 1;    transform: scale(1.1); }
}
/* =====  SIGNATURE STAGE  ===== */
#signature-stage {
  width: min(900px, 92vw);
  position: relative;
  z-index: 2;
  aspect-ratio: 800 / 320;
}
#signature {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(212, 168, 90, 0.22));
}

/* Pentagram strokes. pathLength=100 normalizes every line. */
#signature .stroke {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw var(--dur, 0.45s) ease-out forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* "ruzhan" cursive text */
#signature .ruzhan-text {
  font-family: 'Allura', cursive;
  font-size: 95px;
  fill: var(--gold-deep);
  opacity: 0;
  animation: text-fade 1.4s ease-out forwards;
  animation-delay: 3.5s;
}
@keyframes text-fade { to { opacity: 1; } }

/* =====  FALLING METEOR  ===== */
.meteor {
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--gold-glow) 30%, var(--gold-bright) 55%, transparent 80%);
  box-shadow:
    0 0 12px var(--gold-glow),
    0 0 24px var(--gold-bright),
    0 0 48px var(--gold),
    0 0 80px var(--gold-deep);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  offset-path: path("M 1100 -150 Q 700 -50, 150 170");
  offset-rotate: auto;
  animation: meteor-fall 1.4s cubic-bezier(0.55, 0.05, 0.65, 1) forwards;
}
@keyframes meteor-fall {
  0%   { offset-distance: 0%;   opacity: 0; transform: scale(0.3); }
  10%  { opacity: 1; transform: scale(1.4); }
  85%  { opacity: 1; transform: scale(1.1); }
  100% { offset-distance: 100%; opacity: 0; transform: scale(0.3); }
}

/* Burst sparkles where the meteor lands */
.burst {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-glow), 0 0 16px var(--gold);
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  animation: burst-out 1s ease-out forwards;
  animation-delay: 1.35s;
}
@keyframes burst-out {
  0%   { opacity: 0; transform: translate(0,0) scale(0.5); }
  20%  { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 2), calc(var(--dy) * 2)) scale(0.2); }
}


/* tagline + buttons */
.intro-tagline {
  margin-top: 2.2rem;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--ink-soft);
  opacity: 0;
  letter-spacing: 0.02em;
  text-align: center;
  z-index: 2;
}
.intro-tagline { animation: soft-fade 1.4s ease-out forwards; animation-delay: 5.6s;  animation: soft-fade 1.4s ease-out forwards;   /* ADD THIS */
  animation-delay: 5.6s;    }

@keyframes soft-fade { from { opacity: 0; } to { opacity: 1; } }

#enter-btn {
  margin-top: 1.8rem;
  background: transparent;
  border: 1px solid var(--gold-deep);
  color: var(--ink);
  padding: 0.85rem 2.4rem;
  font-family: 'Fraunces', serif;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  cursor: pointer;
  opacity: 0;
  border-radius: 999px;
  transition: background 0.4s, color 0.4s, transform 0.3s;
  z-index: 2;
}
#enter-btn { animation: soft-fade 1.2s ease-out forwards; animation-delay: 6.0s;  animation: soft-fade 1.4s ease-out forwards;   /* ADD THIS */
  animation-delay: 5.6s;    }
#enter-btn:hover { background: var(--gold-deep); color: var(--cream); transform: translateY(-2px); }

.skip {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 4;
}
.skip:hover { opacity: 1; }


/*MAIN SITE*/

#main { opacity: 0; transition: opacity 1s ease-in 0.4s; }
#main.show { opacity: 1; }

/* nav */
nav.top {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  background: rgba(251, 243, 228, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
nav.top .mark {
  font-family: 'Allura', cursive;
  font-size: 2rem;
  color: var(--gold-deep);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1;
}
nav.top ul { display: flex; gap: 2.4rem; list-style: none; }
nav.top a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  transition: color 0.3s;
  position: relative;
}
nav.top a:hover { color: var(--gold-deep); }
nav.top a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--gold-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
nav.top a:hover::after { transform: scaleX(1); }

/* hero */
.hero {
  padding: 7rem 3rem 4rem;
  text-align: center;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}
.hero .eyebrow {
  font-family: 'Fraunces', serif;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}
.hero .eyebrow::before, .hero .eyebrow::after {
  content: '';
  height: 1px;
  width: 60px;
  background: var(--gold-deep);
  opacity: 0.5;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 1.8rem;
}
.hero .star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0 1.2rem;
  gap: 0.8rem;
}
.hero .star-divider .line { height: 1px; width: 40px; background: var(--ink-muted); opacity: 0.4; }
.hero .star-divider svg { width: 18px; height: 18px; fill: var(--gold-deep); }
.hero .sub {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.hero .meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* gallery */
.gallery-section { padding: 4rem 3rem 6rem; max-width: 1400px; margin: 0 auto; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 2rem;
  font-style: italic;
}
.section-head .count {
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filters { display: flex; gap: 0.6rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 0.55rem 1.4rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.35s ease;
}
.filter:hover { border-color: var(--gold-deep); color: var(--ink); }
.filter.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem 2rem;
}
.work { cursor: pointer; transition: transform 0.4s ease; }
.work:hover { transform: translateY(-4px); }
.work .frame {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--cream-deep), var(--cream-warm));
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.5s ease;
}
.work .frame img {width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work:hover .frame { box-shadow: 0 12px 30px rgba(58, 46, 31, 0.12); }
.work .frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(58, 46, 31, 0.08) 100%);
  pointer-events: none;
}
.work .placeholder {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 1.5rem;
  z-index: 1;
}
.work .meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
  gap: 0.5rem;
}
.work .title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
}
.work .year {
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.work .medium {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
.work .badge {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 1px;
}
.work .badge.gold { color: #b8851f; border-color: #b8851f; font-weight: 600; }

/* about / cv / contact sections */
.section {
  padding: 5rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.section h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.section p { margin-bottom: 1.2rem; font-size: 1.05rem; }
.section .lead {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* cv */
.cv-block { margin-bottom: 2.5rem; }
.cv-block h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.cv-block ul { list-style: none; padding: 0; }
.cv-block li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  align-items: baseline;
}
.cv-block li:last-child { border-bottom: none; }
.cv-block li .desc { color: var(--ink); flex: 1; }
.cv-block li .yr {
  color: var(--ink-muted);
  white-space: nowrap;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}
.cv-block li .highlight {
  color: var(--gold-deep);
  font-style: italic;
  font-weight: 500;
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-item {
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: 4px;
  transition: border-color 0.3s, transform 0.3s;
}
.contact-item:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.contact-item .label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.contact-item a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  word-break: break-word;
}
.contact-item a:hover { color: var(--gold-deep); }

/* footer */
footer {
  padding: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  border-top: 1px solid var(--line);
}
footer .star {
  display: inline-block;
  margin: 0 0.6rem;
  color: var(--gold-deep);
}


/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 700px) {
  nav.top { padding: 1rem 1.5rem; }
  nav.top ul { gap: 1.2rem; font-size: 0.85rem; }
  nav.top .mark { font-size: 1.6rem; }
  .hero, .gallery-section, .section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
  .cv-block li { flex-direction: column; gap: 0.2rem; }
}

