:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --accent: #a78bfa;
    --accent-dim: #8b5cf6;
    --accent-soft: #e9d5ff;
    --border: #e5e5e5;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-hover: rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Floating orbs background */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #a78bfa, #c4b5fd);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #fbbf24, #fde68a);
    bottom: -250px;
    left: -250px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f472b6, #fbb6ce);
    top: 50%;
    right: 10%;
    animation-delay: 14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.9);
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12rem 2rem 8rem;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    width: fit-content;
    box-shadow: 0 2px 8px var(--shadow);
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -3px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    font-weight: 400;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow-hover);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Section */
section {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem;
    z-index: 1;
}

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

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent-soft);
    border-radius: 100px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 16px 48px var(--shadow-hover);
}

.project-card:hover::before {
    opacity: 0.5;
}

.project-card>* {
    position: relative;
    z-index: 1;
}

.project-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-soft);
    border-radius: 100px;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

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

.tag {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-dim);
}

/* Contact Section */
.contact-wrapper {
    padding: 4rem 0;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    opacity: 0.3;
}

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

    to {
        transform: rotate(360deg);
    }
}

.contact-card>* {
    position: relative;
    z-index: 1;
}

.contact-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
}

.contact-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    background: var(--bg-secondary);
}

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

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

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

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Project Detail Page Specific Styles */
.project-hero {
    padding-top: 8rem;
    padding-bottom: 1rem;
    text-align: center;
}

.project-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.project-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.project-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    letter-spacing: -1px;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    letter-spacing: -0.5px;
}

.project-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-content ul,
.project-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.project-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.project-image {
    width: 100%;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 8px 32px var(--shadow);
    border: 1px solid var(--border);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-stack {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: var(--accent);
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
    }

    .hero {
        padding: 10rem 1.5rem 6rem;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 3rem 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .orb {
        display: none;
    }

    .project-content {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--accent-soft);
    color: var(--accent-dim);
}
