/* 
   Raven House — Aesthetics & Layout Stylesheet
   Sanctuary for the Melancholy Soul
*/

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..700;1,400..700&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Special+Elite&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap');

:root {
    /* Color Palette */
    --color-bg-base:    #08090c;
    --color-bg-deep:    #040508;
    --color-bg-card:    rgba(14, 16, 24, 0.72);
    --color-bg-glass:   rgba(10, 12, 18, 0.50);

    --color-border-subtle: rgba(255, 255, 255, 0.055);
    --color-border-glow:   rgba(157, 141, 241, 0.28);

    /* Accents */
    --color-accent-violet:  #a594f9;
    --color-accent-indigo:  #6366f1;
    --color-accent-mist:    #c8d9f0;
    --color-accent-charcoal:#1e293b;
    --color-accent-crimson: #fda4af;
    --color-accent-gold:    #e8c87a;

    /* Typography */
    --text-primary:   #eaeef5;
    --text-secondary: #8fa3be;
    --text-muted:     #586a7f;

    /* Transitions */
    --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast:   all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--color-bg-base);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    line-height: 1.65;
    background-image:
        radial-gradient(ellipse 80% 60% at 10% 15%, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 85%, rgba(157, 141, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(6, 4, 30, 0.9) 0%, transparent 100%);
    background-attachment: fixed;
}

/* Noise texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.022;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 5px; }
::-webkit-scrollbar-track        { background: var(--color-bg-deep); }
::-webkit-scrollbar-thumb        { background: rgba(157, 141, 241, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--color-accent-violet); }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Glass ─────────────────────────────────────────────────────────────── */
.glass {
    background: var(--color-bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border-subtle);
    border-radius: 18px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.glass-nav {
    background: rgba(8, 9, 12, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border-subtle);
}

/* ─── Navigation ────────────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.logo img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(165, 148, 249, 0.25);
    transition: var(--transition-smooth);
    filter: brightness(0.9);
}

.logo:hover img {
    transform: rotate(-12deg) scale(1.12);
    box-shadow: 0 0 16px rgba(165, 148, 249, 0.45);
    border-color: var(--color-accent-violet);
    filter: brightness(1);
}

.nav-links {
    display: flex;
    gap: 1.5rem; /* Reduced from 2.25rem to prevent wrapping and squishing */
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap; /* Prevent double-line menu links */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent-violet), transparent);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover,
.nav-links a.active  { color: var(--text-primary); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.menu-toggle {
    display: none;
}

.nav-mobile-ornament {
    display: none;
    color: var(--color-accent-violet);
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
}

/* ─── Canvas ─────────────────────────────────────────────────────────────── */
#canvas-mist {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 72px;
    overflow: hidden;
}

/* Photo layer */
.hero-bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 120%;
    z-index: 1;
    background-image:
        linear-gradient(to bottom,
            rgba(8,9,12,0.25) 0%,
            rgba(8,9,12,0.15) 40%,
            rgba(8,9,12,0.85) 85%,
            var(--color-bg-base) 100%),
        url('assets/hero_bg.png');
    background-size: cover;
    background-position: center top;
    will-change: transform;
    pointer-events: none;
}

/* Cinematic vignette */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 120% 100% at 50% 50%,
        transparent 35%,
        rgba(4, 5, 10, 0.75) 100%);
}

/* Floating atmospheric orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    filter: blur(80px);
    animation: orbFloat 12s ease-in-out infinite alternate;
}
.hero-orb-1 {
    width: 450px; height: 450px;
    top: -100px; left: -120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
    animation-duration: 16s;
}
.hero-orb-2 {
    width: 360px; height: 360px;
    bottom: 60px; right: -80px;
    background: radial-gradient(circle, rgba(157, 141, 241, 0.12) 0%, transparent 70%);
    animation-duration: 20s;
    animation-delay: -6s;
}
.hero-orb-3 {
    width: 280px; height: 280px;
    top: 40%; left: 55%;
    background: radial-gradient(circle, rgba(232, 200, 122, 0.05) 0%, transparent 70%);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes orbFloat {
    from { transform: translateY(0px) scale(1); }
    to   { transform: translateY(-40px) scale(1.08); }
}

/* Hero content */
.hero-content {
    max-width: 820px;
    padding: 2.5rem;
    position: relative;
    z-index: 3;
    animation: heroFadeUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Eyebrow label above title */
.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-accent-violet);
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

/* The big title */
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #d8d2e8;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

/* Ornamental rule under title */
.hero-title-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.2rem auto 1.8rem;
    opacity: 0.55;
}
.hero-title-rule::before,
.hero-title-rule::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 148, 249, 0.6), transparent);
}
.hero-title-rule-glyph {
    width: 8px; height: 8px;
    border: 1px solid rgba(165, 148, 249, 0.6);
    transform: rotate(45deg);
    display: inline-block;
}

/* Italic tagline */
.hero p {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-style: italic;
    font-weight: 300;
    color: rgba(200, 217, 240, 0.75);
    margin-bottom: 3rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* CTA button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(165, 148, 249, 0.1);
    color: #e0d9ff;
    border: 1px solid rgba(165, 148, 249, 0.35);
    padding: 0.9rem 2.6rem;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 60px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 0 0 rgba(165, 148, 249, 0);
}

.btn-primary:hover {
    background: rgba(165, 148, 249, 0.22);
    border-color: rgba(165, 148, 249, 0.7);
    box-shadow:
        0 0 30px rgba(165, 148, 249, 0.25),
        0 0 60px rgba(165, 148, 249, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transform: translateY(-3px);
    color: #fff;
}

/* ─── Section Base ───────────────────────────────────────────────────────── */
section {
    padding: 7rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Section separator gradient */
section + section::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(165, 148, 249, 0.2), transparent);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f0ecff 30%, #a594f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

/* Ornate feather-style underline */
.section-header h2::after {
    content: '— ✦ —';
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: rgba(165, 148, 249, 0.4);
    -webkit-text-fill-color: rgba(165, 148, 249, 0.4);
    margin-top: 0.6rem;
    font-weight: 300;
}

.section-header p {
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Scroll reveal utility */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Sanctuary Gallery ──────────────────────────────────────────────────── */
.sanctuary-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.btn-filter {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 0.5rem 1.6rem;
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-filter:hover,
.btn-filter.active {
    border-color: rgba(165, 148, 249, 0.55);
    color: var(--text-primary);
    background: rgba(165, 148, 249, 0.08);
    box-shadow: 0 0 12px rgba(165, 148, 249, 0.12);
}

/* Masonry Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    align-items: start;
}

.gallery-card {
    padding: 2rem 2rem 1.75rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Left accent bar */
.gallery-card::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 0;
    width: 2px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, var(--color-accent-violet), transparent);
    opacity: 0;
    transition: opacity 0.45s ease;
}

/* Top shimmer line */
.gallery-card::after {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 148, 249, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
    border-color: rgba(165, 148, 249, 0.25);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(165, 148, 249, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.gallery-card:hover::before,
.gallery-card:hover::after { opacity: 1; }

.card-category {
    font-size: 0.7rem;
    color: var(--color-accent-violet);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.card-content {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(143, 163, 190, 0.9);
    margin-bottom: 2rem;
    white-space: pre-line;
    max-height: 185px;
    overflow: hidden;
    position: relative;
}

.card-content.fade-out::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 55px;
    background: linear-gradient(to top, rgba(14, 16, 24, 0.92), transparent);
    pointer-events: none;
}

.card-image {
    width: 100%; height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    filter: brightness(0.88) saturate(0.75);
    transition: filter 0.4s ease;
}

.gallery-card:hover .card-image {
    filter: brightness(0.96) saturate(0.9);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: auto;
}

.card-author {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
    font-family: 'EB Garamond', serif;
}

.card-actions { display: flex; gap: 0.75rem; }

.btn-card-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}
.btn-card-action:hover { color: var(--color-accent-violet); }
.btn-card-action.liked { color: #f43f5e; }
.btn-card-action.liked svg { fill: #f43f5e; }

/* Card Themes */
.theme-raven {
    background: rgba(11, 13, 20, 0.88);
    border-color: rgba(165, 148, 249, 0.12);
}

.theme-mist {
    background: rgba(20, 33, 55, 0.65);
    border-color: rgba(200, 217, 240, 0.12);
    color: #f0f5fd;
}
.theme-mist .card-category { color: #93c5fd; }
.theme-mist .card-content  { color: rgba(200, 217, 240, 0.8); }

.theme-twilight {
    background: rgba(18, 12, 26, 0.8);
    border-color: rgba(217, 70, 239, 0.13);
}
.theme-twilight .card-category { color: #d946ef; }
.theme-twilight .card-title    { color: #fdf4ff; }

/* Font Themes */
.font-serif     { font-family: 'EB Garamond', serif; }
.font-typewriter{ font-family: 'Special Elite', 'Courier New', Courier, monospace; }
.font-gothic    { font-family: 'Playfair Display', serif; letter-spacing: 0.02em; }

/* ─── Writing Desk ──────────────────────────────────────────────────────── */
.writer-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

.editor-container { padding: 3rem; }

.editor-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    resize: none;
}

.editor-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(165, 148, 249, 0.12);
    padding-bottom: 0.5rem;
    transition: border-color 0.3s;
}
.editor-title:focus { border-bottom-color: rgba(165, 148, 249, 0.4); }

.editor-body {
    font-size: 1.25rem;
    min-height: 350px;
    line-height: 1.85;
    font-family: 'Cormorant Garamond', serif;
}

.editor-title::placeholder,
.editor-body::placeholder { color: rgba(88, 106, 127, 0.6); }

.sidebar-controls { display: flex; flex-direction: column; gap: 2rem; }

.control-panel { padding: 2rem; }

.control-panel h3 {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(143, 163, 190, 0.6);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.5rem;
}

.setting-group       { margin-bottom: 1.5rem; }
.setting-group:last-child { margin-bottom: 0; }

.setting-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.option-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.btn-option {
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 7px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-option:hover,
.btn-option.active {
    border-color: rgba(165, 148, 249, 0.5);
    color: var(--text-primary);
    background: rgba(165, 148, 249, 0.06);
}

.input-flat {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}
.input-flat:focus {
    border-color: rgba(165, 148, 249, 0.4);
    box-shadow: 0 0 10px rgba(165, 148, 249, 0.1);
}

.btn-publish {
    width: 100%;
    padding: 1rem;
    border-radius: 30px;
    background: linear-gradient(135deg, #a594f9, #7c6de0);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.07em;
    box-shadow: 0 4px 20px rgba(165, 148, 249, 0.25);
    transition: var(--transition-smooth);
}
.btn-publish:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(165, 148, 249, 0.45);
    filter: brightness(1.08);
}

/* ─── Resonance Chamber ─────────────────────────────────────────────────── */
.ambient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.ambient-card {
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
}

.ambient-icon-wrapper {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}
.ambient-icon-wrapper svg {
    width: 30px; height: 30px;
    fill: var(--text-secondary);
    transition: var(--transition-smooth);
}

.ambient-card.active .ambient-icon-wrapper {
    background: rgba(165, 148, 249, 0.12);
    border-color: var(--color-accent-violet);
    box-shadow: 0 0 24px rgba(165, 148, 249, 0.28);
}
.ambient-card.active .ambient-icon-wrapper svg {
    fill: var(--color-accent-violet);
    transform: scale(1.12);
}
.ambient-card.active .ambient-icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(165, 148, 249, 0.4);
    animation: ripple 2.2s infinite ease-out;
}

.ambient-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-family: 'Playfair Display', serif;
}
.ambient-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    height: 38px;
    font-style: italic;
}

.slider-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.4;
    transition: var(--transition-fast);
}
.ambient-card.active .slider-container { opacity: 1; }

.volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: var(--transition-fast);
}
.ambient-card.active .volume-slider::-webkit-slider-thumb { background: var(--color-accent-violet); }

/* ─── Whispering Well ───────────────────────────────────────────────────── */
.well-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 4rem 3rem;
    text-align: center;
}

.breathing-guide-box {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    margin-bottom: 3rem;
}

.breath-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(165, 148, 249, 0.12) 0%, transparent 70%);
    border: 1px dashed rgba(165, 148, 249, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 30px rgba(165, 148, 249, 0.04);
}
.breath-circle-inner {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(165, 148, 249, 0.18);
    border: 1px solid var(--color-accent-violet);
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(165, 148, 249, 0.18);
}
.breath-text {
    position: absolute;
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    pointer-events: none;
    letter-spacing: 0.05em;
}

.breath-circle.inhale {
    transform: scale(1.65);
    box-shadow: 0 0 55px rgba(165, 148, 249, 0.22);
    border-color: rgba(165, 148, 249, 0.65);
}
.breath-circle.inhale .breath-circle-inner {
    background: rgba(165, 148, 249, 0.32);
    box-shadow: 0 0 30px rgba(165, 148, 249, 0.38);
}
.breath-circle.exhale {
    transform: scale(1.0);
    box-shadow: 0 0 30px rgba(165, 148, 249, 0.04);
    border-color: rgba(165, 148, 249, 0.28);
}
.breath-circle.exhale .breath-circle-inner {
    background: rgba(165, 148, 249, 0.12);
    box-shadow: 0 0 12px rgba(165, 148, 249, 0.08);
}

.well-quote {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.55rem;
    line-height: 1.75;
    min-height: 120px;
    font-style: italic;
    color: rgba(143, 163, 190, 0.85);
    transition: opacity 0.8s ease-in-out;
    font-weight: 300;
}

.btn-well { margin-top: 1rem; }

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(4, 5, 8, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.active { display: flex; opacity: 1; }

.modal-content {
    width: 90%;
    max-width: 660px;
    padding: 3.5rem;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close-modal {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-close-modal:hover { color: var(--text-primary); transform: rotate(90deg); }

.modal-category {
    font-size: 0.72rem;
    color: var(--color-accent-violet);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
}
.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    line-height: 1.25;
    background: linear-gradient(135deg, #f0ecff, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-body {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.3rem;
    line-height: 1.85;
    color: rgba(200, 217, 240, 0.88);
    margin-bottom: 3rem;
    white-space: pre-line;
    font-style: italic;
}
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* gradientShimmer removed — keeping the title still and quiet */

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ripple {
    0%   { transform: scale(1); opacity: 0.75; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* ─── Yearner's Corner ─────────────────────────────────────────────────── */
.yearners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    align-items: start;
}

.yearners-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    border-color: rgba(165, 148, 249, 0.08);
}

.yearners-card:hover {
    transform: translateY(-8px);
    border-color: rgba(165, 148, 249, 0.25);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(165, 148, 249, 0.05);
}

.yearners-badge {
    align-self: flex-start;
    font-size: 0.68rem;
    color: var(--color-accent-violet);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(165, 148, 249, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(165, 148, 249, 0.04);
}

.yearners-lyric {
    font-size: 1.45rem;
    line-height: 1.8;
    color: #e2d9ff;
    text-align: right;
    margin-bottom: 1.25rem;
    font-family: 'Noto Nastaliq Urdu', 'Noto Serif', serif;
    font-style: normal;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.yearners-transliteration {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    border-left: 2px solid rgba(165, 148, 249, 0.25);
    padding-left: 0.75rem;
}

.yearners-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-family: 'EB Garamond', serif;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.yearners-poet::before {
    content: 'By ';
    opacity: 0.65;
}
.yearners-singer::before {
    content: 'Voice: ';
    opacity: 0.65;
}

.yearners-expand-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
}
.yearners-expand-btn:hover {
    color: var(--color-accent-violet);
}

.chevron-icon {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.yearners-card.active .chevron-icon {
    transform: rotate(180deg);
}

.yearners-depth-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 0;
}

.yearners-card.active .yearners-depth-content {
    opacity: 1;
    margin-top: 1.25rem;
}

.yearners-translation {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(200, 217, 240, 0.9);
    margin-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
}

.yearners-exposition {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ─── Navigation Profile Badge ─── */
.nav-profile {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.btn-nav-auth {
    background: transparent;
    border: 1px solid rgba(165, 148, 249, 0.25);
    color: var(--text-secondary);
    padding: 0.45rem 1.25rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-nav-auth:hover {
    border-color: var(--color-accent-violet);
    color: var(--text-primary);
    background: rgba(165, 148, 249, 0.06);
}

.profile-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1rem 0.35rem 0.5rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.015);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.profile-badge:hover {
    border-color: rgba(165, 148, 249, 0.3);
    background: rgba(165, 148, 249, 0.04);
}

.profile-avatar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(165, 148, 249, 0.12);
    border: 1px solid rgba(165, 148, 249, 0.25);
    color: var(--color-accent-violet);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    transition: var(--transition-fast);
}

.profile-badge:hover .profile-avatar-icon {
    background: rgba(165, 148, 249, 0.2);
    border-color: var(--color-accent-violet);
    color: #fff;
    transform: scale(1.05);
}

.profile-avatar-icon svg {
    width: 100%;
    height: 100%;
}

.profile-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-badge:hover .profile-name {
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}


/* ─── Authentication Modals ─── */
.auth-modal-content {
    max-width: 480px;
    padding: 3rem;
}

.auth-modal-title {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-modal-subtitle {
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.auth-form-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-form-pane.active {
    display: block;
    opacity: 1;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-error-msg {
    color: var(--color-accent-crimson);
    font-size: 0.82rem;
    min-height: 1.25rem;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.btn-auth-submit {
    margin-top: 0.5rem;
}

.auth-toggle-link {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.auth-toggle-link a {
    color: var(--color-accent-violet);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-toggle-link a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(165, 148, 249, 0.3);
}

/* Avatar Selection Grid */
.avatar-selection-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.avatar-option {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.avatar-option:hover {
    border-color: rgba(165, 148, 249, 0.35);
    background: rgba(165, 148, 249, 0.04);
}

.avatar-option.active {
    border-color: var(--color-accent-violet);
    background: rgba(165, 148, 249, 0.12);
    box-shadow: 
        0 0 14px rgba(165, 148, 249, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.avatar-svg-wrapper {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.avatar-option:hover .avatar-svg-wrapper {
    color: var(--text-primary);
}

.avatar-option.active .avatar-svg-wrapper {
    color: var(--color-accent-violet);
}

.avatar-svg {
    width: 100%;
    height: 100%;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1150px) {
    .nav-links {
        gap: 1rem;
    }
    .logo span {
        font-size: 1.25rem;
    }
    .nav-profile {
        margin-right: 0.5rem;
    }
}

@media (max-width: 968px) {
    .writer-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 17px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1100;
        padding: 0;
    }
    
    .hamburger-line {
        width: 100%;
        height: 1.5px;
        background-color: var(--text-secondary);
        transition: var(--transition-smooth);
    }
    
    /* Active hamburger animation */
    .menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
        background-color: var(--text-primary);
    }
    
    .menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--text-primary);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        inset: 0;
        background: rgba(6, 7, 10, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        z-index: 1050;
        gap: 2.75rem;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        opacity: 0;
        pointer-events: none;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-links a {
        font-size: 1.35rem;
        font-family: 'Playfair Display', serif;
        letter-spacing: 0.08em;
        text-transform: none;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-mobile-ornament {
        display: block;
        margin-top: 1.5rem;
    }

    section    { padding: 4.5rem 0; }
    .editor-container { padding: 1.5rem; }
    .modal-content    { padding: 2rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-card {
        padding: 1.75rem 1.25rem 1.25rem;
        min-height: 250px;
    }
    
    .ambient-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .ambient-card {
        padding: 2rem 1.25rem;
    }
    
    .well-container {
        padding: 2.5rem 1.25rem;
    }
    
    .breath-circle {
        width: 100px;
        height: 100px;
    }
    
    .breath-circle-inner {
        width: 66px;
        height: 66px;
    }
    
    .breath-circle.inhale {
        transform: scale(1.4);
    }
    
    .well-quote {
        font-size: 1.25rem;
        min-height: 140px;
        line-height: 1.65;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero p {
        margin-bottom: 2rem;
    }
    
    .btn-primary {
        padding: 0.8rem 2.2rem;
        font-size: 0.82rem;
        letter-spacing: 0.1em;
    }
    
    .option-select-grid {
        gap: 0.35rem;
    }
    
    .btn-option {
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 28px;
        height: 28px;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .modal-content {
        padding: 2.25rem 1.5rem 2rem;
        width: 92%;
    }
    
    .modal-title {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
    
    .modal-body {
        font-size: 1.15rem;
        margin-bottom: 2rem;
        line-height: 1.75;
    }

    /* Yearner's Corner Mobile */
    .yearners-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .yearners-card {
        padding: 1.75rem 1.25rem 1.25rem;
    }
    
    .yearners-lyric {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    /* Profile Nav and Auth Modal Mobile */
    .nav-profile {
        margin-left: auto;
        margin-right: 0.75rem;
    }
    
    .profile-name {
        display: none;
    }
    
    .profile-badge {
        padding: 0.35rem;
    }
    
    .auth-modal-content {
        padding: 2.25rem 1.25rem 2rem;
        width: 94%;
    }
    
    .avatar-selection-grid {
        gap: 0.4rem;
    }
    
    .avatar-svg-wrapper {
        width: 26px;
        height: 26px;
    }
    
    .btn-nav-auth {
        padding: 0.35rem 0.85rem;
        font-size: 0.72rem;
    }
}
