/*
Theme Name: Dynamic Portfolio Theme
Theme URI: https://github.com/Hiro-kiii/Scroll-Transition/
Author: DXMD
Description: Premium dynamic theme with animated background and glassmorphism cards.
Version: 2.0.0
*/

:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #6b46c1;
    --accent-glow: rgba(107, 70, 193, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Dynamic Background */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 400px; height: 400px; background: #6b46c1; top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 500px; height: 500px; background: #2b6cb0; bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #97266d; top: 40%; left: 60%; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.2); }
    100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* Home Layout */
.home-main {
    min-height: 100vh;
    padding: 6rem 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-hero {
    text-align: center;
    margin-bottom: 5rem;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, #a78bfa, #fbcfe8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Grid & Cards (Glassmorphism + Tilt) */
.featured-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1400px;
    z-index: 1;
}

.featured-page-card {
    display: block;
    text-decoration: none;
    border-radius: 24px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transform-style: preserve-3d;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.featured-page-card:hover .card-inner {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px var(--accent-glow);
}

.card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateZ(0); /* Force GPU */
}

.featured-page-card:hover .card-image {
    transform: scale(1.1) translateZ(0);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.1) 100%);
}

.card-content {
    position: absolute;
    inset: 0;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateZ(40px); /* Creates the 3D popping effect */
}

.card-tag {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.card-title {
    margin: 0;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.card-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.featured-page-card:hover .card-arrow {
    transform: translateX(10px);
    background: var(--accent);
    color: #fff;
}

.no-pages-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Allow full screen for normal pages */
.page-template-default .site-main { padding: 0; }
