/* munju.wiki - Neomorphic Minimalism with Aurora Gradient Palette */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400&family=Inter:wght@400&family=JetBrains+Mono:wght@400&display=swap');

:root {
    /* Aurora Palette */
    --deep-aurora-navy: #0A1428;
    --urban-charcoal: #0F1B2F;
    --aurora-purple: #3D2B5F;
    --aurora-blue-green: #2A5F7F;
    --aurora-soft-green: #4A8F6F;
    --cool-concrete-gray: #5A7B9E;
    --pale-aurora-white: #E8ECEF;
    --dawn-ash: #A8B5C2;
    --barely-visible-grid: #1A2D3F;

    /* Dynamic background (updated via JS) */
    --bg-color: #0A1428;
    --accent-overlay: rgba(10, 20, 40, 0);

    /* Neomorphic shadows */
    --neo-inset: inset 4px 4px 8px rgba(10, 20, 40, 0.08);
    --neo-outset: 0 6px 12px rgba(255, 255, 255, 0.04);
    --neo-hover-inset: inset 8px 8px 16px rgba(10, 20, 40, 0.12);
}

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--dawn-ash);
    line-height: 1.65;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    overflow-x: hidden;
    position: relative;
}

/* Aurora overlay that shifts on scroll */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-overlay);
    pointer-events: none;
    z-index: 1;
    transition: background 0.6s ease;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(200, 200, 200, 0.15) 0.5px, transparent 0.5px),
        radial-gradient(circle at 80% 70%, rgba(180, 180, 180, 0.12) 0.5px, transparent 0.5px),
        radial-gradient(circle at 50% 10%, rgba(160, 160, 160, 0.1) 0.3px, transparent 0.3px),
        radial-gradient(circle at 10% 90%, rgba(190, 190, 190, 0.13) 0.4px, transparent 0.4px),
        radial-gradient(circle at 70% 40%, rgba(170, 170, 170, 0.11) 0.6px, transparent 0.6px);
    background-size: 4px 4px, 5px 5px, 3px 3px, 6px 6px, 7px 7px;
}

/* Navigation Glyph */
.nav-glyph {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.7;
}

.nav-glyph:hover {
    transform: scale(1.15);
    opacity: 1;
}

.nav-glyph svg {
    display: block;
}

/* SVG definitions hidden */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

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

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--deep-aurora-navy);
    overflow: hidden;
    /* Neomorphic inset - entire viewport as pressed surface */
    box-shadow:
        inset 0 0 120px rgba(10, 20, 40, 0.5),
        inset 8px 8px 40px rgba(10, 20, 40, 0.15),
        inset -4px -4px 20px rgba(255, 255, 255, 0.02);
}

.hero-inner {
    position: absolute;
    left: 38.2%;
    top: 42%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hero-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 10vw, 5.6rem);
    color: var(--pale-aurora-white);
    letter-spacing: 0.06em;
    line-height: 1;
    margin-bottom: 1.2rem;
    opacity: 0;
}

.hero-title.animated .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px);
}

.hero-title.animated .char.visible {
    animation: charLift 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--cool-concrete-gray);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* ========================================
   CONTENT GRID - Broken Grid System
   ======================================== */

.content-grid {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 3vw, 4rem);
}

.grid-section {
    display: grid;
    grid-template-columns: 3fr 2fr 1fr 2.5fr 1.5fr;
    gap: 2rem;
    margin-bottom: 160px;
    align-items: start;
}

/* Varied section spacing */
.grid-section.section-2 {
    margin-bottom: 240px;
}

.grid-section.section-3 {
    margin-bottom: 120px;
}

.grid-section.section-4 {
    margin-bottom: 200px;
}

/* Section headline - full width */
.section-headline {
    grid-column: 1 / 6;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--pale-aurora-white);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
}

.section-headline.animated .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px);
}

.section-headline.animated .char.visible {
    animation: charLift 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Offset headline variation */
.offset-headline {
    grid-column: 2 / 6;
}

/* ========================================
   NEOMORPHIC PANELS
   ======================================== */

.neo-panel {
    background: var(--urban-charcoal);
    box-shadow: var(--neo-inset), var(--neo-outset);
    border-radius: 4px;
    padding: clamp(1.5rem, 3vw, 3rem);
    transition: box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.neo-panel:hover {
    box-shadow: var(--neo-hover-inset), var(--neo-outset);
}

/* Border animate on hover */
.neo-panel .border-draw {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.neo-panel .border-draw rect {
    fill: none;
    stroke: var(--aurora-blue-green);
    stroke-width: 1.5;
    stroke-dasharray: var(--border-length, 1000);
    stroke-dashoffset: var(--border-length, 1000);
    transition: stroke-dashoffset 2.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.neo-panel:hover .border-draw rect {
    stroke-dashoffset: 0;
}

/* Panel width variants */
.panel-wide {
    grid-column: 1 / 5;
}

.panel-sidebar {
    grid-column: 5 / 6;
}

.panel-quote {
    grid-column: 1 / 4;
}

.panel-body-narrow {
    grid-column: 1 / 5;
}

.panel-secondary {
    grid-column: 5 / 6;
}

.panel-full {
    grid-column: 1 / 5;
}

.panel-accent {
    grid-column: 5 / 6;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

.panel-final {
    grid-column: 4 / 6;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--dawn-ash);
    line-height: 1.65;
    max-width: 55em;
    margin-bottom: 1.2rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

.highlight-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--pale-aurora-white);
    letter-spacing: 0.02em;
    line-height: 1.5;
    border: none;
    padding: 0;
    margin: 0;
}

.meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    color: var(--cool-concrete-gray);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.meta-note {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--dawn-ash);
    line-height: 1.55;
    opacity: 0.8;
}

/* Color Swatches */
.accent-swatch {
    display: block;
    width: 100%;
    height: 24px;
    border-radius: 2px;
}

.swatch-navy {
    background: var(--deep-aurora-navy);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.swatch-purple {
    background: var(--aurora-purple);
}

.swatch-blue {
    background: var(--aurora-blue-green);
}

.swatch-green {
    background: var(--aurora-soft-green);
}

/* ========================================
   ORNAMENT DIVIDERS
   ======================================== */

.ornament-divider {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0.4;
}

.ornament-alt {
    text-align: left;
    padding-left: 15%;
}

/* ========================================
   KINETIC TYPOGRAPHY ANIMATION
   ======================================== */

@keyframes charLift {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tablet */
@media (max-width: 1023px) {
    .grid-section {
        grid-template-columns: repeat(8, 1fr);
        gap: 1.5rem;
    }

    .section-headline {
        grid-column: 1 / -1;
    }

    .offset-headline {
        grid-column: 1 / -1;
    }

    .panel-wide {
        grid-column: 1 / 7;
    }

    .panel-sidebar {
        grid-column: 7 / 9;
    }

    .panel-quote {
        grid-column: 1 / 6;
    }

    .panel-body-narrow {
        grid-column: 1 / 7;
    }

    .panel-secondary {
        grid-column: 7 / 9;
    }

    .panel-full {
        grid-column: 1 / 7;
    }

    .panel-accent {
        grid-column: 7 / 9;
    }

    .panel-final {
        grid-column: 5 / 9;
    }

    .hero-inner {
        left: 50%;
        top: 45%;
    }

    .grid-section {
        margin-bottom: 120px;
    }

    .grid-section.section-2 {
        margin-bottom: 160px;
    }

    .grid-section.section-3 {
        margin-bottom: 100px;
    }

    .grid-section.section-4 {
        margin-bottom: 140px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .grid-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 80px;
    }

    .grid-section.section-2,
    .grid-section.section-3,
    .grid-section.section-4 {
        margin-bottom: 80px;
    }

    .section-headline,
    .offset-headline {
        grid-column: 1;
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    .panel-wide,
    .panel-sidebar,
    .panel-quote,
    .panel-body-narrow,
    .panel-secondary,
    .panel-full,
    .panel-accent,
    .panel-final {
        grid-column: 1;
    }

    .hero-inner {
        left: 50%;
        top: 45%;
        text-align: center;
    }

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

    .nav-glyph {
        top: 1.2rem;
        left: 1.2rem;
    }

    .ornament-divider {
        margin-bottom: 40px;
    }

    .ornament-alt {
        padding-left: 5%;
    }

    .content-grid {
        padding: 0 1.2rem;
    }

    /* Remove border-animate on mobile */
    .neo-panel .border-draw rect {
        display: none;
    }

    .grain-overlay {
        opacity: 0.05;
    }
}

/* Small mobile */
@media (max-width: 479px) {
    .hero-title {
        font-size: clamp(1.6rem, 14vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .neo-panel {
        padding: 1.2rem;
    }
}
