/* senggack.net - Frutiger Aero Thought Aquarium */
/* Fonts: Playfair Display, Source Sans 3, IBM Plex Mono */
/* Palette: Monochrome Iridescence */

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

:root {
    --deep-glass: #0d0d0d;
    --obsidian-water: #1a1a1e;
    --silver-refraction: #c8c8d0;
    --frosted-pane: rgba(255, 255, 255, 0.06);
    --bright-surface: #f0f0f4;
    --metallic-frame: #4a4a52;
    --bubble-membrane: rgba(200, 200, 220, 0.15);
    --iridescent-shift: linear-gradient(135deg, rgba(180,180,200,0.08), rgba(220,220,240,0.03), rgba(180,180,200,0.08));
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--silver-refraction);
    background: var(--deep-glass);
    overflow-x: hidden;
}

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

/* ========================================
   NAVIGATION
   ======================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.5s ease;
}

#navbar.dark-mode {
    background: rgba(13, 13, 13, 0.6);
}

.nav-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #e0e0e0;
    letter-spacing: 0.02em;
}

.nav-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #e0e0e0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    backdrop-filter: blur(30px) saturate(1.3);
    -webkit-backdrop-filter: blur(30px) saturate(1.3);
    background: rgba(13, 13, 13, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: var(--silver-refraction);
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.3s ease;
}

.nav-overlay.active .nav-link {
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-link[data-delay="0"] { transition-delay: 0.15s; }
.nav-overlay.active .nav-link[data-delay="1"] { transition-delay: 0.3s; }
.nav-overlay.active .nav-link[data-delay="2"] { transition-delay: 0.45s; }

.nav-link:hover {
    color: var(--bright-surface);
}

/* ========================================
   BACKGROUND BUBBLES
   ======================================== */
#backgroundBubbles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.04), transparent 70%);
    border: 1px solid var(--bubble-membrane);
    will-change: transform;
    animation: bubbleRise var(--duration) linear infinite, bubbleWobbleX var(--wobble-duration) ease-in-out infinite alternate, bubblePulse var(--pulse-duration) ease-in-out infinite alternate;
    opacity: 0;
    transition: opacity 1s ease;
}

.bg-bubble.visible {
    opacity: 1;
}

@keyframes bubbleRise {
    0% { transform: translateY(100vh); }
    100% { transform: translateY(-15vh); }
}

@keyframes bubbleWobbleX {
    0% { margin-left: -20px; }
    100% { margin-left: 20px; }
}

@keyframes bubblePulse {
    0% { scale: 0.95; }
    100% { scale: 1.05; }
}

/* ========================================
   SUBMERSION ZONE
   ======================================== */
.submersion-zone {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bright-surface);
    z-index: 1;
    overflow: hidden;
    transition: background 0.05s linear;
}

.submersion-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.submersion-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 7rem);
    color: var(--obsidian-water);
    letter-spacing: -0.02em;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.submersion-subtitle {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--metallic-frame);
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.submersion-hint {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--metallic-frame);
    margin-top: 3rem;
    opacity: 0.6;
    animation: hintPulse 2s ease-in-out infinite alternate;
    transition: color 0.3s ease;
}

@keyframes hintPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* ========================================
   DEEP ZONE / CARD GRID
   ======================================== */
.deep-zone {
    position: relative;
    z-index: 1;
    padding: 0;
    background: linear-gradient(135deg, #d0d0d0, #ffffff, #d0d0d0);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
    width: 100%;
}

@media (min-width: 1400px) {
    .card-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   THOUGHT CARDS
   ======================================== */
.thought-card {
    position: relative;
    background: rgba(26, 26, 30, 0.85);
    overflow: hidden;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.15s ease-out;
    cursor: default;
}

.thought-card--primary {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 500px;
    padding: 3rem 2.5rem;
}

.thought-card--secondary {
    min-height: 300px;
}

.thought-card--micro {
    min-height: 180px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .thought-card--primary {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 400px;
    }
}

/* Card Glass Texture */
.card-glass {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    z-index: 0;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

/* Card hover iridescent shift */
.thought-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--iridescent-shift);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.thought-card:hover::after {
    opacity: 1;
}

.thought-card:hover {
    border-color: var(--metallic-frame);
}

/* Card Bubbles */
.card-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.bubble-svg {
    position: absolute;
    opacity: 0.6;
}

.bubble-shape {
    fill: none;
    stroke: rgba(200, 200, 220, 0.2);
    stroke-width: 1;
}

.bubble-highlight {
    fill: rgba(255, 255, 255, 0.08);
}

.bubble-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    fill: var(--silver-refraction);
    text-anchor: middle;
    dominant-baseline: middle;
}

.bubble-lg {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
}

.bubble-md {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 15%;
}

.bubble-sm {
    width: 60px;
    height: 60px;
    bottom: 25%;
    left: 40%;
}

.bubble-xs {
    width: 40px;
    height: 40px;
    bottom: 15%;
    right: 25%;
}

.thought-card--micro .bubble-sm {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    width: 80px;
    height: 80px;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 2;
}

.card-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: -0.02em;
    color: var(--bright-surface);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.thought-card--secondary .card-heading {
    font-weight: 600;
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.card-body {
    color: var(--silver-refraction);
    max-width: 540px;
}

/* Refraction Lines */
.refraction-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.refraction {
    stroke: var(--metallic-frame);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 0.6s ease-out;
}

.thought-card.revealed .refraction {
    stroke-dashoffset: 0;
}

/* Card Label */
.card-label {
    position: relative;
    z-index: 2;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--metallic-frame);
    margin-top: 1.5rem;
    display: block;
}

.thought-card--micro .card-label {
    margin-top: 0.8rem;
}

/* Card enter animation */
.thought-card {
    opacity: 0;
    transform: translateY(40px);
}

.thought-card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ========================================
   SURFACE ZONE
   ======================================== */
.surface-zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-glass);
    z-index: 1;
    overflow: hidden;
    transition: background 0.05s linear;
}

.surface-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.surface-message {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: var(--silver-refraction);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.surface-zone.revealed .surface-message {
    opacity: 1;
    transform: translateY(0);
}

.surface-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--silver-refraction);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.surface-zone.revealed .surface-domain {
    opacity: 1;
    transform: translateY(0);
}

.surface-timestamp {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--metallic-frame);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.surface-zone.revealed .surface-timestamp {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   MOBILE SCROLL COMPRESSION
   ======================================== */
@media (hover: none) {
    .thought-card.scroll-compress {
        transform: scaleY(0.97);
        transition: transform 0.2s ease-out;
    }
}

/* ========================================
   SUBMERSION COLOR TRANSITIONS
   ======================================== */
.submersion-zone.submerged .submersion-title {
    color: var(--bright-surface);
}

.submersion-zone.submerged .submersion-subtitle {
    color: var(--silver-refraction);
}

.submersion-zone.submerged .submersion-hint {
    color: var(--silver-refraction);
}
