:root {
    --bg: #050505;
    --panel: #0d0d0d;
    --panel-2: #111111;
    --text: #f5f5f5;
    --muted: #b8b8b8;
    --line: rgba(255,255,255,0.12);
    --accent: #54f2c5;
    --accent-dark: #28d9aa;
    --white: #ffffff;
    --shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, #040404 0%, #090909 100%);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

    body.light-mode {
        --bg: #f5f7fb;
        --panel: #ffffff;
        --panel-2: #f3f6fb;
        --text: #111111;
        --muted: #5f6773;
        --line: rgba(0,0,0,0.08);
        --white: #111111;
        --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
        background: linear-gradient(180deg, #f6f8fc 0%, #eef3fb 100%);
    }

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
    background: transparent;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.site-shell {
    padding: 18px 0 40px;
}

.layout-stack {
    display: grid;
    gap: 26px;
}

.hero-card,
.about-card,
.services-card,
.projects-card,
.contact-card {
    background: radial-gradient(circle at top right, rgba(84,242,197,0.08), transparent 24%), var(--panel);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

body.light-mode .hero-card,
body.light-mode .about-card,
body.light-mode .services-card,
body.light-mode .projects-card,
body.light-mode .contact-card {
    border: 1px solid rgba(0,0,0,0.06);
}

/* =========================
   NAVBAR
   ========================= */

.header {
    position: sticky;
    top: 16px;
    z-index: 20;
    margin-bottom: 18px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

body.light-mode .nav {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.brand__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #000;
    font-size: 14px;
    font-weight: 800;
}

.brand__text {
    line-height: 1;
    font-size: 14px;
}

    .brand__text small {
        font-size: 11px;
        color: var(--muted);
        font-weight: 600;
    }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links__item {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--text);
    transition: 0.25s ease;
}

    .nav-links__item:hover,
    .nav-links__item.active {
        background: var(--accent);
        color: #050505;
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lang-switcher {
    display: flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: #0f0f0f;
}

body.light-mode .lang-switcher {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

.lang-btn {
    padding: 8px 14px;
    min-width: 52px;
    width: auto;
    flex: 0 0 auto;
    color: #ffffff;
}

.lang-switcher .lang-btn {
    width: auto;
    min-width: 52px;
    flex: 0 0 auto;
}

body.light-mode .lang-btn {
    color: #111111;
}

.lang-switcher .btn:not(.btn--primary) {
    color: #ffffff;
}

body.light-mode .lang-switcher .btn:not(.btn--primary) {
    color: #111111;
}

.theme-toggle {
    min-width: 52px;
    color: #ffffff;
}

body.light-mode .theme-toggle {
    color: #111111;
}

.theme-toggle i {
    font-size: 16px;
}

.nav-toggle {
    display: none;
    color: var(--white);
    font-size: 28px;
    line-height: 1;
}

/* =========================
   BUTTONS
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn--primary {
    background: var(--accent);
    color: #050505;
}

    .btn--primary:hover {
        background: var(--accent-dark);
    }

.btn--ghost {
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--text);
}

body.light-mode .btn--ghost {
    border: 1px solid rgba(0,0,0,0.12);
}

.btn--ghost:hover {
    background: rgba(255,255,255,0.05);
}

body.light-mode .btn--ghost:hover {
    background: rgba(0,0,0,0.04);
}

/* =========================
   COMMON
   ========================= */

.eyebrow {
    color: var(--accent);
    letter-spacing: 0.22em;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
}

.section {
    padding: 34px;
}

.section__header {
    margin-bottom: 28px;
}

    .section__header h2 {
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.15;
        margin-bottom: 18px;
    }

/* =========================
   HERO
   ========================= */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    padding: 48px 34px 26px;
}

.hero__content {
    align-self: center;
    padding: 20px 8px;
}

.hero h1 {
    font-size: clamp(3.4rem, 9vw, 6.4rem);
    line-height: 0.95;
    margin-bottom: 20px;
}

.hero__text {
    max-width: 620px;
    color: var(--muted);
    margin-bottom: 30px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero__visual {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero__image-wrap {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(84,242,197,0.10), transparent 45%), #000;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    filter: grayscale(100%) contrast(1.1);
}

.floating-rating {
    position: absolute;
    top: 48px;
    left: 26px;
    background: rgba(22,22,22,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.light-mode .floating-rating {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.08);
}

.floating-rating strong {
    font-size: 28px;
}

.floating-rating span {
    color: var(--muted);
    font-size: 13px;
}

.social-bar {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .social-bar a {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255,255,255,0.16);
        background: #0f0f0f;
        color: var(--text);
        transition: 0.25s ease;
    }

body.light-mode .social-bar a {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

.social-bar a:hover {
    background: var(--accent);
    color: #050505;
}

.stats {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 10px;
}

    .stat h3 {
        font-size: 28px;
        min-width: max-content;
    }

    .stat p {
        color: var(--muted);
        font-size: 14px;
    }

/* =========================
   ABOUT
   ========================= */

.about {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    padding: 34px;
}

.about__content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.about__content p {
    color: var(--muted);
    margin-bottom: 24px;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-bottom: 28px;
}

    .check-list div {
        display: grid;
        gap: 10px;
    }

    .check-list span {
        color: var(--text);
    }

.about__visual {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.about__shape {
    position: absolute;
    inset: 14px 40px 0 40px;
    background: var(--accent);
    border-radius: 180px 180px 28px 28px;
}

.about__visual img {
    position: relative;
    z-index: 2;
    max-height: 430px;
    object-fit: cover;
}

.experience-badge {
    position: absolute;
    top: 14px;
    left: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #090909;
    border: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .experience-badge {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

.experience-badge strong {
    font-size: 34px;
    line-height: 1;
}

.experience-badge span {
    max-width: 110px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.3;
}

/* =========================
   CARDS / SERVICES / PROJECTS / SKILLS
   ========================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-box,
.project-box,
.skills-category {
    background: var(--panel-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

body.light-mode .service-box,
body.light-mode .project-box,
body.light-mode .skills-category {
    border: 1px solid rgba(0,0,0,0.06);
}

.service-box:hover,
.project-box:hover,
.skills-category:hover {
    transform: translateY(-5px);
    border-color: rgba(84,242,197,0.5);
}

.service-box h3,
.project-box h3,
.skills-category h3 {
    margin-bottom: 12px;
    font-size: 24px;
}

.service-box p,
.project-box p,
.project-box span {
    color: var(--muted);
}

.project-box span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.1em;
}

.projects-grid--single {
    grid-template-columns: 1fr;
}

.skills-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.skills-category {
    display: block;
}

.skill-item {
    display: block;
    width: 100%;
}

    .skill-item + .skill-item {
        margin-top: 16px;
    }

.skill-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

    .skill-item__top strong {
        color: var(--accent);
    }

.skill-item__bar {
    display: block;
    width: 100%;
    height: 14px;
    background: #1b1b1b;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    overflow: hidden;
}

body.light-mode .skill-item__bar {
    background: #dde5ef;
    border: 1px solid rgba(0,0,0,0.08);
}

.skill-item__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #54f2c5, #28d9aa);
    box-shadow: 0 0 12px rgba(84,242,197,0.35);
    transition: width 0.8s ease;
}

/* =========================
   CONTACT
   ========================= */

.contact-form {
    max-width: 840px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #101010;
    color: var(--text);
    outline: none;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(84,242,197,0.7);
}

.form-message {
    margin-top: 12px;
    color: var(--accent);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
    .hero,
    .about {
        grid-template-columns: 1fr;
    }

    .hero__visual {
        min-height: 440px;
    }

    .cards-grid,
    .stats,
    .check-list,
    .form-grid,
    .skills-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        align-items: flex-start;
        flex-wrap: wrap;
        border-radius: 28px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
    }

        .nav-links.show {
            display: flex;
        }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero,
    .section,
    .about {
        padding: 24px;
    }

    .hero__visual {
        min-height: 360px;
    }

    .cards-grid,
    .stats,
    .check-list,
    .form-grid,
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .social-bar {
        top: auto;
        bottom: 16px;
        right: 16px;
        transform: none;
        flex-direction: row;
    }

    .floating-rating {
        top: 16px;
        left: 16px;
    }
}

@media (max-width: 520px) {
    .hero h1 {
        font-size: 3rem;
    }

    .btn {
        width: 100%;
    }

    .hero__actions,
    .nav-actions {
        flex-direction: column;
    }

    .lang-switcher {
        width: 100%;
        justify-content: center;
    }

        .lang-switcher .lang-btn {
            width: auto;
            min-width: 52px;
            flex: 0 0 auto;
        }

    .theme-toggle {
        width: 100%;
        justify-content: center;
    }
}
