/* =============================================
   DESIGN SYSTEM — Apple WWDC Bento Grid Style (Light)
   ============================================= */

:root {
    /* Color Palette — Clean, minimal, light Apple-inspired */
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);

    /* Accent gradients for bento cards */
    --gradient-blue: linear-gradient(135deg, #2563eb, #7c3aed);
    --gradient-purple: linear-gradient(135deg, #9333ea, #ec4899);
    --gradient-orange: linear-gradient(135deg, #f97316, #ef4444);
    --gradient-teal: linear-gradient(135deg, #14b8a6, #3b82f6);
    --gradient-warm: linear-gradient(135deg, #fbbf24, #f97316);

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --grid-gap: 16px;
    --section-padding: 120px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* =============================================
   LAYOUT
   ============================================= */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-subheading {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 3.5rem;
    font-weight: 400;
}

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

#navbar.scrolled {
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    position: relative;
}

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

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

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

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 80px;
    position: relative;
    overflow: hidden;
}

/* Subtle ambient gradient behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #1d1d1f 30%, #6e6e73 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title em {
    -webkit-text-fill-color: transparent;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    font-style: normal;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

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

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 980px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    letter-spacing: -0.01em;
}

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

.btn-primary:hover {
    background: #3a3a3c;
    transform: scale(1.03);
}

.btn-full {
    width: 100%;
}

/* =============================================
   BENTO GRID — Featured Work
   ============================================= */
.work-section {
    padding: var(--section-padding) 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}

/* Card Sizes */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-medium {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-vertical {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Base Card Style */
.bento-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s var(--ease-out);
    cursor: default;
}

.bento-card:hover {
    transform: scale(1.01);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}


/* =============================================
   CAROUSEL — Inside Bento Cards
   ============================================= */
.bento-carousel {
    position: absolute;
    inset: 0;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
}

.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
}

/* Arrow Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #1d1d1f;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 14px;
}

.carousel-next {
    right: 14px;
}

.bento-card:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.08);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dot Indicators */
.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-card:hover .carousel-dots {
    opacity: 1;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.carousel-dot.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Overlay with project info — pointer-events: none so carousel buttons work */
.bento-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    pointer-events: none;
}

.bento-overlay h3,
.bento-overlay p,
.bento-overlay .bento-tags {
    pointer-events: auto;
}

.bento-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: #fff;
}



.bento-overlay p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    max-width: 400px;
}

/* Tags */
.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.bento-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    color: #fff;
}

/* Bento Large min-height */
.bento-large,
.bento-vertical {
    min-height: 480px;
}

.bento-medium {
    min-height: 300px;
}

/* =============================================
   BENTO — Skills Card
   ============================================= */
.bento-skills {
    background: var(--bg-card);
}

.bento-card-inner {
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-skills h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pills span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 980px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.skill-pills span:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.skill-pills span i {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =============================================
   BENTO — Stats Card
   ============================================= */
.bento-stats {
    background: var(--bg-card);
}

.bento-stats .bento-card-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
    padding: var(--section-padding) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text .section-heading {
    margin-bottom: 2rem;
}

.about-body {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.about-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 120px;
}

.about-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.about-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.about-card-content span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
    padding: var(--section-padding) 0 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(0, 0, 0, 0.04);
}

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

/* Contact Info Card */
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.contact-info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    transition: all 0.25s var(--ease-out);
}

.social-card:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.social-card i {
    font-size: 1.2rem;
    color: var(--text-secondary);
    width: 24px;
    text-align: center;
}

.social-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* =============================================
   ANIMATIONS
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 360px;
    }

    .bento-medium {
        grid-column: span 1;
        min-height: 280px;
    }

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

    .about-card {
        position: static;
    }

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

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
        --grid-gap: 12px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(250, 250, 250, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

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

    .bento-large,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-large {
        min-height: 320px;
    }

    .bento-medium {
        min-height: 260px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-description {
        font-size: 1.05rem;
    }

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

    .bento-overlay h3 {
        font-size: 1.25rem;
    }

    .bento-overlay p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 16px;
    }

    .section-container {
        padding: 0 16px;
    }

    .stat-number {
        font-size: 2rem;
    }
}