@charset "UTF-8";

/* ==========================================================================
   CSS Variables & Theme
   ========================================================================== */
:root {
    /* Slightly warmer dark theme for familiarity */
    --nav-bg: rgba(15, 17, 21, 0.9);
    --nav-bg-scrolled: rgba(15, 17, 21, 0.95);
    --shadow-scrolled: 0 4px 20px rgba(0, 0, 0, 0.5);

    --bg-main: #0f1115;
    --bg-surface: #1a1d24;
    --bg-elevated: #242831;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --accent: #3b82f6;
    /* Classic reliable blue */
    --accent-hover: #2563eb;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition-fast: all 0.2s ease-in-out;
    --transition-slow: all 0.5s ease;

    --container-width: 1200px;
}

[data-theme="light"] {
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
    --shadow-scrolled: 0 4px 20px rgba(0, 0, 0, 0.1);

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --text-primary: #0f1115;
    --text-muted: #64748b;
}

[data-theme="light"] .hamburger .line {
    background: #0f1115;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.text-accent {
    color: var(--accent);
}

.pt-120 {
    padding-top: 100px;
}

.pb-120 {
    padding-bottom: 100px;
}

.mt-8 {
    margin-top: 2rem;
}

.section-dark {
    background-color: var(--bg-surface);
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* ==========================================================================
   Buttons (Familiar & Obvious)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 12px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

/* ==========================================================================
   Navigation & Language Switcher
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: var(--shadow-scrolled);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.lang-switch {
    display: flex;
    gap: 8px;
    background: var(--bg-surface);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    transition: var(--transition-fast);
}

.theme-btn:hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .line {
    width: 30px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

#matrixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    /* Subtle matrix effect */
    pointer-events: none;
}

[data-theme="light"] #matrixCanvas {
    opacity: 0.15;
    /* Even more subtle on light bg */
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 40px;
}

/* ==========================================================================
   Bento Grid Section
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 20px;
    perspective: 1000px;
}

.col-span-1 {
    grid-column: span 1;
}

.col-span-2 {
    grid-column: span 2;
}

.row-span-2 {
    grid-row: span 2;
}

.bento-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.bento-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.bento-inner {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-profile {
    padding: 0;
    justify-content: space-between;
}

.profile-img-container {
    width: 100%;
    height: 60%;
    overflow: hidden;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.bento-card:hover .profile-img-container img {
    transform: scale(1.05);
}

.profile-content {
    padding: 32px;
}

.bento-icon {
    font-size: 1.75rem;
    color: var(--accent);
    margin-bottom: auto;
}

.bento-card h3 {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    margin-bottom: 8px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.bento-stat {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.bento-stat .bento-inner {
    justify-content: center;
    align-items: center;
}

.stat-num {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-primary);
    display: inline-block;
}

.bento-stat span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* ==========================================================================
   Floating Phone Widget
   ========================================================================== */
.floating-phone {
    display: none;
    /* Desktopda ko'rinmaydi */
}

@keyframes phone-shake {

    0%,
    10%,
    20%,
    30%,
    100% {
        transform: rotate(0deg);
    }

    5%,
    15%,
    25% {
        transform: rotate(20deg);
    }

    10%,
    20% {
        transform: rotate(-20deg);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* ==========================================================================
   Work / Projects Section
   ========================================================================== */
.work-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: var(--radius-full, 30px);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    transition: var(--transition-slow);
    perspective: 1200px;
}

.work-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.work-card.hide {
    display: none;
}

.work-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.work-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-card:hover .work-img {
    transform: scale(1.05);
}

.mobile-showcase-bg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-img-mobile {
    width: auto;
    height: 90%;
    object-fit: contain;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

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

.work-info {
    flex: 1;
}

.work-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.work-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.work-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.work-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-text .contact-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    flex-direction: column;
}

.contact-method strong {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-method span {
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.strict-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.strict-form .form-group {
    margin-bottom: 20px;
}

.strict-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.strict-form input,
.strict-form textarea {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

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

.strict-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.strict-footer {
    padding: 40px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

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

/* ==========================================================================
   Tech Stack Ticker
   ========================================================================== */
.tech-stack-ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.ticker-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-item i {
    font-size: 1.4rem;
    color: var(--text-primary);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 20px));
    }
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

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

#lightbox-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.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: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .strict-form .form-row {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 5%;
        border-bottom: 1px solid var(--border-color);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        margin-bottom: 24px;
    }

    .floating-phone {
        display: flex;
        position: fixed;
        bottom: 25px;
        right: 25px;
        width: 60px;
        height: 60px;
        background-color: #10b981;
        color: #fff;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        z-index: 9999;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
        text-decoration: none;
        animation: phone-shake 2.5s infinite;
    }

    .floating-phone::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: #10b981;
        z-index: -1;
        animation: pulse-ring 2s ease-out infinite;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}