/* ===========================
   Color Variables - Dark Mode
   =========================== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #0891b2;
    --secondary-light: #06b6d4;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #475569;
    --success: #10b981;
    --accent: #f97316;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Global Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ===========================
   Container & Utilities
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s ease-out;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.section-header {
    margin-bottom: 3rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5), 0 0 80px rgba(99, 102, 241, 0.2);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===========================
   Header & Navigation
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    animation: slideDown 0.6s ease-out;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInLeft 0.6s ease-out;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: translateX(0);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 0;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(12px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-12px);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.blob {
    position: absolute;
    opacity: 0.3;
    filter: blur(80px);
    mix-blend-mode: screen;
}

.blob-1 {
    top: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.blob-2 {
    bottom: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite 1s;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.hero-subtitle {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
    animation: fadeInDown 0.6s ease-out;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out 0.2s both;
    letter-spacing: -2px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    animation: bounce 1.5s ease-in-out infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
    animation: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
}

/* ===========================
   About Section
   =========================== */
.about {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--surface) 0%, transparent 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    animation: fadeInLeft 0.8s ease-out;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    animation: fadeInRight 0.8s ease-out;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%);
    border: 1px solid var(--border);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(8, 145, 178, 0.2) 100%);
}

.stat-1 { animation: slideUp 0.6s ease-out 0.2s both; }
.stat-2 { animation: slideUp 0.6s ease-out 0.3s both; }
.stat-3 { animation: slideUp 0.6s ease-out 0.4s both; }
.stat-4 { animation: slideUp 0.6s ease-out 0.5s both; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===========================
   Projects Section
   =========================== */
.projects {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
    animation: slideUp 0.6s ease-out both;
    display: flex;
    flex-direction: column;
}

.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }
.project-card:nth-child(4) { animation-delay: 0.3s; }
.project-card:nth-child(5) { animation-delay: 0.4s; }
.project-card:nth-child(6) { animation-delay: 0.5s; }

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    transition: var(--transition);
}

.gradient-1 { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }
.gradient-2 { background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%); }
.gradient-3 { background: linear-gradient(135deg, #ec4899 0%, #f97316 100%); }
.gradient-4 { background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%); }
.gradient-5 { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
.gradient-6 { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    flex-shrink: 0;
}

.project-card:hover .project-icon {
    opacity: 1;
    transform: translateX(10px);
}

.project-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
}

/* ===========================
   Skills Section
   =========================== */
.skills {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
    transition: var(--transition);
    animation: slideUp 0.6s ease-out both;
}

.skill-card:nth-child(1) { animation-delay: 0s; }
.skill-card:nth-child(2) { animation-delay: 0.1s; }
.skill-card:nth-child(3) { animation-delay: 0.2s; }
.skill-card:nth-child(4) { animation-delay: 0.3s; }

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.skill-category {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-item {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
    cursor: default;
}

.skill-item:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    animation: fadeInLeft 0.8s ease-out;
}

.contact-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 2.5rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(8, 145, 178, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(10px);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 1rem;
    animation: fadeInRight 0.8s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
    animation: slideUp 0.6s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.3s; }
.form-group:nth-child(3) { animation-delay: 0.4s; }

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(71, 85, 105, 0.2);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: var(--text-primary);
    border-radius: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(71, 85, 105, 0.3);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    padding: 3rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--surface);
        gap: 0;
        z-index: 999;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(71, 85, 105, 0.3);
        animation: slideDown 0.3s ease-out;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background: rgba(99, 102, 241, 0.1);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-content {
        justify-content: center;
        text-align: center;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }
}
