/* ppss.ee - Bauhaus Dopamine Neon Design */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #1a1a2e;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* Dot Grid */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #e0e0e8 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Masthead */
.masthead {
    position: relative;
    z-index: 2;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.letter-assembly {
    display: flex;
    align-items: center;
    gap: 8px;
}

.geo-letter {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: 0.05em;
    color: var(--neon);
    display: inline-block;
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.3);
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.geo-letter.assembled {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.geo-letter.glow {
    text-shadow: 0 0 20px var(--neon), 0 0 40px var(--neon);
}

/* Interstitial Bands */
.interstitial-band {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: #f8f8fc;
}

.band-circles .band-pattern {
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 36px,
        #ff2d8a 36px,
        #ff2d8a 38px
    ),
    repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 16px,
        transparent 16px
    );
    background-size: 80px 80px;
    animation: band-shift 8s linear infinite;
}

.band-circles .band-pattern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 200%;
    height: 40px;
    transform: translateY(-50%);
    background: repeating-radial-gradient(
        circle at 40px 20px,
        #00e5ff 0px,
        #00e5ff 12px,
        transparent 12px,
        transparent 80px
    );
    background-size: 80px 40px;
    animation: band-shift 8s linear infinite;
}

.band-triangles .band-pattern {
    width: 200%;
    height: 100%;
    background: linear-gradient(60deg, #e8ff00 25%, transparent 25%) 0 0,
                linear-gradient(-60deg, #39ff14 25%, transparent 25%) 0 0,
                linear-gradient(60deg, transparent 75%, #e8ff00 75%) 0 0,
                linear-gradient(-60deg, transparent 75%, #39ff14 75%) 0 0;
    background-size: 60px 80px;
    opacity: 0.4;
    animation: band-shift 10s linear infinite;
}

@keyframes band-shift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Portfolio Grid */
.portfolio-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 24px;
}

/* Grid Card */
.grid-card {
    background: #f8f8fc;
    border-left: 4px solid var(--accent);
    padding: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-width 0.3s ease;
    perspective: 600px;
}

.grid-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.grid-card:hover {
    box-shadow: 0 8px 30px rgba(26, 26, 46, 0.12);
    border-left-width: 8px;
    transform: translateZ(20px);
}

/* Card Scene (3D shapes area) */
.card-scene {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    overflow: hidden;
    background: #ffffff;
    padding: 20px;
}

/* 3D Geometric Forms */
.geo-sphere {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--color), color-mix(in srgb, var(--color) 40%, #1a1a2e));
    box-shadow: 4px 6px 12px rgba(26, 26, 46, 0.15);
    animation: shape-breathe 4s ease-in-out infinite;
}

.geo-sphere.small {
    width: 50px;
    height: 50px;
    animation-delay: 0.5s;
}

.geo-sphere.tiny {
    width: 30px;
    height: 30px;
    animation-delay: 1s;
}

.geo-cube {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color) 0%, color-mix(in srgb, var(--color) 60%, #1a1a2e) 100%);
    transform: rotateX(15deg) rotateY(-20deg);
    box-shadow: 4px 6px 12px rgba(26, 26, 46, 0.15);
    animation: shape-breathe 4s ease-in-out infinite 0.3s;
}

.geo-cube.large {
    width: 90px;
    height: 90px;
}

.geo-cone {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 80px solid var(--color);
    filter: drop-shadow(4px 6px 8px rgba(26, 26, 46, 0.15));
    animation: shape-breathe 4s ease-in-out infinite 0.6s;
}

.geo-cylinder {
    width: 50px;
    height: 80px;
    background: linear-gradient(90deg, var(--color) 0%, color-mix(in srgb, var(--color) 50%, #1a1a2e) 100%);
    border-radius: 25px / 10px;
    box-shadow: 4px 6px 12px rgba(26, 26, 46, 0.15);
    animation: shape-breathe 4s ease-in-out infinite 0.4s;
}

.geo-cylinder.tall {
    height: 120px;
}

@keyframes shape-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Floral Elements */
.flower-stem {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 4px;
    height: 0;
    background: #39ff14;
    transform: translateX(-50%);
    transition: height 1s ease 0.3s;
}

.floral-card.bloomed .flower-stem {
    height: 60px;
}

.flower-leaf {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.6s ease;
}

.leaf-left {
    bottom: 50px;
    left: calc(50% - 26px);
    border-width: 0 20px 15px 0;
    border-color: transparent #39ff14 transparent transparent;
    opacity: 0;
    transition-delay: 0.8s;
}

.leaf-right {
    bottom: 40px;
    left: calc(50% + 6px);
    border-width: 15px 20px 0 0;
    border-color: #e8ff00 transparent transparent transparent;
    opacity: 0;
    transition-delay: 1s;
}

.floral-card.bloomed .leaf-left,
.floral-card.bloomed .leaf-right {
    opacity: 1;
}

.flower-head {
    position: relative;
    z-index: 1;
}

/* Card Info */
.card-info {
    padding: 20px 24px 24px;
}

.card-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b6b7b;
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.card-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #6b6b7b;
}

/* Footer Composition */
.footer-composition {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.fundamental-forms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.form-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ff2d8a;
    animation: rotate-circle 20s linear infinite;
    transform-origin: center;
}

.form-triangle {
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 80px solid #00e5ff;
    animation: rotate-triangle 15s linear infinite;
}

.form-square {
    width: 75px;
    height: 75px;
    background: #e8ff00;
    animation: rotate-square 25s linear infinite;
}

@keyframes rotate-circle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotate-triangle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotate-square {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-text {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.05em;
    color: #1a1a2e;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .letter-assembly {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fundamental-forms {
        gap: 24px;
    }

    .form-circle { width: 60px; height: 60px; }
    .form-square { width: 55px; height: 55px; }
}
