/* ===== CSS Variables ===== */
:root {
    --color-bg: #0a0a0f;
    --color-surface: #12121a;
    --color-surface-elevated: #1a1a25;
    --color-text: #f0f0f5;
    --color-text-muted: #8a8a9a;
    --color-accent: #6366f1;
    --color-accent-hover: #818cf8;
    --color-accent-glow: rgba(99, 102, 241, 0.3);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-subtle: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--color-accent-glow);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--color-text);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 8s ease-in-out infinite;
}

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

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    padding: 6px;
    background: var(--gradient-primary);
    animation: float 8s ease-in-out infinite;
    box-shadow: var(--shadow-glow);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-bg);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-surface-elevated);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-text);
}

/* ===== About Section ===== */
.about {
    background: var(--gradient-subtle);
}

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

.about-card {
    background: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-lg);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.about-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--color-bg);
}

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

.project-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-lg);
}

.project-image {
    aspect-ratio: 16 / 9;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    font-size: 4rem;
    opacity: 0.9;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.project-content {
    padding: 28px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.project-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 100px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

/* ===== Contact Section ===== */
.contact {
    background: var(--color-surface);
    text-align: center;
}

.contact-text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.25rem;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    background: var(--color-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero::before {
        width: 300px;
        height: 300px;
        right: -50px;
        top: 30%;
    }
    
    .hero-image-wrapper {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
    
    section {
        padding: 60px 0;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ===== Scroll Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .about-card,
    .project-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeUp 0.6s ease forwards;
    }
    
    .about-card:nth-child(1) { animation-delay: 0.1s; }
    .about-card:nth-child(2) { animation-delay: 0.2s; }
    .about-card:nth-child(3) { animation-delay: 0.3s; }
    .about-card:nth-child(4) { animation-delay: 0.4s; }
    
    .project-card:nth-child(1) { animation-delay: 0.1s; }
    .project-card:nth-child(2) { animation-delay: 0.2s; }
    .project-card:nth-child(3) { animation-delay: 0.3s; }
    .project-card:nth-child(4) { animation-delay: 0.4s; }
    
    @keyframes fadeUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
