/* 
 * GALAXY THEME - V4 (NEO-CYBER BENTO)
 */

:root {
    /* CORE PALETTE - Deep Space & Neon */
    --bg-deep: #050505;
    --bg-surface: #0a0a0a;
    --primary: #58c4dc;     /* Cyber Cyan */
    --secondary: #bd00ff;   /* Neon Purple */
    --accent: #ffffff;
    --text-main: #ffffff;
    --text-muted: #888888;
    
    /* GLASS & BORDERS */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-radius: 24px;
    --card-padding: 30px;

    /* FONTS */
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* BACKGROUND GRID */
.galaxy-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* CURSOR GLOW EFFECT */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 196, 220, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.3s;
}

/* TWINKLING STARS */
.stars-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: var(--opacity); transform: scale(1); }
}

/* --- CONTAINER --- */
.container {
    max-width: 1280px;
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BENTO GRID SYSTEM --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 24px;
    margin-bottom: 40px;
}

/* COLUMN SPANS - CRITICAL! */
.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }
.row-span-2 { grid-row: span 2; }

/* BENTO CARD (Spotlight) */
.bento-card {
    background: rgba(20, 20, 22, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(40px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.bento-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y), 
        rgba(255, 255, 255, 0.08), 
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover::before {
    opacity: 1;
}
.bento-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* PROJECT CARD - Border Beam */
.project-card {
    position: relative;
    border-radius: 24px;
    background: transparent;
    padding: 1px;
}

.project-card-inner {
    background: #0a0a0a;
    border-radius: 23px;
    overflow: hidden;
    height: 100%;
}

/* Animated Border Beam */
.border-beam {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: conic-gradient(
        from var(--beam-angle, 0deg),
        transparent 0%,
        transparent 75%,
        #bd00ff 85%,
        #ffee00 95%,
        transparent 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.2;
    animation: beamRotate 4s linear infinite;
}

@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes beamRotate {
    to {
        --beam-angle: 360deg;
    }
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- NAVBAR (Floating Pill) --- */
.nav-wrapper {
    position: fixed;
    top: 30px;
    left: 0; width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.floating-nav {
    pointer-events: auto;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: 0.3s;
}

.nav-link:hover, .nav-link.active {
    background: #fff;
    color: #000;
}

/* --- SECTIONS --- */
section, .section {
    padding: 30px 0;
}

/* --- HERO --- */
.hero-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.profile-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(88, 196, 220, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
}

/* --- TAGS --- */
.tech-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    margin-right: 8px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* --- SKILLS SECTION (Premium) --- */
.skills-header {
    text-align: center;
    margin-bottom: 50px;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-category {
    background: rgba(20, 20, 22, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s, border-color 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.category-header i {
    font-size: 1.5rem;
}

.category-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: skillFloat 0.6s ease forwards, skillPulse 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + 0.6s);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
}

/* Animated gradient border */
.skill-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--skill-color), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-item:hover::before {
    opacity: 1;
}

/* Shimmer effect on hover */
.skill-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255,255,255,0.1) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: none;
}

.skill-item:hover::after {
    animation: shimmer 0.6s ease;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

@keyframes skillFloat {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes skillPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 transparent;
    }
    50% { 
        box-shadow: 0 5px 20px -5px rgba(88, 196, 220, 0.15);
    }
}

.skill-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--skill-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 35px -10px rgba(0, 0, 0, 0.5),
        0 0 20px -5px var(--skill-color);
}

.skill-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.skill-icon-wrapper i {
    font-size: 1.4rem;
    color: var(--skill-color);
    transition: all 0.3s;
    filter: drop-shadow(0 0 5px var(--skill-color));
}

.skill-item:hover .skill-icon-wrapper {
    background: var(--skill-color);
    box-shadow: 
        0 0 25px var(--skill-color),
        inset 0 0 15px rgba(255,255,255,0.3);
    transform: rotate(10deg) scale(1.1);
}

.skill-item:hover .skill-icon-wrapper i {
    color: #000;
    filter: none;
    transform: scale(1.1);
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

/* Skills Responsive */
@media (max-width: 900px) {
    .skills-categories {
        grid-template-columns: 1fr;
    }
}

/* --- SOCIAL ICONS --- */
.social-icon {
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.social-icon:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* --- ANIMATIONS --- */
.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================= */
/* === RESPONSIVE MEDIA QUERIES === */
/* ========================================= */

@media (max-width: 1024px) {
    .container { width: 95%; }
    .bento-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 Columns on Tablet */
    }
    
    /* Adjust Spans for Tablet */
    .col-span-12 { grid-column: span 6 !important; }
    .col-span-8 { grid-column: span 6 !important; }
    .col-span-6 { grid-column: span 6 !important; }
    .col-span-4 { grid-column: span 3 !important; }
    .col-span-3 { grid-column: span 3 !important; }
    
    .tablet-col-1 { grid-column: span 2 !important; }
}

@media (max-width: 768px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .bento-card {
        padding: 24px;
        min-height: auto !important;
    }
    
    .hero-wrapper {
        padding-top: 80px;
        min-height: auto;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    /* Mobile Nav at Bottom */
    .nav-wrapper {
        top: auto;
        bottom: 20px;
    }
    
    .floating-nav {
        width: 92%;
        justify-content: space-around;
        padding: 8px 10px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .section {
        padding: 60px 0;
    }
}
