/* ================== Reset & Basics ================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.05), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05), transparent 40%),
        var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.45s ease, color 0.45s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    color: var(--link-color);
    margin-bottom: 1rem;
    font-weight: 800;
    text-align: center;
}

/* ================== Container ================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem 1.5rem;
}

/* ================== Accessibility ================== */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .skills-logos a,
    .btn {
        transition: none !important;
        animation: none !important;
    }
}

/* ================== Scroll Animations ================== */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: 
        opacity 0.8s var(--ease-out-expo), 
        transform 0.8s var(--ease-out-expo);
    will-change: transform, opacity;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered entry for grids */
.skills-logos > .reveal,
.projects-grid > .reveal {
    transition-delay: calc(var(--reveal-index, 0) * 0.1s);
}

/* Automatic child delays (up to 12 items) */
.skills-logos a:nth-child(1) { --reveal-index: 1; }
.skills-logos a:nth-child(2) { --reveal-index: 2; }
.skills-logos a:nth-child(3) { --reveal-index: 3; }
.skills-logos a:nth-child(4) { --reveal-index: 4; }
.skills-logos a:nth-child(5) { --reveal-index: 5; }
.skills-logos a:nth-child(6) { --reveal-index: 6; }
.skills-logos a:nth-child(7) { --reveal-index: 7; }
.skills-logos a:nth-child(8) { --reveal-index: 8; }
.skills-logos a:nth-child(9) { --reveal-index: 9; }
.skills-logos a:nth-child(10) { --reveal-index: 10; }
.skills-logos a:nth-child(11) { --reveal-index: 11; }
.skills-logos a:nth-child(12) { --reveal-index: 12; }

.projects-grid article:nth-child(1) { --reveal-index: 1; }
.projects-grid article:nth-child(2) { --reveal-index: 2; }
.projects-grid article:nth-child(3) { --reveal-index: 3; }
.projects-grid article:nth-child(4) { --reveal-index: 4; }


