/* completengine.net - Victorian-Ornate Design */
/* Palette: #0f0f0f, #2a2a2a, #4d4d4d, #8a8a8a, #b8b8b8, #e8e0d0, #f5f0e8, #b8a472, #8a7a50 */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #0f0f0f;
    color: #3a3a3a;
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===================== CANDLELIGHT OVERLAY ===================== */

.candlelight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    background: radial-gradient(ellipse at 70% 30%, rgba(184, 164, 114, 0.06) 0%, transparent 60%);
    animation: candleFlicker1 3s ease-in-out infinite, candleFlicker2 5s ease-in-out infinite, candleFlicker3 7s ease-in-out infinite;
}

@keyframes candleFlicker1 {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes candleFlicker2 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes candleFlicker3 {
    0%, 100% { opacity: 0.8; }
    33% { opacity: 1; }
    66% { opacity: 0.7; }
}

/* ===================== BOOK SPINE ===================== */

.book-spine {
    position: fixed;
    left: 48px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #b8a472;
    opacity: 0.3;
    z-index: 100;
}

/* ===================== VERTICAL NAVIGATION ===================== */

.vertical-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px 10px;
    width: 48px;
}

.nav-spine {
    display: none;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(184, 164, 114, 0.1);
}

.nav-icon:hover {
    color: #b8a472;
    box-shadow: 0 0 16px rgba(184, 164, 114, 0.3);
}

.nav-label {
    position: absolute;
    left: 44px;
    white-space: nowrap;
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: #b8a472;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    transform: translateX(-8px);
    pointer-events: none;
}

.nav-icon:hover .nav-label {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

/* ===================== MAIN CONTENT ===================== */

.main-content {
    margin-left: 56px;
    position: relative;
    z-index: 10;
}

/* ===================== SECTIONS ===================== */

.section {
    position: relative;
    min-height: 90vh;
    overflow: hidden;
}

.section-dark {
    background-color: #0f0f0f;
    color: #c8c0b4;
}

.section-light {
    background-color: #e8e0d0;
    color: #3a3a3a;
}

.section-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    padding: 80px 60px;
    position: relative;
    z-index: 5;
}

.hero-content {
    padding-top: 20vh;
    padding-bottom: 10vh;
}

.content-column {
    max-width: 720px;
}

.margin-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    gap: 40px;
}

/* ===================== LEATHER TEXTURE ===================== */

.leather-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.leather-fine {
    background: repeating-conic-gradient(
        rgba(184, 164, 114, 0.02) 0deg,
        transparent 1deg,
        transparent 3deg,
        rgba(184, 164, 114, 0.01) 4deg
    );
    opacity: 0.5;
}

.leather-coarse {
    background: repeating-conic-gradient(
        rgba(184, 164, 114, 0.03) 0deg,
        transparent 2deg,
        transparent 5deg,
        rgba(184, 164, 114, 0.02) 6deg
    );
    opacity: 0.6;
}

/* ===================== CANDLE GLOW ===================== */

.candle-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at 70% 30%, rgba(184, 164, 114, 0.08) 0%, transparent 60%);
    animation: candleGlow 5s ease-in-out infinite alternate;
}

.candle-glow-hero {
    background: radial-gradient(ellipse at 75% 25%, rgba(184, 164, 114, 0.10) 0%, transparent 55%);
}

.candle-glow-contact {
    background: radial-gradient(ellipse at 60% 40%, rgba(184, 164, 114, 0.07) 0%, transparent 60%);
}

@keyframes candleGlow {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* ===================== HERO SECTION ===================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 6rem);
    color: #e8e0d0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(184, 164, 114, 0.15);
    animation: heroTitleShadow 5s ease-in-out infinite alternate;
}

@keyframes heroTitleShadow {
    0% { text-shadow: 0 0 40px rgba(184, 164, 114, 0.10); }
    100% { text-shadow: 0 0 60px rgba(184, 164, 114, 0.20); }
}

.hero-tagline {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    color: #b8b8b8;
    letter-spacing: 0.05em;
    margin-bottom: 40px;
    opacity: 0;
}

.hero-tagline.revealed {
    opacity: 1;
}

.ornamental-divider {
    max-width: 400px;
    margin-top: 20px;
}

.hero-divider svg {
    width: 100%;
    height: auto;
}

.divider-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.divider-path.animated {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.divider-path-ornament {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.divider-path-ornament.animated {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s;
}

/* ===================== HEADINGS ===================== */

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 40px;
}

.section-dark .section-heading {
    color: #e8e0d0;
    text-shadow: 0 0 30px rgba(184, 164, 114, 0.1);
}

.section-light .section-heading {
    color: #1a1a1a;
}

/* ===================== PROSE ===================== */

.prose-block {
    margin-bottom: 28px;
    position: relative;
}

.prose-block p {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
}

.section-dark .prose-block p {
    color: #c8c0b4;
}

.section-light .prose-block p {
    color: #3a3a3a;
}

/* ===================== DROP CAPS ===================== */

.drop-cap-container {
    float: left;
    margin-right: 8px;
    margin-top: 4px;
}

.drop-cap {
    font-family: 'IM Fell English', serif;
    font-size: 3.5em;
    line-height: 0.8;
    color: #b8a472;
    display: block;
}

.drop-cap-dark .drop-cap {
    color: #b8a472;
}

/* ===================== PULL QUOTE ===================== */

.pull-quote {
    margin: 48px 0;
    padding: 24px 32px;
    border-left: 2px solid #b8a472;
    position: relative;
}

.pull-quote p {
    font-family: 'IM Fell English', serif;
    font-size: 1.35rem;
    line-height: 1.6;
    color: #b8a472;
    font-style: italic;
}

.section-dark .pull-quote {
    border-left-color: #b8a472;
}

.section-light .pull-quote {
    border-left-color: #b8a472;
}

/* ===================== TECHNICAL SPEC ===================== */

.technical-spec {
    margin: 40px 0;
    padding: 24px;
    border: 1px solid #4d4d4d;
    background-color: rgba(42, 42, 42, 0.5);
}

.spec-label {
    display: block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: #8a8a8a;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.spec-value {
    display: block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    color: #6b6b6b;
}

.section-dark .spec-value {
    color: #b8b8b8;
}

/* ===================== WORK ENTRIES ===================== */

.work-entry {
    margin: 32px 0;
}

.work-frame {
    position: relative;
    padding: 32px;
    background-color: rgba(245, 240, 232, 0.5);
    transition: background-color 0.3s ease;
}

.work-frame:hover {
    background-color: rgba(245, 240, 232, 0.8);
}

.frame-corner {
    position: absolute;
}

.frame-tl {
    top: 0;
    left: 0;
}

.frame-tr {
    top: 0;
    right: 0;
}

.frame-bl {
    bottom: 0;
    left: 0;
}

.frame-br {
    bottom: 0;
    right: 0;
}

.work-content {
    padding: 8px;
}

.work-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.work-description {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #3a3a3a;
    margin-bottom: 16px;
}

.work-spec {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: #8a8a8a;
    letter-spacing: 0.1em;
}

/* ===================== SECTION DIVIDERS ===================== */

.section-divider {
    padding: 20px 60px;
    text-align: center;
    background-color: #0f0f0f;
}

.section-light + .section-divider {
    background-color: #0f0f0f;
}

.divider-svg {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.section-divider:hover .divider-svg path,
.section-divider:hover .divider-svg line,
.section-divider:hover .divider-svg circle {
    stroke: #d4c48a;
    transition: stroke 0.3s ease;
}

.section-divider:hover .divider-svg circle[fill='#b8a472'] {
    fill: #d4c48a;
}

/* ===================== MARGIN ORNAMENTS ===================== */

.margin-ornament {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

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

.annotation-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: #8a8a8a;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ===================== CONTACT SEAL ===================== */

.contact-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 48px;
    gap: 16px;
}

.seal-svg {
    transition: transform 0.3s ease;
}

.contact-seal:hover .seal-svg {
    transform: rotate(5deg);
}

.seal-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #b8a472;
    letter-spacing: 0.05em;
}

/* ===================== FOOTER ===================== */

.site-footer {
    background-color: #0f0f0f;
    padding: 40px 60px;
    text-align: center;
}

.footer-divider {
    max-width: 600px;
    margin: 0 auto 20px;
}

.footer-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: #8a8a8a;
    letter-spacing: 0.05em;
}

/* ===================== BLUR-FOCUS ANIMATION ===================== */

.blur-focus-element {
    filter: blur(6px);
    opacity: 0.4;
    transition: filter 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.blur-focus-element.in-view {
    filter: blur(0);
    opacity: 1;
}

/* Prose blocks have a delay after heading */
.prose-block.blur-focus-element {
    transition-delay: 0.2s;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .vertical-nav {
        display: none;
    }

    .book-spine {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .section-content {
        grid-template-columns: 1fr;
        padding: 60px 24px;
    }

    .margin-column {
        display: none;
    }

    .hero-content {
        padding-top: 15vh;
    }
}

@media (max-width: 600px) {
    .section-content {
        padding: 40px 16px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .section-heading {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .pull-quote {
        padding: 16px 20px;
    }

    .work-frame {
        padding: 20px;
    }
}
