/* ============================================
   thesecond.world — Flat-Design Crystal Gallery
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.75;
    color: #6A5040;
    background-color: #FFF8F0;
    overflow-x: hidden;
}

/* ============================================
   Kinetic Typography Animation
   ============================================ */
@keyframes kineticWeight {
    0% {
        font-weight: 400;
        letter-spacing: 0em;
    }
    50% {
        font-weight: 800;
        letter-spacing: 0.1em;
    }
    100% {
        font-weight: 400;
        letter-spacing: 0em;
    }
}

@keyframes kineticQuote {
    0% {
        font-weight: 400;
        letter-spacing: 0em;
    }
    50% {
        font-weight: 700;
        letter-spacing: 0.05em;
    }
    100% {
        font-weight: 400;
        letter-spacing: 0em;
    }
}

@keyframes crystalPulse {
    0%, 100% {
        opacity: 0.12;
        transform: scale(1);
    }
    50% {
        opacity: 0.18;
        transform: scale(1.03);
    }
}

@keyframes crystalFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-8px) rotate(2deg);
    }
    66% {
        transform: translateY(4px) rotate(-1deg);
    }
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFF8F0;
    overflow: hidden;
}

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

#kinetic-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    color: #2A1A10;
    animation: kineticWeight 4s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: #6A5040;
    letter-spacing: 0.05em;
}

/* Hero Crystal Decorations */
.crystal-decoration {
    position: absolute;
    z-index: 1;
}

.crystal-hero-left {
    top: 15%;
    left: 8%;
    width: 120px;
    height: 120px;
    background-color: #C87050;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalFloat 8s ease-in-out infinite;
}

.crystal-hero-right {
    top: 20%;
    right: 10%;
    width: 90px;
    height: 90px;
    background-color: #D8A860;
    opacity: 0.15;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: crystalFloat 6s ease-in-out infinite 1s;
}

.crystal-hero-top {
    top: 8%;
    left: 45%;
    width: 60px;
    height: 60px;
    background-color: #C87050;
    opacity: 0.10;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: crystalFloat 10s ease-in-out infinite 0.5s;
}

.crystal-hero-bottom {
    bottom: 12%;
    right: 25%;
    width: 100px;
    height: 100px;
    background-color: #D8A860;
    opacity: 0.12;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: crystalFloat 7s ease-in-out infinite 2s;
}

/* ============================================
   Portfolio Grid Section
   ============================================ */
#portfolio {
    position: relative;
    padding: 6rem 4rem;
    background-color: #FFF8F0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 600;
    color: #2A1A10;
    margin-bottom: 1rem;
}

.crystal-divider {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    background-color: #D8A860;
    opacity: 0.2;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-item {
    background-color: #F0E0D0;
    border: 1px solid #E0D8D0;
    overflow: hidden;
    transition: filter 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.grid-item.focused {
    filter: none;
    transform: scale(1.02);
    z-index: 2;
    position: relative;
}

.grid-item.blurred {
    filter: blur(2px);
    opacity: 0.7;
}

.grid-item-image {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.grid-item-image svg {
    width: 100%;
    height: 100%;
    filter: saturate(0.9) sepia(0.1) contrast(1.05);
}

.grid-item-content {
    padding: 1.25rem 1.5rem;
}

.grid-item-content h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #2A1A10;
    margin-bottom: 0.4rem;
}

.grid-item-content p {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: #6A5040;
    line-height: 1.6;
}

/* Crystal grid decorations */
.crystal-grid-decoration {
    position: absolute;
    z-index: 0;
    animation: crystalPulse 6s ease-in-out infinite;
}

.crystal-grid-1 {
    top: 10%;
    right: 2%;
    width: 50px;
    height: 50px;
    background-color: #C87050;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.crystal-grid-2 {
    bottom: 15%;
    left: 2%;
    width: 40px;
    height: 40px;
    background-color: #D8A860;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: 2s;
}

.crystal-grid-3 {
    top: 50%;
    left: 1%;
    width: 35px;
    height: 35px;
    background-color: #C87050;
    opacity: 0.10;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation-delay: 4s;
}

/* ============================================
   Featured Section
   ============================================ */
#featured {
    position: relative;
    padding: 6rem 4rem;
    background-color: #FFF8F0;
}

.featured-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.featured-image {
    width: 100%;
    overflow: hidden;
    border: 1px solid #E0D8D0;
}

.featured-image svg {
    width: 100%;
    height: auto;
    display: block;
    filter: saturate(0.9) sepia(0.1) contrast(1.05);
}

.featured-text {
    padding: 2rem 0;
}

#kinetic-quote {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #2A1A10;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    animation: kineticQuote 6s ease-in-out infinite;
}

.featured-description {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: #6A5040;
    line-height: 1.75;
}

/* Featured Crystal Decorations */
.crystal-featured-left {
    top: -20px;
    left: -30px;
    width: 80px;
    height: 80px;
    background-color: #D8A860;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalFloat 9s ease-in-out infinite;
}

.crystal-featured-right {
    bottom: -15px;
    right: -20px;
    width: 65px;
    height: 65px;
    background-color: #C87050;
    opacity: 0.15;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: crystalFloat 7s ease-in-out infinite 1.5s;
}

/* Crystalline Composition */
.crystalline-composition {
    position: relative;
    height: 120px;
    margin-top: 3rem;
}

.crystal-shape {
    position: absolute;
}

.crystal-comp-1 {
    left: 10%;
    top: 20%;
    width: 50px;
    height: 50px;
    background-color: #C87050;
    opacity: 0.15;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalFloat 8s ease-in-out infinite;
}

.crystal-comp-2 {
    left: 25%;
    top: 10%;
    width: 70px;
    height: 70px;
    background-color: #D8A860;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: crystalFloat 6s ease-in-out infinite 1s;
}

.crystal-comp-3 {
    left: 45%;
    top: 30%;
    width: 40px;
    height: 40px;
    background-color: #C87050;
    opacity: 0.10;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: crystalFloat 10s ease-in-out infinite 2s;
}

.crystal-comp-4 {
    left: 65%;
    top: 15%;
    width: 55px;
    height: 55px;
    background-color: #D8A860;
    opacity: 0.14;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: crystalFloat 7s ease-in-out infinite 0.5s;
}

.crystal-comp-5 {
    left: 82%;
    top: 25%;
    width: 45px;
    height: 45px;
    background-color: #C87050;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalFloat 9s ease-in-out infinite 3s;
}

/* ============================================
   Closing Section
   ============================================ */
#closing {
    position: relative;
    padding: 6rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    background-color: #FFF8F0;
}

.crystal-close-left {
    top: 20%;
    left: 5%;
    width: 70px;
    height: 70px;
    background-color: #D8A860;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: crystalFloat 8s ease-in-out infinite;
}

.crystal-close-right {
    bottom: 20%;
    right: 5%;
    width: 55px;
    height: 55px;
    background-color: #C87050;
    opacity: 0.12;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalFloat 7s ease-in-out infinite 2s;
}

.closing-card {
    background-color: #F0E0D0;
    border: 1px solid #E0D8D0;
    padding: 4rem 5rem;
    text-align: center;
    position: relative;
    max-width: 600px;
    width: 100%;
}

.closing-title {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2A1A10;
    margin-bottom: 0.75rem;
}

.closing-tagline {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: #6A5040;
    letter-spacing: 0.03em;
}

/* Crystal arrangement in closing card */
.crystal-arrangement {
    position: relative;
    height: 60px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.crystal-arr-1 {
    position: relative;
    width: 35px;
    height: 35px;
    background-color: #C87050;
    opacity: 0.2;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: crystalPulse 5s ease-in-out infinite;
}

.crystal-arr-2 {
    position: relative;
    width: 45px;
    height: 45px;
    background-color: #D8A860;
    opacity: 0.25;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: crystalPulse 5s ease-in-out infinite 1s;
}

.crystal-arr-3 {
    position: relative;
    width: 30px;
    height: 30px;
    background-color: #C87050;
    opacity: 0.18;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: crystalPulse 5s ease-in-out infinite 2s;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    #portfolio {
        padding: 4rem 1.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    #featured {
        padding: 4rem 1.5rem;
    }

    .featured-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #closing {
        padding: 4rem 1.5rem;
    }

    .closing-card {
        padding: 3rem 2rem;
    }

    .crystal-hero-left,
    .crystal-hero-right {
        width: 60px;
        height: 60px;
    }

    .crystal-hero-top,
    .crystal-hero-bottom {
        width: 40px;
        height: 40px;
    }
}

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

    .closing-card {
        padding: 2rem 1.5rem;
    }
}
