/* CSS Variables & Theme Setup */
:root {
    --bg-main: #050507;
    --bg-secondary: #0d0d12;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #f8f9fa;
    --text-secondary: #a1a1aa;
    
    --accent-primary: #ffffff;
    --accent-secondary: #2563eb;
    --gradient-accent: linear-gradient(135deg, var(--accent-secondary), #8b5cf6);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

::selection {
    background: var(--accent-primary);
    color: white;
}

/* Custom Cursor */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    transition: transform 0.1s ease-out;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent-secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Layout Utilities */
section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.separator {
    height: 4px;
    width: 60px;
    background: var(--gradient-accent);
    margin: 0 auto;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-inline: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.hero-bg-elements {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.sphere {
    position: absolute;
    top: 20%; right: 15%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(0,0,0,0));
    filter: blur(40px);
    animation: float 8s ease-in-out infinite;
}

.cube {
    position: absolute;
    bottom: 20%; left: 10%;
    width: 200px; height: 200px;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.1), rgba(0,0,0,0));
    filter: blur(40px);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

/* Portfolio Section */
.portfolio {
    background-color: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.portfolio-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 20px rgba(37, 99, 235, 0.1);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.portfolio-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(5,5,7,0.9) 0%, rgba(5,5,7,0) 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .card-overlay {
    transform: translateY(0);
    opacity: 1;
}

.card-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.card-overlay p {
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

.coming-soon-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.contact-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-secondary);
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    background: var(--gradient-accent);
    color: white;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-secondary);
}

.contact-link:hover {
    color: var(--accent-primary);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(5, 5, 7, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        left: 0;
    }
    
    .card-overlay {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(5,5,7,0.95) 0%, rgba(5,5,7,0.4) 100%);
    }
}
