/* ========================================
   CSS Variables
======================================== */
:root {
    --color-bg-primary: #0a0a0a;
    --color-bg-secondary: #141414;
    --color-bg-tertiary: #1a1a1a;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-accent: #6366f1;
    --color-accent-hover: #8b5cf6;
    --color-border: rgba(255, 255, 255, 0.1);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   Typography
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
}

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

/* ========================================
   Navigation
======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    transition: var(--transition);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

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

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

.nav-resume {
    padding: 0.5rem 1.25rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 6px;
    color: var(--color-text-primary) !important;
}

.nav-resume:hover {
    background-color: var(--color-accent);
}

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

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

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    color: var(--color-text-primary);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Showreel Section
======================================== */
.showreel {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-primary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
    letter-spacing: -0.01em;
}

.video-featured {
    max-width: 1200px;
    margin: 0 auto;
}

.video-player {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.video-info {
    text-align: center;
    margin-top: var(--spacing-md);
}

.video-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.video-meta {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   Projects Grid
======================================== */
.projects {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.project-card {
    background-color: var(--color-bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.project-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
}

.project-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-video-preview iframe {
    width: 100%;
    height: 100%;
}

.project-card-video .project-overlay {
    opacity: 0;
    background: rgba(0, 0, 0, 0.85);
}

.project-card-video:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-thumbnail img {
    opacity: 0;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.view-project {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.lock-icon {
    font-size: 2rem;
    margin-right: var(--spacing-xs);
}

.project-info {
    padding: var(--spacing-md);
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.project-role {
    color: var(--color-accent);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

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

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-accent);
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-locked .project-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    flex-direction: column;
}

/* ========================================
   About Section
======================================== */
.about {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-primary);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-intro {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.about-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    color: var(--color-text-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.about-section {
    min-width: 0;
}

.about-section h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
    font-size: 1.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--spacing-sm);
}

.skill {
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.skill-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.shipped-titles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--spacing-sm);
}

.title-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: inline-block;
}

.title-badge:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.experience {
    margin-top: var(--spacing-sm);
}

.experience-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.experience-company {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    padding-left: 0;
}

.experience-date {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ========================================
   Contact Section
======================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-secondary);
    text-align: center;
}

.contact-intro {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.social-links-top .social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.social-links-top .social-link:hover {
    border-color: var(--color-accent);
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.social-links-top .social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.contact-form {
    background-color: var(--color-bg-tertiary);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.submit-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    color: var(--color-text-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-status {
    margin-top: var(--spacing-sm);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-status.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.social-links h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    font-size: 1.25rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.875rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.social-link svg {
    flex-shrink: 0;
}

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

/* ========================================
   Footer
======================================== */
.footer {
    padding: var(--spacing-md);
    text-align: center;
    background-color: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
}

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

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--color-bg-secondary);
        border-top: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-column {
        gap: var(--spacing-sm);
    }

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

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

    .social-links-top .social-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    .container,
    .container-narrow {
        padding: 0 1rem;
    }
}