/* MegaStar Design System */

:root {
    /* Color Palette */
    --bg-base: #050505;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    --accent-primary: #00f0ff; /* Neon Cyan */
    --accent-secondary: #7000ff; /* Deep Neon Purple */
    --accent-tertiary: #ff003c; /* Cyber Red */
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout */
    --nav-height: 80px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Globals & Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.text-center { text-align: center; }
.inline-block { display: inline-block; }
.mt-5 { margin-top: 5rem; }

/* Background Ambience */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    bottom: -100px;
    left: -200px;
    animation-delay: -10s;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-logo {
    height: 32px;
    width: auto;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0%; height: 2px;
    background: var(--accent-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
    flex-direction: column;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Typography Enhancements */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 2px var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--glass-border);
}

.btn-outline:hover {
    box-shadow: inset 0 0 0 1px var(--text-primary);
    background: var(--bg-surface);
}

/* Specific Sections */

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.pill-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 50px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Abstract Graphic in Hero (The Cube) */
.hero-graphic {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    perspective: 1000px;
    z-index: 1;
    pointer-events: none;
}

.nano-banana-cube {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -100px;
    margin-top: -100px;
    transform-style: preserve-3d;
    animation: rotate-cube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid var(--accent-primary);
    background: rgba(112, 0, 255, 0.1);
    backdrop-filter: blur(5px);
}

.cube-face.front  { transform: rotateY(  0deg) translateZ(100px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right  { transform: rotateY( 90deg) translateZ(100px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top    { transform: rotateX( 90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    letter-spacing: -1px;
}

/* Works */
.category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 0, 60, 0.1);
    color: var(--accent-tertiary);
    border: 1px solid rgba(255, 0, 60, 0.3);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.project-card {
    display: block;
    padding: 0;
    overflow: hidden;
}

.project-image {
    height: 250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-base);
    opacity: 0.2;
    transition: var(--transition-smooth);
}

.project-card:hover .project-image::after {
    opacity: 0;
}

.project-placeholder {
    font-size: 4rem;
    transition: var(--transition-smooth);
}

.project-card:hover .project-placeholder {
    transform: scale(1.2);
}

.project-info {
    padding: 2rem;
}

.tech-stack {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-family: var(--font-heading);
}

/* Contact */
.contact-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.contact-box {
    padding: 3rem;
    display: inline-block;
}

.email-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.mail-icon {
    font-size: 2.5rem;
}

.email-address {
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.contact-box:hover .email-address {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations Core */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Keyframes */
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}

@keyframes rotate-cube {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 3.5rem; }
    .hero-graphic { opacity: 0.3; right: -10vw; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-base);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition-smooth);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title { font-size: 2.8rem; }
    .hero-actions { flex-direction: column; }
    .email-wrapper { font-size: 1.2rem; flex-direction: column; }
    .contact-box { padding: 2rem; width: 100%; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
}
