/* ggaji.com - Zen Minimalist Design */
/* Custom Properties */
:root {
    /* Palette */
    --rice-paper: #F4F2ED;
    --rice-paper-cool: #F0F2F0;
    --deep-ink: #1B1F24;
    --charcoal-brush: #2D3436;
    --stone-grey: #6B7B7B;
    --sage-mist: #8B9E8B;
    --lichen: #A3B4A2;
    --mist: #9BA8AB;
    --warm-stone: #C7BFB2;
    --fog: rgba(107, 123, 123, 0.12);

    /* Typography */
    --font-primary: 'Instrument Sans', sans-serif;
    --font-display: 'Fraunces', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Sizes */
    --sidebar-width: 220px;
    --sidebar-collapsed: 48px;
}

/* Dark mode */
.dark-mode {
    --rice-paper: #1B1F24;
    --rice-paper-cool: #1E2228;
    --deep-ink: #F4F2ED;
    --charcoal-brush: #F4F2ED;
    --stone-grey: #9BA8AB;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--rice-paper);
    color: var(--charcoal-brush);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--warm-stone);
    border-radius: 3px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--deep-ink);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(139, 158, 139, 0.15);
}

.sidebar-brand {
    padding-block-start: 40px;
    padding-block-end: 40px;
}

.brand-text {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.35em;
    color: var(--rice-paper);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    user-select: none;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.nav-icon {
    color: var(--stone-grey);
    transition: color 0.4s ease;
}

.nav-item:hover .nav-icon {
    color: var(--sage-mist);
}

.nav-item.active .nav-icon {
    color: var(--sage-mist);
}

.nav-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 3px;
    background-color: var(--sage-mist);
    transition: width 0.4s ease;
}

.nav-item.active .nav-indicator {
    width: 16px;
}

/* Main Content */
.content {
    margin-inline-start: var(--sidebar-width);
    scroll-snap-type: y proximity;
    overflow-y: auto;
    height: 100vh;
}

/* Chamber */
.chamber {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
}

.chamber[data-bg="warm"] {
    background-color: var(--rice-paper);
}

.chamber[data-bg="cool"] {
    background-color: var(--rice-paper-cool);
}

.chamber-inner {
    width: 100%;
    max-width: 960px;
    padding: 12vh 4vw 12vh 8vw;
    position: relative;
}

/* Breathing Border */
.chamber.in-view::after {
    content: '';
    position: absolute;
    inset: 2vh 2vw;
    border: 0.5px solid var(--stone-grey);
    pointer-events: none;
    animation: breathingBorder 6s ease-in-out infinite;
}

@keyframes breathingBorder {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.08; }
}

/* Breath Zone */
.breath-zone {
    height: 20vh;
    background-color: var(--rice-paper);
}

.breath-zone:nth-of-type(even) {
    background-color: var(--rice-paper-cool);
}

/* Fade Reveal */
.fade-reveal {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-reveal.visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .fade-reveal {
        transition-duration: 0.01s;
    }
    .enso-path,
    .network-line,
    .waveform-icon,
    .constellation-icon,
    .scroll-indicator,
    .chamber.in-view::after {
        animation-duration: 0.01s !important;
        transition-duration: 0.01s !important;
    }
}

/* ===================== */
/* Chamber 1: Landing    */
/* ===================== */

#chamber-landing .chamber-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 80vh;
    position: relative;
}

.enso {
    position: absolute;
    top: 8vh;
    right: 4vw;
    opacity: 0;
}

.enso.drawn {
    animation: ensoFadeIn 3s ease-out forwards;
}

@keyframes ensoFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.enso-path {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
}

.enso.drawn .enso-path {
    animation: drawEnso 3s ease-out forwards;
}

@keyframes drawEnso {
    0% { stroke-dashoffset: 700; }
    100% { stroke-dashoffset: 0; }
}

.landing-statement {
    max-width: 680px;
}

.statement-text {
    font-family: var(--font-display);
    font-weight: 200;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.15;
    color: var(--stone-grey);
    letter-spacing: -0.01em;
}

.scroll-indicator {
    position: absolute;
    bottom: 6vh;
    left: 50%;
    transform: translateX(-50%);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ===================== */
/* Chamber 2: Purpose    */
/* ===================== */

.chamber-purpose-layout {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.purpose-text {
    flex: 1;
    max-width: 680px;
}

.section-heading {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--charcoal-brush);
    margin-block-end: 2rem;
}

.body-text {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.72;
    letter-spacing: 0.015em;
    color: var(--charcoal-brush);
    margin-block-end: 1.5rem;
}

.metadata {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-block-start: 2rem;
}

.meta-label {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist);
    opacity: 0.7;
}

.meta-separator {
    color: var(--mist);
    opacity: 0.4;
    font-size: 0.75rem;
}

.purpose-icon {
    flex-shrink: 0;
    padding-block-start: 60px;
}

/* Network Icon Animation */
.network-icon {
    opacity: 0;
}

.network-icon.drawn {
    opacity: 1;
}

.network-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.network-icon.drawn .network-line {
    animation: drawNetwork 2s ease-out forwards;
}

@keyframes drawNetwork {
    0% { stroke-dashoffset: 200; }
    100% { stroke-dashoffset: 0; }
}

/* Pulsing dots on the network */
.network-icon circle {
    animation: none;
}

.network-icon.drawn circle {
    animation: pulseDot 4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { r: 4; opacity: 0.8; }
    50% { r: 5; opacity: 1; }
}

/* ========================= */
/* Chamber 3: Philosophy     */
/* ========================= */

.chamber-philosophy-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 60px;
    align-items: center;
}

.philosophy-text {
    max-width: 320px;
}

.philosophy-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.waveform-icon {
    animation: waveformOscillate 8s ease-in-out infinite;
}

@keyframes waveformOscillate {
    0%, 100% { transform: translateY(-2px); }
    50% { transform: translateY(2px); }
}

.philosophy-values {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.inline-icon {
    flex-shrink: 0;
    margin-block-start: 2px;
}

.value-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.value-label {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    color: var(--charcoal-brush);
    letter-spacing: -0.01em;
}

.value-desc {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--stone-grey);
    line-height: 1.5;
}

/* ==================== */
/* Chamber 4: Work      */
/* ==================== */

#chamber-work .chamber-inner {
    max-width: 960px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 64px;
    margin-block-start: 3rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    cursor: default;
}

.grid-icon {
    transition: transform 0.4s ease, color 0.4s ease;
}

.grid-item:hover .grid-icon {
    transform: scale(1.05);
    stroke: var(--sage-mist);
}

.grid-label {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    color: var(--charcoal-brush);
    letter-spacing: -0.01em;
}

.grid-desc {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--stone-grey);
    line-height: 1.5;
}

/* ====================== */
/* Chamber 5: Contact     */
/* ====================== */

#chamber-contact {
    position: relative;
}

/* Dot grid underlay */
#chamber-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(107, 123, 123, 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.chamber-contact-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    position: relative;
}

.constellation-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: constellationDrift 20s ease-in-out infinite;
}

@keyframes constellationDrift {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(2deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.contact-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.contact-line {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--charcoal-brush);
    margin-block-end: 2rem;
}

.social-icons {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--stone-grey);
    text-decoration: none;
    transition: color 0.4s ease;
}

.social-link:hover {
    color: var(--sage-mist);
}

/* ====================== */
/* Responsive: Tablet     */
/* ====================== */

@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .brand-text {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }

    .content {
        margin-inline-start: var(--sidebar-collapsed);
    }

    .chamber-purpose-layout {
        flex-direction: column;
        gap: 40px;
    }

    .purpose-icon {
        padding-block-start: 0;
    }

    .chamber-philosophy-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .philosophy-center {
        order: -1;
    }

    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ====================== */
/* Responsive: Mobile     */
/* ====================== */

@media (max-width: 768px) {
    .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 56px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border-right: none;
        border-top: 1px solid rgba(139, 158, 139, 0.15);
    }

    .sidebar-brand {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-evenly;
        width: 100%;
        gap: 0;
    }

    .nav-indicator {
        right: auto;
        bottom: 0;
        top: auto;
        transform: none;
        width: 3px !important;
        height: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-item.active .nav-indicator {
        width: 3px !important;
        height: 16px;
    }

    .content {
        margin-inline-start: 0;
        margin-block-end: 56px;
    }

    .chamber-inner {
        padding: 8vh 6vw;
    }

    .chamber-purpose-layout {
        flex-direction: column;
    }

    .chamber-philosophy-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .icon-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .enso {
        width: 200px;
        height: 200px;
        top: 4vh;
        right: 2vw;
    }

    .statement-text {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
