/* ==================== VARIABLES ==================== */
:root {
    --primary: #8A6CFF;
    --primary-dark: #7458e6;
    --primary-light: #a18fff;
    --secondary: #4cc9f0;
    --accent: #5ce1e6;
    --bg-dark: #0E2A47;
    --bg-card: #132f4c;
    --bg-card-hover: #1a3a5c;
    --text-primary: #ffffff;
    --text-secondary: #a0b4c8;
    --text-muted: #8da4b8;
    --gradient-1: linear-gradient(135deg, #8A6CFF, #4cc9f0);
    --gradient-2: linear-gradient(135deg, #4cc9f0, #8A6CFF);
    --gradient-3: linear-gradient(135deg, #8A6CFF, #c084fc);
    --shadow: 0 10px 40px rgba(138, 108, 255, 0.15);
    --shadow-hover: 0 20px 60px rgba(138, 108, 255, 0.25);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==================== SKIP NAV ==================== */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10002;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: top 0.3s ease;
    text-decoration: none;
}

.skip-nav:focus {
    top: 0;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
}

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

button {
    cursor: none;
}

::selection {
    background: var(--primary);
    color: white;
}

/* ==================== CUSTOM CURSOR ==================== */
.cursor {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    opacity: 0.5;
}

.cursor.hover {
    transform: scale(2);
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    opacity: 0.3;
}

/* ==================== LOADER ==================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 30px;
}

.loader-text span {
    display: inline-block;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: loaderBounce 1.4s ease-in-out infinite;
}

.loader-text span:nth-child(1) { animation-delay: 0s; }
.loader-text span:nth-child(2) { animation-delay: 0.1s; }
.loader-text span:nth-child(3) { animation-delay: 0.2s; }
.loader-text span:nth-child(4) { animation-delay: 0.3s; }
.loader-text span:nth-child(5) { animation-delay: 0.4s; }
.loader-text span:nth-child(7) { animation-delay: 0.5s; }
.loader-text span:nth-child(8) { animation-delay: 0.6s; }
.loader-text span:nth-child(9) { animation-delay: 0.7s; }
.loader-text span:nth-child(10) { animation-delay: 0.8s; }
.loader-text span:nth-child(11) { animation-delay: 0.9s; }

@keyframes loaderBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.loader-bar-inner {
    width: 0%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    animation: loaderProgress 2s ease-in-out forwards;
}

@keyframes loaderProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ==================== PARTICLES ==================== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== NAVBAR ==================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(14, 42, 71, 0.9);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo-bracket {
    color: var(--primary);
}

.nav-logo:hover {
    transform: scale(1.05);
}

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

.nav-link {
    position: relative;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.nav-link:hover::before,
.nav-link.active::before {
    width: 30px;
}

/* ==================== LANGUAGE SWITCHER ==================== */
.lang-switcher {
    position: relative;
    z-index: 1002;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(138, 108, 255, 0.1);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(138, 108, 255, 0.2);
    border-color: rgba(138, 108, 255, 0.4);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-name {
    font-size: 0.8rem;
}

.lang-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(19, 47, 76, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 12px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown::-webkit-scrollbar {
    width: 4px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: rgba(138, 108, 255, 0.3);
    border-radius: 4px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(138, 108, 255, 0.15);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(138, 108, 255, 0.2);
    color: var(--primary-light);
    font-weight: 600;
}

.lang-option .lang-option-flag {
    font-size: 1.1rem;
    line-height: 1;
}

/* Mobile Language Switcher */
.mobile-lang-switcher {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-lang-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(138, 108, 255, 0.08);
    border: 1px solid rgba(138, 108, 255, 0.15);
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-lang-btn:hover {
    background: rgba(138, 108, 255, 0.2);
    border-color: rgba(138, 108, 255, 0.4);
    transform: scale(1.1);
}

.mobile-lang-btn.active {
    background: rgba(138, 108, 255, 0.25);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(138, 108, 255, 0.3);
}

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

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 350px;
    height: 100vh;
    background: rgba(19, 47, 76, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 15px 0;
    transition: all 0.3s ease;
    transform: translateX(50px);
    opacity: 0;
}

.mobile-menu.active .mobile-link {
    transform: translateX(0);
    opacity: 1;
}

.mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-link:nth-child(5) { transition-delay: 0.5s; }

.mobile-link:hover {
    color: var(--primary);
    transform: translateX(10px);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 30px 80px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(138, 108, 255, 0.1);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    margin-bottom: 20px;
}

.hero-greeting {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-name {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.name-line {
    display: block;
}

.name-letter {
    display: inline-block;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterPop 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: calc(0.3s + var(--i) * 0.05s);
}

@keyframes letterPop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-letter:hover {
    animation: letterWave 0.5s ease;
}

@keyframes letterWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-typewriter {
    font-size: 1.3rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
    min-height: 40px;
}

.typewriter-prefix {
    color: var(--text-secondary);
}

.typewriter-text {
    color: var(--accent);
    font-weight: 600;
}

.typewriter-cursor {
    color: var(--primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 1.2s forwards;
    opacity: 0;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(138, 108, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(138, 108, 255, 0.6);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(138, 108, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(138, 108, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    animation: fadeInUp 0.8s ease 1.4s forwards;
    opacity: 0;
}

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

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-plus {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}

.hero-shape-1 {
    width: 200px;
    height: 200px;
    background: var(--primary);
    top: -30px;
    right: -30px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 150px;
    height: 150px;
    background: var(--secondary);
    bottom: -20px;
    left: -20px;
    animation-delay: 2s;
}

.hero-shape-3 {
    width: 100px;
    height: 100px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Code Block */
.code-block {
    background: rgba(19, 47, 76, 0.9);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: var(--border-radius);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: codeAppear 1s ease 1.5s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes codeAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-content {
    padding: 20px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword { color: #c678dd; }
.code-var { color: #e06c75; }
.code-prop { color: #e5c07b; }
.code-string { color: #98c379; }
.code-bool { color: #d19a66; }
.code-method { color: #61afef; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.8s ease 2s forwards;
    opacity: 0;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s ease infinite;
}

@keyframes scrollDown {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(15px); opacity: 0; }
}

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==================== OFFSCREEN OPTIMIZATION ==================== */
#about, #skills, #projects, #contact, .footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

/* ==================== SECTIONS COMMON ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

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

.section-tag {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--primary);
    opacity: 0.6;
    margin-bottom: 12px;
}

.section-tag-close {
    display: block;
    text-align: center;
    margin-top: 60px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 4px;
    margin: 0 auto;
}

/* ==================== ABOUT ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.about-img-bg {
    position: absolute;
    inset: -10px;
    background: var(--gradient-1);
    border-radius: 30px;
    opacity: 0.15;
    transform: rotate(-5deg);
    animation: float 6s ease-in-out infinite;
}

.about-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-card);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(138, 108, 255, 0.2);
}

.about-img-placeholder i {
    font-size: 6rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.4;
}

.about-floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(19, 47, 76, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 12px;
    box-shadow: var(--shadow);
    animation: float 4s ease-in-out infinite;
}

.about-floating-card i {
    font-size: 1.2rem;
    color: var(--primary);
}

.about-floating-card span {
    font-size: 0.85rem;
    font-weight: 600;
}

.card-1 {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 30px;
    left: -20px;
    animation-delay: 2s;
}

.about-content {
    padding: 20px 0;
}

.about-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}

.about-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(138, 108, 255, 0.05);
    border: 1px solid rgba(138, 108, 255, 0.1);
    border-radius: 12px;
    transition: var(--transition);
}

.about-info-item:hover {
    background: rgba(138, 108, 255, 0.1);
    transform: translateY(-2px);
}

.about-info-item i {
    color: var(--primary);
    font-size: 1rem;
}

.about-info-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.skill-card {
    background: var(--bg-card);
    border: 1px solid rgba(138, 108, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(138, 108, 255, 0.3);
}

.skill-card:hover::before {
    opacity: 0.05;
}

.skill-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(138, 108, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.skill-card:hover .skill-icon-wrapper {
    background: var(--gradient-1);
    transform: scale(1.1) rotate(5deg);
}

.skill-icon-wrapper i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.skill-card:hover .skill-icon-wrapper i {
    color: white;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.skill-bar-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 6px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-percent {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==================== PROJECTS ==================== */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 28px;
    background: transparent;
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(138, 108, 255, 0.4);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(138, 108, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.project-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.project-card:hover .project-placeholder {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 42, 71, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

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

.project-link {
    width: 48px;
    height: 48px;
    background: rgba(138, 108, 255, 0.2);
    border: 1px solid rgba(138, 108, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    transform: translateY(20px);
    opacity: 0;
}

.project-card:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover .project-link:nth-child(2) {
    transition-delay: 0.1s;
}

.project-link:hover {
    background: var(--primary);
    transform: translateY(-3px) !important;
}

.project-info {
    padding: 24px;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    padding: 4px 14px;
    background: rgba(138, 108, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 500;
}

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

.contact-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(138, 108, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary);
    font-size: 1.1rem;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-item a,
.contact-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.contact-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: rgba(138, 108, 255, 0.1);
    border: 1px solid rgba(138, 108, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(138, 108, 255, 0.4);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(138, 108, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group label {
    position: absolute;
    top: 14px;
    left: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--primary);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 60px 0 30px;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.footer-line {
    width: 100px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 20px;
}

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

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for skill cards */
.skills-grid .skill-card:nth-child(1) { transition-delay: 0.05s; }
.skills-grid .skill-card:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .skill-card:nth-child(3) { transition-delay: 0.15s; }
.skills-grid .skill-card:nth-child(4) { transition-delay: 0.2s; }
.skills-grid .skill-card:nth-child(5) { transition-delay: 0.25s; }
.skills-grid .skill-card:nth-child(6) { transition-delay: 0.3s; }
.skills-grid .skill-card:nth-child(7) { transition-delay: 0.35s; }
.skills-grid .skill-card:nth-child(8) { transition-delay: 0.4s; }
.skills-grid .skill-card:nth-child(9) { transition-delay: 0.45s; }
.skills-grid .skill-card:nth-child(10) { transition-delay: 0.5s; }
.skills-grid .skill-card:nth-child(11) { transition-delay: 0.55s; }

/* Projects stagger */
.projects-grid .project-card:nth-child(1) { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.15s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.2s; }
.projects-grid .project-card:nth-child(5) { transition-delay: 0.25s; }
.projects-grid .project-card:nth-child(6) { transition-delay: 0.3s; }
.projects-grid .project-card:nth-child(7) { transition-delay: 0.35s; }
.projects-grid .project-card:nth-child(8) { transition-delay: 0.4s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
        gap: 40px;
    }

    .hero-description {
        margin: 0 auto 30px;
    }

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

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

    .hero-visual {
        width: 100%;
        max-width: 500px;
    }

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

    .about-content {
        text-align: center;
    }

    .about-content .btn {
        margin: 0 auto;
    }

    .about-img-wrapper {
        max-width: 320px;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

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

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

    .contact-info {
        text-align: center;
    }

    .contact-socials {
        justify-content: center;
    }

    .contact-details {
        align-items: center;
    }

    section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-typewriter {
        font-size: 1.1rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

    .skill-card {
        padding: 20px 14px;
    }

    .skill-card h3 {
        font-size: 0.85rem;
    }

    .skill-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .skill-icon-wrapper i {
        font-size: 1.2rem;
    }

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

    .projects-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

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

    .about-subtitle {
        font-size: 1.4rem;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .contact-info h3 {
        font-size: 1.4rem;
    }

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

    .code-block {
        margin: 0 -10px;
    }

    .code-content {
        font-size: 0.75rem;
        padding: 14px;
    }

    .scroll-indicator {
        display: none;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }

    a, button {
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 90px 16px 40px;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .hero-greeting {
        font-size: 1rem;
    }

    .hero-typewriter {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .container {
        padding: 0 16px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

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

    .skill-card {
        padding: 16px 10px;
        border-radius: 12px;
    }

    .skill-card h3 {
        font-size: 0.75rem;
    }

    .project-info {
        padding: 16px;
    }

    .project-info h3 {
        font-size: 1rem;
    }

    .project-tags span {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

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

    .nav-logo {
        font-size: 1.3rem;
    }

    .about-floating-card {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .about-floating-card i {
        font-size: 1rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .mobile-menu {
        width: 85%;
    }

    .mobile-link {
        font-size: 1.2rem;
        padding: 12px 0;
    }
}

/* ==================== RTL SUPPORT ==================== */
html[dir="rtl"] .mobile-menu {
    right: auto;
    left: -100%;
}

html[dir="rtl"] .mobile-menu.active {
    left: 0;
}

html[dir="rtl"] .mobile-link {
    transform: translateX(-50px);
}

html[dir="rtl"] .mobile-menu.active .mobile-link {
    transform: translateX(0);
}

html[dir="rtl"] .mobile-link:hover {
    transform: translateX(-10px);
}

html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-name {
    direction: ltr;
    unicode-bidi: bidi-override;
}

html[dir="rtl"] .hero-description {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-label {
    text-align: right;
}

html[dir="rtl"] .form-group label {
    left: auto;
    right: 0;
}

html[dir="rtl"] .form-line {
    left: auto;
    right: 0;
}

html[dir="rtl"] .code-block {
    direction: ltr;
}

html[dir="rtl"] .skill-bar-fill {
    direction: ltr;
}

html[dir="rtl"] .about-floating-card.card-1 {
    right: auto;
    left: -20px;
}

html[dir="rtl"] .about-floating-card.card-2 {
    left: auto;
    right: -20px;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* ==================== CJK FONT FALLBACK ==================== */
html[lang="ja"] body {
    font-family: 'Poppins', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
}

html[lang="zh"] body {
    font-family: 'Poppins', 'PingFang SC', 'Microsoft YaHei', 'SimHei', sans-serif;
}

html[lang="ko"] body {
    font-family: 'Poppins', 'Apple SD Gothic Neo', 'Malgun Gothic', 'NanumGothic', sans-serif;
}

/* ==================== LANG SWITCHER RESPONSIVE ==================== */
@media (max-width: 768px) {
    .lang-switcher {
        display: none;
    }

    .mobile-lang-switcher {
        display: flex;
    }
}
