:root {
    --bg: #0b0f14;
    --bg-alt: #0f141a;
    --text: #e6edf3;
    --muted: #9fb0c0;
    --brand: #6ee7ff;
    --brand-2: #a78bfa;
    --accent: #22d3ee;
    --card: #111826;
    --border: #1f2a37;
    --shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

:root.light {
    --bg: #f7fafc;
    --bg-alt: #ffffff;
    --text: #111827;
    --muted: #4b5563;
    --brand: #0ea5e9;
    --brand-2: #7c3aed;
    --accent: #0284c7;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 10% -10%, rgba(34, 211, 238, .15), transparent 40%),
    radial-gradient(1200px 800px at 100% 0%, rgba(167, 139, 250, .12), transparent 40%),
    var(--bg);
    line-height: 1.6;
}

.container {
    width: min(1100px, 92%);
    margin-inline: auto;
}

.container.narrow {
    width: min(850px, 92%);
}

.section {
    padding: 80px 0;
}

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

.section h2 {
    font-size: 32px;
    margin: 0 0 24px;
    letter-spacing: .2px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(12px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.brand .logo {
    font-family: "Fira Code", monospace;
    color: var(--brand);
    border: 1px solid var(--border);
    padding: 3px 6px;
    border-radius: 8px;
    background: var(--card);
}

.brand-text {
    letter-spacing: .3px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-list a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

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

.nav-toggle {
    display: none;
}

.theme-toggle {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    width: auto;
    height: auto;
    background: var(--brand);
    color: #00131a;
    padding: 8px 12px;
    border-radius: 8px;
}

/* Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 36px;
    align-items: center;
}

.kicker {
    color: var(--muted);
    margin: 0 0 6px;
}

.headline {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    margin: 0 0 12px;
    letter-spacing: -.5px;
}

.subtitle {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 18px;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    margin: 16px 0 10px;
}

.facts {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.avatar {
    width: 220px;
    height: 220px;
}

.code-card {
    width: 80%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px 14px;
    font-family: "Fira Code", monospace;
    color: var(--muted);
    font-size: 13px;
}

.hero-visual {
    display: grid;
    justify-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding: 10px 14px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--card);
    box-shadow: var(--shadow);
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: none;
    color: #00121a;
}

.btn.outline {
    background: transparent;
}

.btn.small {
    padding: 8px 12px;
    font-size: 14px;
}

/* Skills */
.skills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.skill-group {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.skill-group h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--brand);
    letter-spacing: .3px;
}

.skill-group ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

/* Projects */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.filters {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
}

.chip.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #00121a;
    border: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.project-thumb {
    height: 180px;
    background: linear-gradient(180deg, rgba(110, 231, 255, .14), rgba(167, 139, 250, .10)),
    linear-gradient(145deg, #0b1724, #0d1117);
}

.project-body {
    padding: 16px;
}

.project-title {
    margin: 0 0 6px;
    font-size: 18px;
}

.project-desc {
    margin: 0 0 10px;
    color: var(--muted);
}

.tags {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.tags li {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 12px;
}

.project-actions {
    display: flex;
    gap: 10px;
}

/* Phone mock for mobile projects */
.phone-frame {
    height: 180px;
    background: var(--bg);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    display: grid;
    place-items: center;
    position: relative;
}

.phone-notch {
    width: 76px;
    height: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.phone-screen {
    width: 120px;
    height: 160px;
    background: linear-gradient(180deg, rgba(110, 231, 255, .12), rgba(167, 139, 250, .08)),
    linear-gradient(145deg, #0b1724, #0d1117);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

/* Contact */
.contact-form {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

input, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

input:focus, textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--brand), transparent 60%);
    outline-offset: 2px;
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.social {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.social a {
    color: var(--muted);
    text-decoration: none;
}

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

/* Footer */
.site-footer {
    padding: 24px 0 40px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    text-align: center;
}


/* Utilities */
.grid {
    display: grid;
    gap: 16px;
}

.hero .grid {
    align-items: center;
}

.with-actions {
    align-items: end;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .nav-toggle {
        display: inline-flex;
        background: var(--card);
        border: 1px solid var(--border);
        color: var(--text);
        border-radius: 10px;
        padding: 8px 10px;
        cursor: pointer;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 56px;
        right: 12px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
        box-shadow: var(--shadow);
    }

    .nav-list.show {
        display: grid;
        gap: 8px;
    }

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

/* Focus styles */
button:focus, a:focus {
    outline: 2px solid color-mix(in srgb, var(--brand-2), transparent 50%);
    outline-offset: 2px;
}

.section-subtitle {
    color: var(--muted);
    margin: -8px 0 24px;
}

/* Courses carousel */
.courses-swiper {
    position: relative;
}
.courses-swiper .swiper-slide {
    height: auto;
}
.course-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.course-card .course-video {
    color: inherit;
    text-decoration: none;
    display: block;
}
.course-card .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.course-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05);
}
.course-card .play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: color-mix(in srgb, var(--brand) 80%, black 10%);
    color: #00131a;
    border-radius: 999px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.course-card .course-meta {
    padding: 14px 14px 16px;
}
.course-card .course-title {
    font-size: 16px;
    margin: 0 0 6px;
}
.course-card .course-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* Swiper theming adjustments */
/* Keep default arrow color for any Swiper instances */
.swiper-button-next, .swiper-button-prev {
    color: var(--text);
}

/* Dots */
.swiper-pagination-bullet {
    background: var(--muted);
    opacity: .6;
}
.swiper-pagination-bullet-active {
    background: var(--brand);
    opacity: 1;
}

/* Rounded arrow buttons for the Courses carousel */
.courses-swiper .swiper-button-next,
.courses-swiper .swiper-button-prev {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    color: var(--text);
}
.courses-swiper .swiper-button-next::after,
.courses-swiper .swiper-button-prev::after {
    font-size: 18px; /* arrow icon size */
}
.courses-swiper .swiper-button-next:hover,
.courses-swiper .swiper-button-prev:hover {
    background: color-mix(in srgb, var(--brand) 18%, var(--card));
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.courses-swiper .swiper-button-next:active,
.courses-swiper .swiper-button-prev:active {
    transform: scale(0.96);
}
.courses-swiper .swiper-button-disabled {
    opacity: .35;
    cursor: not-allowed;
}