/* =========================================
   DESIGN SYSTEM & VARIABLES
   ========================================= */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0a0a0c;
    --bg-secondary: #121217;
    --bg-accent: rgba(255, 255, 255, 0.03);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing & Layout */
    --max-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 8rem;
    
    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides */
html[data-theme='light'] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: rgba(0, 0, 0, 0.03);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --border-color: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Noise overlay for texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

.bg-alt {
    background-color: var(--bg-secondary);
}

.section {
    padding: var(--spacing-xxl) 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.text-left {
    text-align: left;
    margin: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--text-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-accent);
}

.w-full {
    width: 100%;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.icon-btn:hover {
    background: var(--bg-accent);
    border-color: var(--text-primary);
}

/* =========================================
   NAVIGATION (FLOATING PILL)
   ========================================= */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition);
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.navbar.scrolled {
    background: rgba(10, 10, 12, 0.8);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    border-color: rgba(99, 102, 241, 0.3); /* subtle accent glow */
    width: 85%;
}

html[data-theme='light'] .navbar {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.05);
}

html[data-theme='light'] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px; /* Slightly rounded square */
    transform: rotate(-10deg);
    transition: transform var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(0deg) scale(1.1);
}

.logo-icon i {
    width: 18px;
    height: 18px;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

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

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-only {
    display: none;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    padding: var(--spacing-lg) 0;
    gap: 1.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl) 5%;
    overflow: hidden;
}

/* Glowing Background Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 10%;
    left: -50px;
    animation-delay: -5s;
}

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

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    background: var(--bg-accent);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.stat-num {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-body {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-tags li {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

/* =========================================
   WORK SECTION
   ========================================= */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-secondary);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.project-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-desc {
    color: var(--text-secondary);
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 4rem;
    border-radius: var(--radius-lg);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* =========================================
   ABOUT SECTION (BENTO BOX)
   ========================================= */
.about-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.bento-sidebar {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.about-image-wrapper {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    margin: 0 auto;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.info-row i {
    color: var(--accent-primary);
    width: 18px;
    height: 18px;
}

.bento-timeline {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
}

.bento-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.bento-title i {
    color: var(--accent-primary);
}

.bento-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Timeline specific styles */
.timeline {
    list-style: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline li {
    position: relative;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    z-index: 1;
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content h4 {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

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

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
    }

    .about-bento {
        grid-template-columns: 1fr 1fr;
    }
    
    .bento-sidebar {
        grid-column: 1 / 3;
        grid-row: auto;
        flex-direction: row;
        text-align: left;
    }
    
    .sidebar-info {
        justify-content: center;
        align-items: flex-start;
    }
    
    .info-row {
        justify-content: flex-start;
    }
    
    .bento-timeline {
        grid-column: 1 / 3;
    }
}

@media (max-width: 768px) {
    .about-bento {
        grid-template-columns: 1fr;
    }
    
    .bento-sidebar {
        grid-column: 1 / 2;
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar-info {
        align-items: center;
    }
    
    .info-row {
        justify-content: center;
    }
    
    .bento-timeline {
        grid-column: 1 / 2;
    }
    
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    .nav-links { display: none; }
    
    .stats-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 4rem 5%;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }
    
    .hero-actions {
        flex-direction: column;
    }
}
