/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    /* Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2937;

    --text-primary: #e6edf3;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);

    --border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 120px;

    /* Typography */
    --font-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(to bottom, #0d1117 0%, #0f1729 30%, #1a1535 70%, #0d1117 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.1), transparent 50%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    animation: meshMove 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 70% 20%, rgba(167, 139, 250, 0.12), transparent 35%),
        radial-gradient(circle at 30% 80%, rgba(96, 165, 250, 0.12), transparent 35%);
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
    animation: meshMove 25s ease-in-out infinite reverse;
}

body>* {
    position: relative;
    z-index: 1;
}

@keyframes meshMove {

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

    33% {
        transform: translate(3%, -3%) scale(1.05);
    }

    66% {
        transform: translate(-3%, 3%) scale(0.95);
    }
}

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

ul {
    list-style: none;
}

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

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

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.nav-cta {
    padding: 0.6rem 1.5rem;
    background: var(--accent-blue);
    color: white !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-label {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

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

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* ==========================================
   MANIFESTO SECTION
   ========================================== */
.manifesto {
    background: linear-gradient(135deg, #0a0e1a 0%, #0f1729 50%, #1a1535 100%);
    background-image:
        linear-gradient(135deg, #0a0e1a 0%, #0f1729 50%, #1a1535 100%),
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: auto, 50px 50px, 50px 50px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    /* Apple-style scroll fade effect */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    will-change: opacity, transform;
}

.manifesto::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.08) 40%, transparent 70%);
    pointer-events: none;
    filter: blur(60px);
}

.manifesto-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.manifesto-headline {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.manifesto-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.manifesto-text .highlight {
    background: rgba(59, 130, 246, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.manifesto-right .btn-primary {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.manifesto-right .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ==========================================
   PROJECTS
   ========================================== */
.projects {
    display: grid;
    gap: 4rem;
}

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.project:nth-child(even) .project-visual {
    order: 2;
}

.project:nth-child(even) .project-info {
    order: 1;
}

.project-visual {
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    position: relative;
}

.project-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: var(--accent-gradient);
    filter: blur(80px);
    opacity: 0.3;
}

.project-category {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    letter-spacing: -0.02em;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.project-tags span {
    padding: 0.4rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================
   ABOUT
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

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

.skills h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.skills-list span {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s;
}

.skills-list span:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

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

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

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

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s;
    background: var(--bg-secondary);
    padding: 0 0.5rem;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -0.5rem;
    font-size: 0.85rem;
    color: var(--accent-blue);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    margin-top: var(--section-padding);
}

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

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

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ==========================================
   MOBILE MENU
   ========================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .project {
        gap: 2rem;
    }

    .about-grid {
        gap: 3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        font-size: 1.125rem;
        padding: 0.75rem 0;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }

    /* Hero */
    .hero {
        min-height: 90vh;
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-desc {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Section titles */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Manifesto */
    .manifesto {
        padding: 60px 0;
    }

    .manifesto-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .manifesto-headline {
        font-size: 2.5rem;
    }

    .manifesto-text {
        font-size: 1rem;
    }

    /* Projects */
    .projects {
        gap: 3rem;
    }

    .project {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project:nth-child(even) .project-visual {
        order: 1;
    }

    .project:nth-child(even) .project-info {
        order: 2;
    }

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

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text p {
        font-size: 1rem;
    }

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

    /* Contact */
    .contact-desc {
        font-size: 1rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-label {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .manifesto-headline {
        font-size: 2rem;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }
}