/* ========================================
   MODERN DARK PORTFOLIO - GLOBAL STYLES
   ======================================== */

/* Import Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   CSS VARIABLES - DESIGN SYSTEM
   ======================================== */
:root {
    /* Colors */
    --primary-bg: #0A0F1A;
    --secondary-bg: #111827;
    --card-bg: #151A23;
    --accent-gradient-start: #2563EB;
    --accent-gradient-end: #3B82F6;
    --highlight-glow: #4F46E5;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --border-color: #1F2937;
    --hover-glow: rgba(59, 130, 246, 0.35);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --heading-large: 64px;
    --heading-medium: 48px;
    --card-title: 24px;
    --body-text: 16px;
    
    /* Spacing */
    --section-padding: 120px;
    --container-max: 1400px;
    
    /* Animation */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(36px, 5vw, var(--heading-large));
}

h2 {
    font-size: clamp(32px, 4vw, var(--heading-medium));
}

h3 {
    font-size: clamp(24px, 3vw, 36px);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ========================================
   LAYOUT CONTAINERS
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-smooth);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: rgba(21, 26, 35, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.navbar-menu a {
    font-weight: 500;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    transition: width var(--transition-fast);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.nav-cta {
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.5);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-gradient-end);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    transform: translateY(-3px);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gradient-end);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.2);
}

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

.card-glow {
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.2);
}

.card-glow:hover {
    box-shadow: 0 20px 80px rgba(37, 99, 235, 0.4);
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   GLASSMORPHISM
   ======================================== */
.glass {
    background: rgba(21, 26, 35, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   GRADIENT TEXT
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   ICONS
   ======================================== */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}

.icon-large {
    width: 48px;
    height: 48px;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.card:hover .icon-box {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    transform: scale(1.1) rotate(5deg);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 1s ease forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */
.bg-gradient-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
}

.blob-1 {
    background: var(--accent-gradient-start);
    top: -250px;
    right: -250px;
    animation: float 8s ease-in-out infinite;
}

.blob-2 {
    background: var(--highlight-glow);
    bottom: -250px;
    left: -250px;
    animation: float 10s ease-in-out infinite reverse;
}

/* ========================================
   SECTION HEADINGS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-nav a:hover {
    color: var(--accent-gradient-end);
    padding-left: 5px;
}

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

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(21, 26, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--border-color);
    }
    
    .navbar-menu.active {
        right: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    :root {
        --section-padding: 60px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.p-relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}
