/* ========================================
   CSS Variables & Theme
   ======================================== */
:root {
    --bg: #0a0a0b;
    --bg-alt: #111113;
    --surface: #18181b;
    --border: #27272a;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f4f4f5;
    --surface: #ffffff;
    --border: #e4e4e7;
    --text: #18181b;
    --text-muted: #71717a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.8);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

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

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--surface);
    color: var(--text);
}

.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    position: relative;
}

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

.hero-greeting {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.separator {
    color: var(--primary);
    margin: 0 0.5rem;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
}

.btn-full {
    width: 100%;
}

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

.about-image {
    aspect-ratio: 4/5;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
}

.about-content .lead {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* About Hero (combined section) */
.about-hero {
    padding-top: 8rem;
}

.about-hero .hero-greeting {
    text-align: left;
    margin-bottom: 0.5rem;
}

.about-hero .hero-name {
    text-align: left;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.about-hero .hero-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-hero .hero-cta {
    justify-content: flex-start;
    margin-top: 2rem;
}

/* ========================================
   Skills
   ======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

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

.tools li {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg);
    border-radius: 100px;
    color: var(--text-muted);
}

/* ========================================
   Work Grid
   ======================================== */
.work-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.work-item {
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    transition: all var(--transition);
}

.work-item:hover {
    transform: translateY(-4px);
}

.work-item.hidden {
    display: none;
}

.work-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.play-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.play-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
}

.work-info {
    padding: 1.25rem;
}

.work-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.work-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text-muted);
    z-index: 10;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
}

.modal-video {
    background: #000;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

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

.video-container.instagram-embed {
    aspect-ratio: 9/16;
    max-height: 70vh;
    width: auto;
    margin: 0 auto;
}

.video-container.instagram-embed iframe {
    width: 100%;
    height: 100%;
}

.modal-details {
    padding: 2rem;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.meta-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-btn:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   Contact
   ======================================== */
.contact-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    margin-top: -1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.contact-item .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact-item a,
.contact-item span {
    font-size: 1.125rem;
}

.contact-item a:hover {
    color: var(--primary);
}

.socials {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.socials a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}

.socials a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.socials svg {
    width: 20px;
    height: 20px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

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

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

    .modal-details {
        max-height: 40vh;
    }

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

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .section {
        padding: 4rem 0;
    }

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

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

    .stats {
        gap: 1.5rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

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

    .work-filters {
        flex-wrap: wrap;
    }
}
