:root {
    --bg-primary: #f5ead6;
    --bg-secondary: #ece0c9;
    --text-primary: #3d2e1f;
    --text-secondary: #5c4a3a;
    --accent-gold: #c9a351;
    --accent-coral: #d4856a;
    --accent-teal: #5a9e8f;
    --accent-deep: #2c1e12;
    --highlight: #e8a84c;
    --card-bg: #faf5ec;
    --label-color: #8a7560;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
}

/* ========== NOISE OVERLAY ========== */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ========== BUBBLE PARTICLES ========== */
#bubble-container, #floor-bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#floor-bubble-container {
    position: absolute;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.2;
    animation: rise linear infinite;
}

.bubble-down {
    animation-name: sink;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-50vh) translateX(15px);
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) translateX(-10px);
        opacity: 0;
    }
}

@keyframes sink {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.15;
    }
    50% {
        transform: translateY(50vh) translateX(-12px);
        opacity: 0.1;
    }
    100% {
        transform: translateY(100vh) translateX(8px);
        opacity: 0;
    }
}

/* ========== HERO SECTION ========== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 60%, var(--accent-gold) 200%);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    opacity: 0.08;
}

.shape-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--accent-coral);
    clip-path: polygon(5% 10%, 15% 0%, 30% 5%, 50% 2%, 70% 8%, 85% 0%, 95% 12%, 100% 30%, 98% 50%, 100% 70%, 95% 85%, 100% 95%, 85% 100%, 65% 98%, 45% 100%, 25% 95%, 10% 100%, 0% 85%, 3% 65%, 0% 45%, 5% 25%);
}

.shape-rect {
    width: 180px;
    height: 120px;
    background: var(--accent-teal);
    clip-path: polygon(3% 0%, 97% 2%, 100% 5%, 98% 95%, 100% 100%, 2% 98%, 0% 95%, 1% 5%);
}

.hero-fish-school {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.fish-silhouette {
    position: absolute;
    width: 60px;
    height: 30px;
    color: var(--accent-gold);
    opacity: 0.15;
}

.fish-bg-1 {
    top: 25%;
    left: 15%;
    animation: swim-right 12s ease-in-out infinite;
}

.fish-bg-2 {
    top: 55%;
    right: 20%;
    width: 45px;
    animation: swim-left 15s ease-in-out infinite;
    animation-delay: -3s;
}

.fish-bg-3 {
    bottom: 30%;
    left: 40%;
    width: 35px;
    animation: swim-right 10s ease-in-out infinite;
    animation-delay: -7s;
}

@keyframes swim-right {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(40px) translateY(-10px); }
    50% { transform: translateX(80px) translateY(5px); }
    75% { transform: translateX(40px) translateY(15px); }
}

@keyframes swim-left {
    0%, 100% { transform: translateX(0) translateY(0) scaleX(-1); }
    25% { transform: translateX(-30px) translateY(10px) scaleX(-1); }
    50% { transform: translateX(-60px) translateY(-5px) scaleX(-1); }
    75% { transform: translateX(-30px) translateY(-15px) scaleX(-1); }
}

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

.hero-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.hero-letter {
    font-family: 'Playfair Display', serif;
    font-size: 160px;
    font-weight: 900;
    color: var(--text-primary);
    display: inline-block;
    cursor: default;
    position: relative;
    transition: color 0.3s ease;
}

.letter-a {
    animation: bob-a 3s ease-in-out infinite;
    opacity: 0;
    transform: translateX(-100px);
}

.letter-6 {
    animation: bob-6 3.5s ease-in-out infinite;
    color: var(--accent-coral);
    opacity: 0;
    transform: translateY(-80px);
}

.letter-c {
    animation: bob-c 2.8s ease-in-out infinite;
    opacity: 0;
    transform: translateX(100px);
}

.letter-a.animate-in {
    animation: enter-left 1s cubic-bezier(0.22, 1, 0.36, 1) forwards, bob-a 3s ease-in-out 1s infinite;
}

.letter-6.animate-in {
    animation: enter-top 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards, bob-6 3.5s ease-in-out 1.2s infinite;
}

.letter-c.animate-in {
    animation: enter-right 1s cubic-bezier(0.22, 1, 0.36, 1) forwards, bob-c 2.8s ease-in-out 1s infinite;
}

@keyframes enter-left {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes enter-top {
    from { opacity: 0; transform: translateY(-80px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes enter-right {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bob-a {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes bob-6 {
    0%, 100% { transform: translateY(0) rotate(1deg); }
    50% { transform: translateY(-15px) rotate(-1.5deg); }
}

@keyframes bob-c {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}

.hero-letter:hover {
    color: var(--accent-teal);
    animation-play-state: paused;
    transform: scale(1.05) translateX(15px);
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.2s;
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 22px;
    color: var(--text-secondary);
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease 1.5s, transform 1.5s ease 1.5s;
}

.hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 3;
}

.hero-wave {
    height: 120px;
    bottom: -1px;
}

.floor-wave {
    top: -1px;
    bottom: auto;
}

/* ========== AQUARIUM BANDS ========== */
.aquarium-band {
    position: relative;
    height: 120px;
    background: linear-gradient(90deg, transparent, rgba(201, 163, 81, 0.12), transparent);
    overflow: hidden;
    z-index: 2;
}

.aquarium-fish {
    position: absolute;
    width: 40px;
    height: 20px;
    color: var(--accent-teal);
    opacity: 0.3;
}

.aq-fish-1 {
    top: 30%;
    left: -40px;
    animation: drift-right 20s linear infinite;
}

.aq-fish-2 {
    top: 60%;
    right: -40px;
    animation: drift-left 18s linear infinite;
    animation-delay: -5s;
    color: var(--accent-coral);
}

.aq-fish-3 {
    top: 40%;
    left: -40px;
    animation: drift-right 22s linear infinite;
    animation-delay: -8s;
}

@keyframes drift-right {
    0% { transform: translateX(-40px) translateY(0); }
    25% { transform: translateX(25vw) translateY(-8px); }
    50% { transform: translateX(50vw) translateY(5px); }
    75% { transform: translateX(75vw) translateY(-5px); }
    100% { transform: translateX(100vw) translateY(0); }
}

@keyframes drift-left {
    0% { transform: translateX(40px) translateY(0) scaleX(-1); }
    25% { transform: translateX(-25vw) translateY(8px) scaleX(-1); }
    50% { transform: translateX(-50vw) translateY(-5px) scaleX(-1); }
    75% { transform: translateX(-75vw) translateY(5px) scaleX(-1); }
    100% { transform: translateX(-100vw) translateY(0) scaleX(-1); }
}

.aquarium-coral {
    position: absolute;
    width: 80px;
    height: 60px;
    bottom: 0;
    right: 15%;
    color: var(--accent-coral);
    opacity: 0.2;
}

.coral-2 {
    left: 25%;
    right: auto;
}

.aquarium-letter {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 400;
    color: var(--accent-gold);
    opacity: 0.12;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: aqua-drift 8s ease-in-out infinite;
}

@keyframes aqua-drift {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

/* ========== CONTENT SECTIONS ========== */
.content-section {
    position: relative;
    padding: 40px 0;
    z-index: 2;
}

/* ========== SPECIMEN CARDS ========== */
.specimen-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 48px 40px;
    position: relative;
    box-shadow: 0 4px 20px rgba(60, 46, 31, 0.08), 0 1px 4px rgba(60, 46, 31, 0.05);
    transform: rotate(var(--card-rotation, 0deg));
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    max-width: 680px;
}

.specimen-card:hover {
    box-shadow: 0 8px 32px rgba(60, 46, 31, 0.12), 0 2px 8px rgba(60, 46, 31, 0.08);
}

.card-reef {
    margin: 0 auto;
    margin-left: 12%;
}

.section-heading {
    font-family: 'Bitter', serif;
    font-size: 36px;
    font-weight: 700;
    color: #4a3728;
    margin-bottom: 20px;
    line-height: 1.3;
}

.body-text {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.body-text:last-of-type {
    margin-bottom: 24px;
}

.specimen-stamp {
    position: absolute;
    top: -16px;
    right: 24px;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(12deg);
    opacity: 0.5;
}

.stamp-text {
    font-family: 'Courier Prime', monospace;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-coral);
    text-align: center;
    line-height: 1.3;
    padding: 8px;
}

.specimen-label {
    font-family: 'Courier Prime', monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--label-color);
    display: block;
    margin-top: 8px;
}

/* ========== LETTER FISH ========== */
.floating-letter-fish {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fish-near-reef {
    position: relative;
    height: 80px;
    margin-top: -20px;
}

.letter-fish {
    width: 80px;
    height: 48px;
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lf-1 {
    right: 15%;
    top: 10px;
    animation: fish-swim-1 6s ease-in-out infinite;
}

.lf-2 {
    right: 25%;
    top: 30px;
    animation: fish-swim-2 7s ease-in-out infinite;
    animation-delay: -2s;
}

.letter-fish:hover {
    transform: translateX(15px) scale(1.1);
}

@keyframes fish-swim-1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    30% { transform: translateX(15px) translateY(-5px); }
    60% { transform: translateX(-10px) translateY(3px); }
}

@keyframes fish-swim-2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    40% { transform: translateX(-12px) translateY(-8px); }
    70% { transform: translateX(8px) translateY(4px); }
}

/* ========== GALLERY SECTION ========== */
.gallery-stack {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 16%;
}

.card-project {
    margin-bottom: -40px;
    position: relative;
}

.card-project-1 {
    z-index: 1;
    margin-left: 0;
}

.card-project-2 {
    z-index: 2;
    margin-left: 5%;
}

.card-project-3 {
    z-index: 3;
    margin-left: -2%;
    margin-bottom: 0;
}

.postage-stamp {
    width: 70px;
    height: 70px;
    border: 2px dashed var(--accent-gold);
    padding: 5px;
    float: right;
    margin-left: 16px;
    margin-bottom: 8px;
    transform: rotate(3deg);
}

.postage-stamp svg {
    width: 100%;
    height: 100%;
}

/* ========== REVEAL ANIMATION ========== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px) rotate(var(--card-rotation, 0deg));
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotation, 0deg));
}

/* ========== CURRENT / PHILOSOPHY ========== */
.current-band {
    position: relative;
    padding: 80px 10%;
    text-align: center;
    overflow: hidden;
}

.current-fish-school {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.current-fish {
    position: absolute;
    width: 35px;
    height: 18px;
    opacity: 0.15;
}

.cf-1 {
    color: var(--accent-teal);
    top: 20%;
    left: 10%;
    animation: drift-right 25s linear infinite;
}

.cf-2 {
    color: var(--accent-coral);
    top: 70%;
    right: 5%;
    animation: drift-left 20s linear infinite;
    animation-delay: -6s;
}

.cf-3 {
    color: var(--accent-gold);
    top: 45%;
    left: 30%;
    animation: drift-right 28s linear infinite;
    animation-delay: -12s;
}

.philosophy-quote {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 36px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.5;
    display: inline;
}

.quote-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quote-char.visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-char.space {
    width: 0.3em;
}

.quote-attribution {
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--label-color);
    opacity: 0;
    transition: opacity 1s ease;
}

.quote-attribution.visible {
    opacity: 1;
}

/* ========== SEA FLOOR / FOOTER ========== */
#sea-floor {
    position: relative;
    min-height: 400px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #4a3728 30%, var(--accent-deep) 100%);
    padding-top: 80px;
    overflow: hidden;
}

.sea-floor-letters {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.floor-letter {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    color: rgba(250, 245, 236, 0.06);
    transform: rotate(var(--rot, 0deg));
    user-select: none;
}

.footer-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 60px 20px 80px;
}

.footer-stamp {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    border-color: var(--accent-gold);
    opacity: 0.35;
}

.footer-stamp .stamp-text {
    color: var(--accent-gold);
    font-size: 9px;
}

.contact-email {
    font-family: 'Courier Prime', monospace;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--card-bg);
    text-decoration: none;
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid rgba(250, 245, 236, 0.2);
    border-radius: 4px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-email:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.footer-note {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-style: italic;
    color: rgba(250, 245, 236, 0.3);
    margin-top: 24px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-letter {
        font-size: 60px;
    }

    .hero-letters {
        gap: 10px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .specimen-card {
        padding: 32px 24px;
        max-width: 90%;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }

    .card-reef {
        margin-left: 5% !important;
    }

    .section-heading {
        font-size: 28px;
    }

    .gallery-stack {
        padding: 20px 5%;
    }

    .card-project {
        margin-bottom: -20px;
        --card-rotation: 0deg !important;
    }

    .card-project-1,
    .card-project-2,
    .card-project-3 {
        margin-left: 0;
    }

    .quote-text {
        font-size: 24px;
    }

    .current-band {
        padding: 60px 5%;
    }

    .specimen-stamp {
        width: 70px;
        height: 70px;
        top: -12px;
        right: 16px;
    }

    .stamp-text {
        font-size: 6px;
    }

    .fish-near-reef {
        display: none;
    }

    .aquarium-band {
        height: 80px;
    }

    body {
        font-size: 16px;
    }
}