/* Base Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #030303;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent-1: #ff2a5f; /* Crimson */
    --accent-2: #8a2be2; /* Deep Purple */
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

/* Ambient Background Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.glow-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
}

.glow-2 {
    top: 40%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    animation-delay: -5s;
}

.glow-3 {
    bottom: -20%; left: 20%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, #00d2ff 0%, transparent 70%);
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Typography & Utilities */
h1 { font-size: clamp(3rem, 6vw, 5rem); letter-spacing: -2px; line-height: 1.1; margin-bottom: 24px; font-weight: 800;}
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -1px; margin-bottom: 16px; font-weight: 700;}
p { color: var(--text-muted); line-height: 1.6; font-size: 1.1rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation - Glassmorphism */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(3, 3, 3, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }

.nav-links { display: flex; list-style: none; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-1); }

/* Buttons */
.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,0.1); }

.btn-primary {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255,255,255,0.4);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 0;
}

.hero-content { max-width: 800px; }
.hero-content p { margin-bottom: 40px; font-size: 1.25rem;}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-1);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

/* Apps Showcase (Collectible Cards) */
.apps-section { padding: 100px 5%; max-width: 1400px; margin: 0 auto; position: relative; z-index: 10;}
.section-heading { text-align: center; margin-bottom: 80px; }

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Spotlight Card Effect (GitHub/Vercel style) */
.app-card {
    background: rgba(20, 20, 20, 0.4);
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.app-card::before, .app-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 500ms ease;
    pointer-events: none;
}

/* The hover glow effect inside the card */
.app-card::before {
    background: radial-gradient(
        800px circle at var(--mouse-x) var(--mouse-y), 
        rgba(255, 255, 255, 0.06),
        transparent 40%
    );
    z-index: 3;
}

/* The gradient border effect */
.app-card::after {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y), 
        rgba(255, 255, 255, 0.4),
        transparent 40%
    );
    z-index: 1;
}

.app-card:hover::before, .app-card:hover::after { opacity: 1; }

/* The actual border mask */
.card-border {
    position: absolute;
    inset: 1px;
    background: rgba(15, 15, 15, 0.8);
    border-radius: 23px; /* Slightly smaller than outer border */
    z-index: 2;
}

/* The content inside the card */
.card-content {
    position: relative;
    z-index: 4;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.card-content h3 { font-size: 1.4rem; margin-bottom: 12px; font-weight: 600;}
.card-content p { font-size: 0.95rem; color: #a1a1aa; flex-grow: 1;}

/* Footer */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

/* JS Fade Utility */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content p { font-size: 1.1rem; }
}