/* Techniques V2 - Matching Index V2 Style */
@import url('shared.css');

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

body {
    font-family: 'Outfit', sans-serif;
    background: #f5f5f0;
    min-height: 100vh;
    color: #1a1a1a;
    position: relative;
    overflow-x: hidden;
}

/* Subtle background gradient glows - matching index */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 600px 400px at 10% 20%, rgba(134, 239, 172, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 500px 350px at 85% 80%, rgba(253, 224, 71, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(251, 207, 232, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grain texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
    position: relative;
    z-index: 1;
}

.back-link {
    margin-bottom: 1rem;
}

header h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 2rem;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Card Styles */
.card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e5e5e0;
}

.card-content {
    padding: 1.25rem;
}

.card-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #86efac;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    margin-bottom: 0.5rem;
}

/* Tag accent colors - cycling through v2 palette */
.card:nth-child(6n+1) .card-tag { background: #86efac; } /* mint */
.card:nth-child(6n+2) .card-tag { background: #fda4af; } /* coral */
.card:nth-child(6n+3) .card-tag { background: #fde047; } /* yellow */
.card:nth-child(6n+4) .card-tag { background: #5eead4; } /* teal */
.card:nth-child(6n+5) .card-tag { background: #c4b5fd; } /* lavender */
.card:nth-child(6n+6) .card-tag { background: #93c5fd; } /* sky blue */

.card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Card Image Backgrounds - from original tech23 */
.card-image.cle {
    background: url('../images/cle-hoods.jpg') right/cover no-repeat;
}

.card-image.burgers {
    background: hsl(270deg, 50%, 75%) url('../images/burgertile.png') center/contain no-repeat;
}

.card-image.toy {
    background: url('../images/toytile.jpg') center/cover no-repeat;
}

.card-image.container {
    background: url('https://images.unsplash.com/photo-1526505262320-81542978f63b?w=600&q=80') center/cover no-repeat;
}

.card-image.pop {
    background: url('../images/pop-tile.jpg') center/cover no-repeat;
}

.card-image.team {
    background: url('https://www.w3schools.com/w3images/avatar3.png') 100%/cover no-repeat;
}

.card-image.courses {
    background: #FAFFE9 url('../images/college.png') center/contain no-repeat;
}

.card-image.monster {
    background: #FAFFE9 url('../images/lagoon.png') center/cover no-repeat;
}

.card-image.mi {
    background: url('../images/fuse-tile.jpg') center/cover no-repeat;
}

.card-image.stream {
    background: hsl(0deg, 0%, 50%) url('../images/stream.png') center/122% no-repeat;
}

.card-image.has-selector {
    background: #264de4 url('https://upload.wikimedia.org/wikipedia/commons/d/d5/CSS3_logo_and_wordmark.svg') center/60% no-repeat;
}

.card-image.players {
    background: #fff url('../images/cavs-net.webp') center/contain no-repeat;
}

.card-image.vacation {
    background: #fff url('../images/vacation.png') center/contain no-repeat;
}

.card-image.nba {
    background: url('../images/nbajamtile.png') center/cover no-repeat;
}

.card-image.library {
    background: url('../images/lib.png') top/cover no-repeat;
}

.card-image.turtle {
    background: #fff url('../images/tmnt2.jpg') center/contain no-repeat;
}

.card-image.tilt {
    background: #fff url('../images/cursor.png') 100%/contain no-repeat;
}

.card-image.subgrid {
    background: url('../images/sub.png') center/cover no-repeat;
}

.card-image.holygrail {
    background: linear-gradient(
        135deg,
        #f59e0b 0%,
        #fde047 25%,
        #fbbf24 50%,
        #f59e0b 75%,
        #fde047 100%
    );
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Entrance Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header animations */
header .back-link {
    animation: fadeUp 0.5s ease-out forwards;
    opacity: 0;
}

header h1 {
    animation: fadeUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

header .subtitle {
    animation: fadeUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

/* Card stagger - using CSS custom property for dynamic delays */
.grid .card {
    opacity: 0;
    animation: scaleIn 0.4s ease-out forwards;
}

/* Stagger cards in groups for visual rhythm */
.grid .card:nth-child(1) { animation-delay: 0.25s; }
.grid .card:nth-child(2) { animation-delay: 0.3s; }
.grid .card:nth-child(3) { animation-delay: 0.35s; }
.grid .card:nth-child(4) { animation-delay: 0.4s; }
.grid .card:nth-child(5) { animation-delay: 0.45s; }
.grid .card:nth-child(6) { animation-delay: 0.5s; }
.grid .card:nth-child(7) { animation-delay: 0.55s; }
.grid .card:nth-child(8) { animation-delay: 0.6s; }
.grid .card:nth-child(9) { animation-delay: 0.65s; }
.grid .card:nth-child(10) { animation-delay: 0.7s; }
.grid .card:nth-child(11) { animation-delay: 0.75s; }
.grid .card:nth-child(12) { animation-delay: 0.8s; }
.grid .card:nth-child(13) { animation-delay: 0.85s; }
.grid .card:nth-child(14) { animation-delay: 0.9s; }
.grid .card:nth-child(15) { animation-delay: 0.95s; }
.grid .card:nth-child(16) { animation-delay: 1s; }
.grid .card:nth-child(17) { animation-delay: 1.05s; }
.grid .card:nth-child(18) { animation-delay: 1.1s; }
.grid .card:nth-child(19) { animation-delay: 1.15s; }
.grid .card:nth-child(20) { animation-delay: 1.2s; }

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.5s ease-out 1.3s forwards;
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1.5rem;
    }
    
    .grid {
        padding: 1rem;
        gap: 1rem;
    }
    
    .card-image {
        height: 140px;
    }
}
