/* ═══════════════════════════════════════════
   TOKENS - LIGHT (default)
═══════════════════════════════════════════ */
:root {
    --blue: #137fec;
    --blue-dim: #0f6bd1;

    /* LOADER (light: putih kebiruan) */
    --loader-box-bg: #eaf3ff;
    --loader-bar-track: #d3e6fb;
    --loader-shadow: rgba(19, 127, 236, 0.25);

    /* NAV */
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-logo: #0a1628;
    --nav-link: #475569;
    --nav-link-hover: #0a1628;
    --nav-border: rgba(0, 0, 0, 0.07);

    /* HERO */
    --hero-bg: #f4f7fb;
    --hero-border: rgba(10, 22, 40, 0.1);

    /* BODY / GENERAL */
    --body-bg: #f4f7fb;
    --card-bg: #ffffff;
    --text-1: #0a1628;
    --text-2: #475569;
    --text-3: #64748b;
    --border: #e2e8f0;

    /* SKILLS SECTION */
    --skills-bg: #f4f7fb;
    --skill-icon-bg: #eaf3ff;

    /* PROJECTS SECTION */
    --projects-bg: #ffffff;
    --project-card-bg: #f4f7fb;

    /* ABOUT */
    --about-bg: #ffffff;
    --about-border: rgba(10, 22, 40, 0.08);

    /* CONTACT */
    --contact-bg: #f4f7fb;
    --contact-card-bg: #ffffff;
    --contact-card-border: rgba(10, 22, 40, 0.08);
    --contact-form-bg: #ffffff;
    --contact-form-border: rgba(10, 22, 40, 0.08);
    --form-input-bg: rgba(10, 22, 40, 0.03);
    --form-input-border: rgba(10, 22, 40, 0.14);
    --form-placeholder: rgba(10, 22, 40, 0.32);

    /* FOOTER */
    --footer-bg: #ffffff;
    --footer-border: rgba(10, 22, 40, 0.08);
    --footer-text: rgba(10, 22, 40, 0.4);

    /* MISC */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-card: 0 4px 24px rgba(10, 22, 40, 0.08);
    --shadow-hover: 0 16px 48px rgba(10, 22, 40, 0.14);
    --scrollbar-track: #dde4ef;
}

/* ═══════════════════════════════════════════
   TOKENS - DARK OVERRIDE
═══════════════════════════════════════════ */
[data-theme="dark"] {
    /* LOADER (dark: biru tua kebiruan) */
    --loader-box-bg: #0a1628;
    --loader-bar-track: #0f2a4a;
    --loader-shadow: rgba(19, 127, 236, 0.4);

    --nav-bg: rgba(7, 13, 26, 0.88);
    --nav-logo: #ffffff;
    --nav-link: rgba(255, 255, 255, 0.6);
    --nav-link-hover: #ffffff;
    --nav-border: rgba(255, 255, 255, 0.07);

    --body-bg: #0b1120;
    --card-bg: #111d34;
    --text-1: #e4eaf5;
    --text-2: #8fa3bf;
    --text-3: #5c7494;
    --border: #1c2d47;

    --skills-bg: #0b1120;
    --skill-icon-bg: rgba(19, 127, 236, 0.15);

    --projects-bg: #0e1629;
    --project-card-bg: #0b1120;

    --hero-bg: #0d1b35;
    --hero-border: rgba(255, 255, 255, 0.08);

    --about-bg: #0e1629;
    --about-border: rgba(255, 255, 255, 0.08);

    --contact-bg: #070d1a;
    --contact-card-bg: rgba(255, 255, 255, 0.04);
    --contact-card-border: rgba(255, 255, 255, 0.08);
    --contact-form-bg: rgba(255, 255, 255, 0.03);
    --contact-form-border: rgba(255, 255, 255, 0.08);
    --form-input-bg: rgba(255, 255, 255, 0.05);
    --form-input-border: rgba(255, 255, 255, 0.1);
    --form-placeholder: rgba(255, 255, 255, 0.2);

    --footer-bg: #070d1a;
    --footer-border: rgba(255, 255, 255, 0.06);
    --footer-text: rgba(255, 255, 255, 0.3);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.55);
    --scrollbar-track: #070d1a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, sans-serif;
    background: var(--body-bg);
    color: var(--text-1);
    line-height: 1.65;
    overflow-x: hidden;
    transition:
        background 0.3s,
        color 0.3s;
}

body.nav-open {
    overflow: hidden;
}

/* ═══════════════════════════════════════════
   HACKER LOADER — Blue Theme
═══════════════════════════════════════════ */
.page-loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader-overlay.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hacker-loader {
    position: relative;
    width: 24em;
    max-width: 90vw;
    height: 6em;
    background-color: var(--loader-box-bg);
    border: 0.2em solid var(--blue);
    border-radius: 0.5em;
    padding: 1em;
    overflow: hidden;
    box-shadow: 0 0 1em var(--loader-shadow);
    transition: background-color 0.3s;
}

.loader-text {
    text-align: center;
    margin-bottom: 1em;
}

.text-glitch {
    color: var(--blue);
    font-family: monospace;
    font-size: 1.5em;
    position: relative;
    display: inline-block;
}

.text-glitch::before,
.text-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loader-box-bg);
    clip: rect(0, 0, 0, 0);
}

.text-glitch::before {
    left: -0.1em;
    text-shadow: 0.1em 0 #ff00ff;
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.text-glitch::after {
    left: 0.1em;
    text-shadow: -0.1em 0 #00ffff;
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

.loader-bar {
    width: 100%;
    height: 0.5em;
    background-color: var(--loader-bar-track);
    border-radius: 0.25em;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--blue);
    animation: bar-fill-animation 2s infinite ease-in-out;
}

.bar-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent,
            rgba(19, 127, 236, 0.35),
            transparent);
    background-size: 200% 200%;
    animation: bar-glitch-animation 2s infinite linear;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 0.2em;
    height: 0.2em;
    background-color: var(--blue);
    border-radius: 50%;
    opacity: 0;
    animation: particle-animation 2s infinite linear;
}

.particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 30%;
    left: 60%;
    animation-delay: 0.5s;
}

.particle:nth-child(3) {
    top: 70%;
    left: 30%;
    animation-delay: 1s;
}

.particle:nth-child(4) {
    top: 90%;
    left: 90%;
    animation-delay: 1.5s;
}

.particle:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 2s;
}

@keyframes glitch-effect {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
    }

    5% {
        clip: rect(12px, 9999px, 59px, 0);
    }

    10% {
        clip: rect(48px, 9999px, 29px, 0);
    }

    15.0% {
        clip: rect(42px, 9999px, 73px, 0);
    }

    20% {
        clip: rect(63px, 9999px, 27px, 0);
    }

    25% {
        clip: rect(34px, 9999px, 55px, 0);
    }

    30.0% {
        clip: rect(86px, 9999px, 73px, 0);
    }

    35% {
        clip: rect(20px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(26px, 9999px, 60px, 0);
    }

    45% {
        clip: rect(25px, 9999px, 66px, 0);
    }

    50% {
        clip: rect(57px, 9999px, 98px, 0);
    }

    55.0% {
        clip: rect(5px, 9999px, 46px, 0);
    }

    60.0% {
        clip: rect(82px, 9999px, 31px, 0);
    }

    65% {
        clip: rect(54px, 9999px, 27px, 0);
    }

    70% {
        clip: rect(28px, 9999px, 99px, 0);
    }

    75% {
        clip: rect(45px, 9999px, 69px, 0);
    }

    80% {
        clip: rect(23px, 9999px, 85px, 0);
    }

    85.0% {
        clip: rect(54px, 9999px, 84px, 0);
    }

    90% {
        clip: rect(45px, 9999px, 47px, 0);
    }

    95% {
        clip: rect(37px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(4px, 9999px, 91px, 0);
    }
}

@keyframes bar-fill-animation {

    0%,
    100% {
        width: 0;
    }

    50% {
        width: 100%;
    }
}

@keyframes bar-glitch-animation {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes particle-animation {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(2em, 2em);
    }
}

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

img,
video,
iframe {
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 3px;
}

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 80px;
    height: 64px;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nav-border);
    transition:
        background 0.3s,
        border-color 0.3s;
}

.nav-logo {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
    color: var(--nav-logo);
    transition: color 0.3s;
}

.nav-logo span {
    color: var(--blue);
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--nav-link);
    letter-spacing: 0.01em;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.nav-links a.active::after {
    width: 100%;
}


/* ─── THEME TOGGLE BUTTON ─── */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--nav-border);
    background: transparent;
    color: var(--nav-link);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    margin-left: 8px;
}

.theme-toggle:hover {
    background: rgba(19, 127, 236, 0.1);
    border-color: var(--blue);
    color: var(--blue);
    transform: rotate(20deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    font-size: 18px;
}

/* light mode → show moon (to switch to dark) */
[data-theme="light"] .icon-moon {
    display: block;
}

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

/* dark mode → show sun (to switch to light) */
[data-theme="dark"] .icon-sun {
    display: block;
}

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

/* ─── Language Selector ─── */

.language-selector {
    position: relative;
    display: flex;
    align-items: center;
}


/* ─── Main Button ─── */

.languageoptions {
    line-height: 1;
    width: 38px;
    height: 38px;

    border-radius: 50%;
    border: 1.5px solid var(--nav-border);

    background: transparent;
    color: var(--nav-link);

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.languageoptions:hover {
    background: rgba(19, 127, 236, 0.1);
    border-color: var(--blue);
    color: var(--blue);
    transform: scale(1.08);
}


/* ─── Language Options ─── */

.language-options {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    display: none;
    align-items: center;
    gap: 12px;

    pointer-events: none;
}

.language-options.active {
    display: flex;
}


/* ─── Individual Option ─── */

.lang-option {
    width: 38px;
    height: 38px;

    border-radius: 50%;
    border: 1px solid var(--nav-border);

    background: var(--nav-bg);
    color: var(--nav-link);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    line-height: 1;

    cursor: pointer;
}


/* Slot kosong (tidak ada bahasa ke arah itu) disembunyikan lewat JS
   dengan inline style, jadi tidak perlu aturan display di sini. */

/* Hover pilihan */
.lang-option.active {
    border-color: var(--blue);
    color: var(--blue);

    transform: scale(1.1);
}

/* ─── HAMBURGER (mobile nav trigger) ─── */
.hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--nav-logo);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── MOBILE NAV OVERLAY ─── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 20, 0.45);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
#home {
    min-height: 100vh;
    background: var(--hero-bg);
    display: flex;
    align-items: center;
    padding: 100px 80px 80px;
    gap: 64px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

#home::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(19, 127, 236, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 127, 236, 0.04) 1px, transparent 1px);
    background-size: 52px 52px;
    pointer-events: none;
}

#home::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(19, 127, 236, 0.18) 0%,
            transparent 70%);
    top: -100px;
    left: -100px;
    pointer-events: none;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 20px;
}

.hero-eyebrow::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
}

.hero-left h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(42px, 5.5vw, 72px);
    font-weight: 700;
    line-height: 1.07;
    letter-spacing: -0.04em;
    color: var(--text-1);
    margin-bottom: 24px;
    transition: color 0.3s;
}

.hero-left h1 .stroke-text {
    -webkit-text-stroke: 2px var(--blue);
    color: transparent;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-2);
    max-width: 500px;
    line-height: 1.75;
    margin-bottom: 36px;
    transition: color 0.3s;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.skill-chips span {
    background: rgba(19, 127, 236, 0.12);
    border: 1px solid rgba(19, 127, 236, 0.28);
    color: var(--text-1);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    transition: all 0.2s;
}

.skill-chips span:hover {
    background: rgba(19, 127, 236, 0.28);
    border-color: var(--blue);
    color: #fff;
}

.hero-btns {
    display: flex;
    gap: 14px;
}

.btn-primary {
    height: 48px;
    padding: 0 28px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    background: var(--blue);
    color: #fff;
    border: none;
    box-shadow: 0 8px 28px rgba(19, 127, 236, 0.4);
    transition: all 0.25s;
}

.btn-primary:hover {
    background: var(--blue-dim);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(19, 127, 236, 0.5);
}

.btn-secondary {
    height: 48px;
    padding: 0 28px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--hero-border);
    transition: all 0.25s;
}

.btn-secondary:hover {
    border-color: var(--text-1);
    color: var(--text-1);
    transform: translateY(-2px);
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-video-wrapper {
    width: 100%;
    max-width: 580px;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hero-border);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(19, 127, 236, 0.15);
}

.hero-video-wrapper video,
.hero-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* ═══════════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════════ */
section {
    padding: 96px 80px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
}

.section-label::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
}

.section-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-2);
    max-width: 600px;
    line-height: 1.75;
}

/* ═══════════════════════════════════════════
   ABOUT (always dark bg)
═══════════════════════════════════════════ */
#about {
    background: var(--about-bg);
    color: var(--text-1);
    transition:
        background 0.3s,
        color 0.3s;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 72px;
    align-items: center;
    margin-top: 52px;
}

.about-img-wrap {
    position: relative;
}

.about-img-wrap img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-lg);
    border: 1px solid var(--about-border);
}

.about-img-badge {
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: var(--blue);
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(19, 127, 236, 0.4);
    white-space: nowrap;
}

.about-content .section-title {
    color: var(--text-1);
}

.about-content p {
    font-size: 15.5px;
    color: var(--text-2);
    margin-bottom: 16px;
    text-align: justify;
    hyphens: auto;
}

.about-stats {
    display: flex;
    gap: 32px;
    margin: 32px 0;
}

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

.stat-num {
    font-family: "Space Grotesk", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.about-btns {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}

/* ═══════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════ */
#skills {
    background: var(--skills-bg);
    transition: background 0.3s;
}

.skills-header {
    margin-bottom: 52px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.3s,
        border-color 0.3s;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(19, 127, 236, 0.3);
}

.skill-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--skill-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s;
}

.skill-icon img {
    width: 28px;
    height: 28px;
}

.skill-card-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.skill-card-desc {
    font-size: 13.5px;
    color: var(--text-2);
    margin-top: 4px;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-item {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    transition: border-color 0.3s;
}

.skill-item h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
}

.skill-item p {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 3px;
}

/* ═══════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════ */
#projects {
    background: var(--projects-bg);
    transition: background 0.3s;
}

.projects-header {
    margin-bottom: 52px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--project-card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.3s,
        border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.project-media {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0a0f1e;
    position: relative;
    overflow: hidden;
}

.project-media iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.project-card:hover .project-media img {
    transform: scale(1.04);
}

.project-body {
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.project-body h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-1);
}

.project-body p {
    font-size: 13px;
    color: var(--text-2);
    flex: 1;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    text-align: justify;
    hyphens: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    margin-top: 4px;
    transition: gap 0.2s;
}

.project-link:hover {
    gap: 10px;
}

/* ═══════════════════════════════════════════
   YOUTUBE LAZY PREVIEW (thumbnail + play button)
═══════════════════════════════════════════ */
.project-media.youtube-preview {
    position: relative;
    cursor: pointer;
}

.project-media.youtube-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.25s ease, transform 0.3s ease;
}

.project-media.youtube-preview:hover img {
    filter: brightness(0.75);
    transform: scale(1.04);
}

.youtube-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(19, 127, 236, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(19, 127, 236, 0.5);
    transition: transform 0.25s ease, background 0.25s ease;
}

.youtube-play .material-symbols-outlined {
    font-size: 32px;
}

.project-media.youtube-preview:hover .youtube-play {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--blue);
}

.project-media.youtube-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── MORE PROJECTS BUTTON ─── */

.more-project-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 42px 0 0;
    padding: 12px 24px;

    min-width: 170px;
    height: 46px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-1);

    font-family: "Space Grotesk", sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.more-project-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;

    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(19, 127, 236, 0.3);
}

.more-project-btn:active {
    transform: translateY(-1px);
}

.more-project-btn:focus-visible {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.2);
}

.project-card.project-hidden {
    display: none;
}

/* ═══════════════════════════════════════════
   CONTACT (always dark bg)
═══════════════════════════════════════════ */
#contact {
    background: var(--contact-bg);
    color: var(--text-1);
    transition:
        background 0.3s,
        color 0.3s;
}

#contact .section-title {
    color: var(--text-1);
}

#contact .section-subtitle {
    color: var(--text-2);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    margin-top: 52px;
    align-items: start;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--contact-card-bg);
    border: 1px solid var(--contact-card-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    transition: all 0.25s;
}

.contact-card:hover {
    background: rgba(19, 127, 236, 0.1);
    border-color: rgba(19, 127, 236, 0.3);
    transform: translateX(4px);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(19, 127, 236, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon .material-symbols-outlined,
.contact-card-icon i {
    font-size: 20px;
    color: var(--blue);
}

.contact-card-text p:first-child {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
}

.contact-card-text p:last-child {
    font-size: 12.5px;
    color: var(--text-3);
}

.contact-card-link {
    margin-left: auto;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.contact-card-link:hover {
    opacity: 1;
}

.contact-card-link .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-1);
}

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

.contact-form-wrap h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--form-input-border);
    background: var(--form-input-bg);
    color: var(--text-1);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.3s,
        color 0.3s;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.2);
}

.form-submit {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--blue);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
    transition: all 0.25s;
    box-shadow: 0 8px 28px rgba(19, 127, 236, 0.35);
}

.form-submit:hover {
    background: var(--blue-dim);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(19, 127, 236, 0.5);
}

.form-submit:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    text-align: center;
    padding: 24px 80px;
    font-size: 13px;
    color: var(--footer-text);
    transition: background 0.3s;
}

/* ═══════════════════════════════════════════
   IMAGE MODAL
═══════════════════════════════════════════ */
.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.img-modal.active {
    display: flex;
}

.img-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.25s ease;
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.85);
    }

    to {
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    nav {
        padding: 0 40px;
    }

    #home,
    section {
        padding-left: 40px;
        padding-right: 40px;
    }

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

    .about-img-wrap img {
        aspect-ratio: 3/4;
        max-height: 480px;
        object-position: center 15%;
    }

    .about-img-badge {
        right: 0;
    }

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

@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        right: 0;
        height: calc(100vh - 64px);
        width: min(78vw, 300px);
        background: var(--nav-bg);
        backdrop-filter: blur(14px);
        border-left: 1px solid var(--nav-border);
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 24px;
        margin: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: -10px 0 32px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 14px 4px;
        font-size: 15.5px;
        border-bottom: 1px solid var(--nav-border);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links .theme-toggle {
        margin: 16px 0 0;
    }

    .language-selector {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 12px;
    }

    .languageoptions {
        width: 100%;
        height: 44px;
        margin-left: 0;
        border-radius: 10px;
        justify-content: flex-start;
        padding: 0 14px;
        font-size: 15px;
    }

    .language-options {
        position: static;
        transform: none;
        width: 100%;
        gap: 8px;
        pointer-events: auto;
    }

    .lang-option {
        flex: 1;
        width: auto;
        height: 44px;
        border-radius: 10px;
        font-size: 15px;
    }

    #home {
        flex-direction: column;
        padding: 100px 20px 60px;
        text-align: center;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .skill-chips {
        justify-content: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-desc {
        margin: 0 auto 36px;
    }

    section {
        padding: 64px 20px;
    }

    footer {
        padding: 20px;
    }

    .about-stats {
        gap: 20px;
    }

    .about-btns {
        flex-wrap: wrap;
    }

    .about-content p,
    .project-body p {
        text-align: left;
    }
}

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

    section {
        padding: 48px 16px;
    }

    #home {
        padding: 88px 16px 48px;
    }

    nav {
        padding: 0 16px;
    }

    .hero-left h1 {
        margin-bottom: 18px;
    }

    .hero-btns,
    .about-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns a,
    .hero-btns button,
    .about-btns a,
    .about-btns button {
        width: 100%;
    }

    .about-stats {
        justify-content: space-between;
    }

    .about-img-wrap img {
        aspect-ratio: 4/5;
        max-height: 420px;
    }

    .about-img-badge {
        right: 10px;
        bottom: 10px;
        font-size: 11.5px;
        padding: 8px 14px;
    }

    .contact-form-wrap {
        padding: 22px;
    }

    .contact-card {
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ═══════════════════════════════════════════
   LANGUAGE TYPING ANIMATION
═══════════════════════════════════════════ */
.type-cursor {
    display: inline-block;
    margin-left: 1px;
    color: var(--blue);
    animation: blinkCursor 0.85s steps(1) infinite;
}

@keyframes blinkCursor {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}