 /* ================================
   Professional IT Portfolio CSS v2.0
   Clean • Optimized • Modern UI
================================ */

/* Root Variables */
:root {
    --primary: #004aad;
    --secondary: #00c6ff;
    --accent: #00f2fe;

    --text-dark: #0a192f;
    --text-light: #8892b0;

    --bg-dark: #020c1b;
    --bg-light: #0a192f;

    --glass-bg: rgba(17, 34, 64, 0.7);
    --glass-border: rgba(100, 255, 255, 0.1);

    --shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-light));
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   HEADER
================================ */
.header {
    position: relative;
    text-align: center;
    padding: 80px 20px;
    overflow: hidden;

    background: linear-gradient(135deg, var(--primary), #0066ff);
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    display: block;

    background:
        radial-gradient(circle at 10% 20%, rgba(0,198,255,0.15), transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(0,242,254,0.15), transparent 25%);

    animation: pulse 4s ease-in-out infinite;
}

.header-content {
    position: relative;
    z-index: 2;
}

/* Gradient Heading */
.gradient-text {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;

    background: linear-gradient(90deg, #ffffff, #a8ff78);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: fadeInDown 1s ease-out;
}

.tagline {
    margin-top: 10px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.9);

    animation: fadeInUp 1s ease-out 0.3s both;
}

/* ================================
   SECTIONS
================================ */
.section {
    padding: 100px 20px;
}

.container {
    max-width: 1400px;
    margin: auto;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #ffffff;
    margin-bottom: 25px;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 15px auto;

    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

/* ================================
   ABOUT (GLASS EFFECT)
================================ */
.about {
    background: rgba(17, 34, 64, 0.9); /* fallback */
    backdrop-filter: blur(10px);

    border-bottom: 1px solid var(--glass-border);
}

/* ================================
   GALLERY (MASONRY GRID)
================================ */
.masonry-grid {
    display: grid;
    gap: 25px;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
}

/* Card */
.grid-item {
    position: relative;
    overflow: hidden;

    border-radius: 12px;
    background: var(--glass-bg);
    box-shadow: var(--shadow);

    transition: var(--transition);
    transform: translateZ(0); /* GPU acceleration */
}

.grid-item:hover {
    transform: translateY(-8px);
}

/* Image */
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transition: transform 0.4s ease;
    will-change: transform;
}

/* Hover Zoom */
.grid-item:hover img {
    transform: scale(1.1);
}

/* Loading Skeleton */
.grid-item img.loading {
    background: linear-gradient(
        90deg,
        #0a192f 25%,
        #112240 50%,
        #0a192f 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 20px;

    background: linear-gradient(to top, rgba(10,25,47,0.9), transparent);
    opacity: 0;

    transition: var(--transition);
}

.grid-item:hover .overlay {
    opacity: 1;
}

.overlay-text {
    color: #ffffff;
    transform: translateY(20px);

    transition: var(--transition);
}

.grid-item:hover .overlay-text {
    transform: translateY(0);
}

/* ================================
   FOOTER
================================ */
.footer {
    text-align: center;
    padding: 40px;
}

/* ================================
   ANIMATIONS
================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* FIXED loading animation */
@keyframes loading {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 768px) {
    .section {
        padding: 60px 20px;
    }

    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-auto-rows: 200px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }
}

/* ================================
   ACCESSIBILITY
================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}