/* ════════════════════════════════════════════════
   CSS Variables — Light Theme
   ════════════════════════════════════════════════ */
:root {
    --primary-color:    #5b4cf5;
    --primary-hover:    #4a3de0;
    --primary-rgb:      91, 76, 245;
    --accent-color:     #e8a44a;
    --accent-rgb:       232, 164, 74;
    --text-color:       #0c0d1a;
    --light-text-color: #6a6d88;
    --background-color: #f0f0ed;
    --card-background:  #ffffff;
    --border-color:     #e0dff0;
    --font-family:      'DM Sans', sans-serif;
    --font-display:     'Syne', sans-serif;
    --font-mono:        'JetBrains Mono', monospace;
    --border-radius:    12px;
}

/* ════════════════════════════════════════════════
   Base
   ════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.03em;
}
h1 { font-weight: 800; }
h2 {
    font-size: 2.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}
h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 12px auto 1rem;
    border-radius: 2px;
}
p { color: var(--light-text-color); font-size: 1rem; line-height: 1.75; }

/* ════════════════════════════════════════════════
   Navbar
   ════════════════════════════════════════════════ */
.navbar {
    background-color: rgba(240, 240, 237, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: color 0.2s;
    flex-shrink: 0;
}
.logo:hover { color: var(--primary-color); }
.logo span { color: var(--primary-color); }

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    text-decoration: none;
    color: var(--light-text-color);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-color);
    transition: width 0.22s ease;
}
.nav-links a:hover { color: var(--text-color); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text-color); }
.nav-links a.active::after { width: 100%; }

/* ════════════════════════════════════════════════
   Language Switcher
   ════════════════════════════════════════════════ */
.lang-switcher {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
    background: var(--border-color);
    border-radius: 8px;
    padding: 2px;
}
.lang-btn {
    padding: 3px 10px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--light-text-color);
    font-family: var(--font-mono);
    font-size: 0.63rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all 0.18s;
    text-transform: uppercase;
    line-height: 1.8;
}
.lang-btn:hover { color: var(--text-color); }
.lang-btn.active {
    background: var(--card-background);
    color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ════════════════════════════════════════════════
   Hamburger
   ════════════════════════════════════════════════ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 26px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; left: -100%;
        width: 100%; height: 100vh;
        padding-top: 80px;
        flex-direction: column;
        align-items: center;
        gap: 0;
        background-color: rgba(240, 240, 237, 0.98);
        backdrop-filter: blur(24px);
        transition: left 0.4s ease-in-out;
        z-index: 999;
    }
    .nav-links.active { left: 0; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a {
        display: block;
        padding: 1.1rem 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links li:first-child a { border-top: 1px solid var(--border-color); }
    .menu-toggle { display: flex; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .lang-btn { font-size: 0.58rem; padding: 2px 8px; }
}

/* ════════════════════════════════════════════════
   Hero
   ════════════════════════════════════════════════ */
.hero {
    padding: 6rem 0 8rem;
    position: relative;
    overflow: hidden;
    background: var(--background-color);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
}
.hero-orb-1 {
    width: 900px; height: 900px;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.07) 0%, transparent 60%);
    top: -380px; right: -180px;
}
.hero-orb-2 {
    width: 600px; height: 600px;
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.05) 0%, transparent 60%);
    bottom: -200px; left: -80px;
}
.hero-orb-3 { display: none; }

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--primary-rgb), 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--primary-rgb), 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content { max-width: 56%; }
.hero-content .subtitle {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--primary-color);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}
.hero-content h1 {
    font-family: var(--font-display);
    font-size: 3.8rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0.5rem 0 1.5rem;
}
.hero-content h1::after { display: none; }
.hero-typed {
    background: linear-gradient(135deg, var(--text-color) 20%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.typing-cursor {
    display: inline-block;
    -webkit-text-fill-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 300;
    margin-left: 1px;
    animation: cursorBlink 0.85s step-end infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Geometric photo frame */
.hero-image {
    flex-shrink: 0;
    width: 320px;
    position: relative;
    cursor: pointer;
}
.hero-image::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 22px;
    border: 1.5px solid rgba(var(--primary-rgb), 0.22);
    transform: rotate(3deg);
    animation: frameFloat 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.hero-image::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 28px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    transform: rotate(-2deg);
    animation: frameFloatR 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes frameFloat {
    0%, 100% { transform: rotate(3deg) scale(1); }
    50%       { transform: rotate(5deg) scale(1.01); }
}
@keyframes frameFloatR {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    50%       { transform: rotate(-4deg) scale(0.99); }
}
.hero-image img {
    width: 100%;
    border-radius: 16px;
    display: block;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(var(--primary-rgb), 0.05);
    transition: filter 0.3s ease;
    position: relative;
    z-index: 1;
}
.hero-image:hover img:not(.blob-punctured) { filter: brightness(1.04) saturate(1.08); }

/* ════════════════════════════════════════════════
   Status Badge
   ════════════════════════════════════════════════ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 999px;
    padding: 5px 14px;
    background: rgba(22, 163, 74, 0.05);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #16a34a;
    font-weight: 400;
    letter-spacing: 0.04em;
}
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    position: relative;
    flex-shrink: 0;
}
.status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.28);
    animation: statusPulse 2s ease-out infinite;
}
@keyframes statusPulse {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* ════════════════════════════════════════════════
   Tech Stack Badges
   ════════════════════════════════════════════════ */
.tech-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.75rem; }
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 9px;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    color: var(--light-text-color);
    background: var(--card-background);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.tech-badge:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-1px);
}
.tech-badge i { color: var(--primary-color); font-size: 0.78rem; }

/* ════════════════════════════════════════════════
   Scroll Indicator
   ════════════════════════════════════════════════ */
.scroll-indicator {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: opacity 0.4s ease;
    cursor: default;
    user-select: none;
    z-index: 1;
}
.scroll-indicator.hidden { opacity: 0; pointer-events: none; }
.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.28em;
    color: var(--light-text-color);
    text-transform: uppercase;
    opacity: 0.55;
}
.scroll-chevrons { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.scroll-chevrons span {
    display: block;
    width: 8px; height: 8px;
    border-right: 1.5px solid var(--primary-color);
    border-bottom: 1.5px solid var(--primary-color);
    transform: rotate(45deg);
    animation: chevronPulse 1.6s ease-in-out infinite;
    opacity: 0.65;
}
.scroll-chevrons span:nth-child(2) { animation-delay: 0.25s; opacity: 0.3; }
@keyframes chevronPulse { 0%, 100% { opacity: 0.65; } 50% { opacity: 0.12; } }

/* ════════════════════════════════════════════════
   Stats Section
   ════════════════════════════════════════════════ */
.stats-section {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    background: var(--card-background);
}
.stats-row { display: flex; align-items: center; }
.stat-item { flex: 1; text-align: center; padding: 0.75rem 0; }
.stat-item:not(:last-child) { border-right: 1px solid var(--border-color); }
.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.05em;
}
.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    color: var(--light-text-color);
    text-transform: uppercase;
}

/* ════════════════════════════════════════════════
   Buttons
   ════════════════════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 0.78rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    font-family: var(--font-family);
    transition: all 0.22s ease;
    margin-right: 0.75rem;
    border: 1.5px solid transparent;
    letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.28);
}
.btn-secondary {
    background: transparent;
    color: var(--light-text-color);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    color: var(--text-color);
    border-color: var(--light-text-color);
    background: var(--card-background);
}
.btn-link { color: var(--primary-color); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.btn-link:hover { color: var(--primary-hover); }
.btn-link i { margin-left: 0.25rem; }

/* ════════════════════════════════════════════════
   Sections
   ════════════════════════════════════════════════ */
.content-section { padding: 5rem 0; flex-grow: 1; }
.section-subtitle { text-align: center; max-width: 600px; margin: 0 auto 3rem auto; font-size: 1.02rem; }

/* ════════════════════════════════════════════════
   About
   ════════════════════════════════════════════════ */
.about-content { display: flex; gap: 3rem; align-items: flex-start; }
.about-text { flex: 2; }

.about-text h2 {
    text-align: left;
}
.about-text h2::after {
    margin: 12px 0 1rem;
}

.skills-card {
    flex: 1;
    background: var(--card-background);
    padding: 1.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 80px;
}
.skills-card h3 {
    font-family: var(--font-display);
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.skills-card ul { list-style: none; padding: 0; margin: 0; }
.skills-card li {
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-size: 0.88rem;
}
.skills-card li i {
    color: var(--primary-color);
    margin-right: 0.8rem;
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ════════════════════════════════════════════════
   About Skills List
   ════════════════════════════════════════════════ */
.about-skills-list {
    list-style: none;
    padding: 0;
    margin: 1.4rem 0 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.about-skills-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    background: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: border-color 0.22s ease, transform 0.22s ease;
}
.about-skills-list li:hover {
    border-color: rgba(var(--primary-rgb), 0.38);
    transform: translateX(5px);
}
.asl-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.88rem;
}
.asl-body { display: flex; flex-direction: column; gap: 0.1rem; }
.asl-body strong {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
}
.asl-body span {
    font-size: 0.82rem;
    color: var(--light-text-color);
    line-height: 1.5;
}

/* ════════════════════════════════════════════════
   Timeline
   ════════════════════════════════════════════════ */
.timeline { margin-top: 2.5rem; }
.timeline-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
}
.timeline-item { display: flex; gap: 18px; position: relative; padding-bottom: 1.75rem; }
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px; top: 20px; bottom: 0;
    width: 1px;
    background: var(--border-color);
}
.timeline-dot {
    width: 16px; height: 16px; flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: var(--background-color);
    margin-top: 2px;
    position: relative;
}
.timeline-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--primary-color);
}
.timeline-item.past .timeline-dot { border-color: var(--border-color); }
.timeline-item.past .timeline-dot::after { background: var(--border-color); }
.timeline-content h4 {
    font-family: var(--font-display);
    color: var(--text-color);
    font-weight: 700;
    margin: 0 0 4px;
    font-size: 0.93rem;
    letter-spacing: -0.02em;
}
.timeline-content span {
    font-family: var(--font-mono);
    color: var(--light-text-color);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}
.timeline-content p { font-size: 0.86rem; margin: 8px 0 0; color: var(--light-text-color); }

/* ════════════════════════════════════════════════
   Projects
   ════════════════════════════════════════════════ */
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.75rem; }
.project-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
    position: relative;
}
.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.1);
}

.project-num {
    position: absolute;
    bottom: 0;
    right: 10px;
    font-family: var(--font-display);
    font-size: 6.5rem;
    font-weight: 800;
    color: rgba(var(--primary-rgb), 0.05);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.06em;
    z-index: 0;
}

.project-screenshots-wrapper {
    display: flex; flex-direction: row; flex-wrap: wrap;
    justify-content: center; align-items: flex-start;
    gap: 10px; padding: 14px;
    background: rgba(var(--primary-rgb), 0.02);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.project-screenshot {
    width: calc(50% - 5px);
    height: 152px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease;
}
.project-screenshot:hover { transform: scale(1.02); }
.project-screenshot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-info { padding: 1.4rem; flex-grow: 1; position: relative; z-index: 1; }
.project-info h3 {
    font-family: var(--font-display);
    margin-top: 0; margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tags { margin: 1rem 0; }
.tag {
    display: inline-block;
    background-color: rgba(var(--primary-rgb), 0.06);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 400;
    margin-right: 0.4rem; margin-bottom: 0.4rem;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════
   Contact
   ════════════════════════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.contact-card {
    background: var(--card-background);
    padding: 2rem; text-align: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}
.contact-card:hover::before { transform: scaleX(1); }
.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.22);
    box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.08);
}
.contact-card i { font-size: 1.55rem; color: var(--primary-color); margin-bottom: 1rem; opacity: 0.88; display: block; }
.contact-card h3 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    margin-top: 0;
}
.contact-card a { color: var(--primary-color); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.contact-card a:hover { color: var(--primary-hover); }
.contact-card p { margin: 0; font-size: 0.92rem; color: var(--text-color); }

/* ════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════ */
footer {
    background-color: var(--card-background);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}
footer p {
    font-family: var(--font-mono);
    margin: 0;
    color: var(--light-text-color);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
}

/* ════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .hero { padding: 4rem 0 6rem; }
    .hero .container { flex-direction: column-reverse; text-align: center; }
    .hero-content { max-width: 100%; }
    .hero-content h1 { font-size: 2.4rem; }
    .hero-content .subtitle { text-align: center; }
    .hero-image {
        width: 260px;
        margin: 0 auto 1.5rem auto;
    }
    .hero-image::before, .hero-image::after { display: none; }
    .about-content { flex-direction: column; }
    .skills-card { position: static; }
    .about-text h2 { text-align: center; }
    .about-text h2::after { margin: 12px auto 1rem; }
    .tech-stack { justify-content: center; }
    .hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .hero-buttons .btn { margin-right: 0; }
    .scroll-indicator { display: none; }
    .project-screenshots-wrapper { flex-direction: column; gap: 10px; }
    .project-screenshot { width: 100%; height: 180px; }
}

/* ════════════════════════════════════════════════
   Glitch Page Transition
   ════════════════════════════════════════════════ */
#train-overlay {
    position: fixed; inset: 0;
    z-index: 9999; pointer-events: none; overflow: hidden;
}
#train-bar { display: none; }

.gt-slice {
    position: absolute;
    left: -2px; right: -2px;
    background: var(--primary-color);
    transform: translateX(-102%);
}
.gt-slice:nth-child(1) { top: 0;    height: 21%; }
.gt-slice:nth-child(2) { top: 20%;  height: 19%; }
.gt-slice:nth-child(3) { top: 38%;  height: 24%; }
.gt-slice:nth-child(4) { top: 61%;  height: 18%; }
.gt-slice:nth-child(5) { top: 78%;  height: 22%; }

#train-overlay.exiting .gt-slice {
    animation: gtIn 0.36s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}
#train-overlay.exiting .gt-slice:nth-child(1) { animation-delay: 0ms;  }
#train-overlay.exiting .gt-slice:nth-child(2) { animation-delay: 30ms; }
#train-overlay.exiting .gt-slice:nth-child(3) { animation-delay: 8ms;  }
#train-overlay.exiting .gt-slice:nth-child(4) { animation-delay: 44ms; }
#train-overlay.exiting .gt-slice:nth-child(5) { animation-delay: 18ms; }

@keyframes gtIn {
    0%   { transform: translateX(-102%); }
    62%  { transform: translateX(5px); }
    78%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

#train-overlay.entering .gt-slice {
    transform: translateX(0);
    animation: gtOut 0.36s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}
#train-overlay.entering .gt-slice:nth-child(1) { animation-delay: 0ms;  }
#train-overlay.entering .gt-slice:nth-child(2) { animation-delay: 34ms; }
#train-overlay.entering .gt-slice:nth-child(3) { animation-delay: 10ms; }
#train-overlay.entering .gt-slice:nth-child(4) { animation-delay: 50ms; }
#train-overlay.entering .gt-slice:nth-child(5) { animation-delay: 22ms; }

@keyframes gtOut {
    0%   { transform: translateX(0); }
    100% { transform: translateX(102%); }
}

.page-slide-in { animation: pageGlitchIn 0.5s ease 0.1s both; }
@keyframes pageGlitchIn {
    0%   { transform: translateX(18px); opacity: 0; filter: brightness(1.8) blur(2px); }
    18%  { transform: translateX(-6px); opacity: 0.85; filter: brightness(1.4) blur(0px); }
    35%  { transform: translateX(4px); opacity: 0.95; filter: brightness(0.85); }
    55%  { transform: translateX(-2px); opacity: 1; filter: brightness(1.08); }
    100% { transform: translateX(0); opacity: 1; filter: brightness(1); }
}

/* ════════════════════════════════════════════════
   Curtain Text Animations
   ════════════════════════════════════════════════ */
.curtain-line { display: block; animation: curtainReveal 0.7s cubic-bezier(0.77, 0, 0.18, 1) both; }
@keyframes curtainReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } }
.curtain-d1 { animation-delay: 0.15s; }
.curtain-d2 { animation-delay: 0.35s; }
.curtain-d3 { animation-delay: 0.55s; }
.curtain-d4 { animation-delay: 0.75s; }
.curtain-d5 { animation-delay: 0.95s; }
.curtain-d6 { animation-delay: 1.15s; }
.curtain-d7 { animation-delay: 1.35s; }

.curtain-scroll { clip-path: inset(0 100% 0 0); transition: clip-path 0.65s cubic-bezier(0.77, 0, 0.18, 1); }
.curtain-scroll.curtain-visible { clip-path: inset(0 0% 0 0); }

/* ════════════════════════════════════════════════
   Scroll Reveal
   ════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════
   Utility
   ════════════════════════════════════════════════ */
.label-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--light-text-color);
    font-weight: 400;
}
.accent-line {
    display: block;
    width: 36px; height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 1.25rem 0;
    border-radius: 2px;
}

/* ════════════════════════════════════════════════
   Project Hover Overlay
   ════════════════════════════════════════════════ */
.project-overlay {
    position: absolute; inset: 14px;
    background: rgba(8, 9, 13, 0.72);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.28s ease;
    border-radius: 8px; pointer-events: none;
    backdrop-filter: blur(4px);
}
.project-card:hover .project-overlay { opacity: 1; pointer-events: auto; }
.project-overlay-btn {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 8px 22px; border-radius: 8px;
    font-size: 0.82rem; font-weight: 500;
    background: rgba(255,255,255,0.08);
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.project-overlay-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.65);
}

/* ════════════════════════════════════════════════
   Project Filter Buttons
   ════════════════════════════════════════════════ */
.project-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 2.5rem; }
.filter-btn {
    padding: 6px 20px; border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--light-text-color);
    font-family: var(--font-mono);
    font-size: 0.7rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
    letter-spacing: 0.04em;
}
.filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.filter-btn.active {
    border-color: var(--primary-color);
    color: #fff;
    background: var(--primary-color);
}
.project-card.filtered-out { display: none; }

/* ════════════════════════════════════════════════
   Copy-to-Clipboard + Toast
   ════════════════════════════════════════════════ */
.toast {
    position: fixed; bottom: 5rem; left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--text-color); color: #fff;
    padding: 10px 20px; border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.76rem; font-weight: 400;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9998; white-space: nowrap;
    letter-spacing: 0.04em;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.copy-btn {
    background: transparent; border: 1px solid var(--border-color);
    border-radius: 6px; color: var(--light-text-color);
    cursor: pointer;
    font-family: var(--font-mono); font-size: 0.66rem; padding: 3px 10px;
    margin-top: 10px; display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.2s; letter-spacing: 0.04em;
}
.copy-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ════════════════════════════════════════════════
   Social Links
   ════════════════════════════════════════════════ */
.social-links { display: flex; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }
.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    border: 1px solid var(--border-color); color: var(--light-text-color);
    font-size: 1rem; text-decoration: none;
    transition: all 0.22s;
    background: var(--card-background);
}
.social-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.14);
}

/* ════════════════════════════════════════════════
   Response Time Badge
   ════════════════════════════════════════════════ */
.response-badge {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--border-color); border-radius: 999px;
    padding: 6px 18px;
    font-family: var(--font-mono);
    font-size: 0.7rem; color: var(--light-text-color);
    margin-top: 2rem; background: var(--card-background);
    letter-spacing: 0.04em;
}
.response-badge i { color: var(--primary-color); }

/* ════════════════════════════════════════════════
   Language Skill Bars
   ════════════════════════════════════════════════ */
.lang-section { margin-top: 2rem; }
.lang-section-title {
    font-family: var(--font-mono);
    font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--light-text-color); margin-bottom: 1.25rem; font-weight: 400;
}
.lang-item { margin-bottom: 1.2rem; }
.lang-header { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 0.85rem; }
.lang-name { color: var(--text-color); font-weight: 500; }
.lang-level {
    font-family: var(--font-mono);
    color: var(--light-text-color);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}
.lang-bar { height: 3px; background: var(--border-color); border-radius: 2px; overflow: hidden; }
.lang-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), rgba(var(--primary-rgb), 0.5));
    border-radius: 2px; width: 0;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════
   Back to Top
   ════════════════════════════════════════════════ */
.back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--border-color); background: var(--card-background);
    color: var(--light-text-color); font-size: 0.88rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; transform: scale(0.85) translateY(8px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s, color 0.2s, box-shadow 0.2s;
    z-index: 999; pointer-events: none; text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.back-to-top.visible { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
.back-to-top:hover {
    background: var(--primary-color); color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.28);
}

/* ════════════════════════════════════════════════
   Reading Progress Bar
   ════════════════════════════════════════════════ */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%; z-index: 10001; pointer-events: none;
}

/* ════════════════════════════════════════════════
   Collab Block
   ════════════════════════════════════════════════ */
.collab-block {
    margin: 1.6rem 0;
    padding: 1.25rem 1.4rem;
    background: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
}
.collab-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.65rem;
    font-weight: 400;
}
.collab-block p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.75;
}

/* ════════════════════════════════════════════════
   Quote Block
   ════════════════════════════════════════════════ */
.quote-block {
    border-left: 2px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.quote-block blockquote {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    font-style: italic;
    line-height: 1.8;
    font-weight: 300;
}
.quote-block blockquote::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--primary-color);
    line-height: 0;
    vertical-align: -0.6rem;
    margin-right: 4px;
    font-style: normal;
    font-weight: 800;
    opacity: 0.55;
}

/* ════════════════════════════════════════════════
   Photo — RGB Glitch Click (#1)
   ════════════════════════════════════════════════ */
.hero-image.photo-glitch img {
    animation: photoRGBGlitch 0.85s ease forwards !important;
    z-index: 1;
}
@keyframes photoRGBGlitch {
    0%   { transform: translate(0) scaleX(1);     filter: brightness(1) hue-rotate(0deg) contrast(1); clip-path: none; }
    5%   { transform: translate(-7px, 0);          filter: brightness(1.9) hue-rotate(220deg) contrast(2.2) saturate(4); }
    10%  { transform: translate(9px, 0) scaleX(1.012);
           filter: brightness(0.6);
           clip-path: polygon(0 0,100% 0,100% 28%,108% 28%,108% 46%,100% 46%,100% 100%,0 100%); }
    16%  { transform: translate(-5px, 1px) scaleX(0.98);
           filter: brightness(1.3) hue-rotate(-110deg); clip-path: none; }
    22%  { transform: translate(7px, 0);
           filter: brightness(0.75) hue-rotate(80deg) saturate(0);
           clip-path: polygon(0 0,100% 0,100% 62%,-5% 62%,-5% 78%,100% 78%,100% 100%,0 100%); }
    30%  { transform: translate(-3px, 0);          filter: brightness(1.5);  clip-path: none; }
    38%  { transform: translate(5px, 0) scaleX(1.018);
           filter: brightness(0.85) hue-rotate(25deg);
           clip-path: polygon(0 8%,100% 8%,100% 22%,107% 22%,107% 38%,100% 38%,100% 100%,0 100%); }
    46%  { transform: translate(-4px, 0) scaleX(0.985);
           filter: brightness(1.2);  clip-path: none; }
    55%  { transform: translate(3px, 0);           filter: brightness(0.9) hue-rotate(15deg); }
    64%  { transform: translate(-2px, 0) scaleX(1); filter: brightness(1.05); }
    74%  { transform: translate(1px, 0);            filter: brightness(1); clip-path: none; }
    84%  { transform: translate(0) scale(1.008);   filter: brightness(1.02); }
    93%  { transform: translate(0) scale(0.999); }
    100% { transform: translate(0) scaleX(1);      filter: brightness(1) hue-rotate(0deg) contrast(1); clip-path: none; }
}

/* Project screenshot placeholder */
.project-screenshot-ph {
    width: calc(50% - 5px);
    height: 152px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background:
        repeating-linear-gradient(
            45deg,
            rgba(var(--primary-rgb), 0.03) 0px,
            rgba(var(--primary-rgb), 0.03) 1px,
            transparent 1px,
            transparent 14px
        ),
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.07) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: rgba(var(--primary-rgb), 0.28);
    font-size: 1.5rem;
    flex-shrink: 0;
}
.pph-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(var(--primary-rgb), 0.35);
}

/* ════════════════════════════════════════════════
   Blob Interactive (kept for JS compatibility)
   ════════════════════════════════════════════════ */
.blob-splash {
    position: absolute; border-radius: 50%;
    border: 1.5px solid var(--primary-color);
    pointer-events: none; width: 28px; height: 28px;
    transform: translate(-50%, -50%) scale(0.1); opacity: 0.8;
    animation: splashRing 0.85s ease-out forwards; z-index: 2;
}
@keyframes splashRing {
    0%   { opacity: 0.8; transform: translate(-50%,-50%) scale(0.1); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(5); }
}
.hero-image img.blob-punctured {
    animation: none !important;
    filter: brightness(1) !important;
}

/* ════════════════════════════════════════════════
   Theme Toggle Button
   ════════════════════════════════════════════════ */
.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--light-text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.06);
}

/* ════════════════════════════════════════════════
   Dark Theme — variable overrides
   ════════════════════════════════════════════════ */
html.dark {
    --primary-color:    #8b7cf8;
    --primary-hover:    #7c6df5;
    --primary-rgb:      139, 124, 248;
    --accent-color:     #f0a84e;
    --accent-rgb:       240, 168, 78;
    --text-color:       #e2e3f0;
    --light-text-color: #6c6f8e;
    --background-color: #08090d;
    --card-background:  #0e0f18;
    --border-color:     #1c1e30;
}

html.dark .navbar {
    background-color: rgba(8, 9, 13, 0.92);
    border-bottom-color: var(--border-color);
}
html.dark .nav-links {
    background-color: rgba(8, 9, 13, 0.98);
}
html.dark .lang-switcher { background: var(--border-color); }
html.dark .lang-btn.active {
    background: var(--card-background);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

html.dark .hero { background: var(--background-color); }
html.dark .hero-orb-1 {
    background: radial-gradient(ellipse at center, rgba(139, 124, 248, 0.06) 0%, transparent 60%);
}
html.dark .hero-orb-2 {
    background: radial-gradient(ellipse at center, rgba(240, 168, 78, 0.04) 0%, transparent 60%);
}
html.dark .hero-grid {
    background-image:
        linear-gradient(rgba(139, 124, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 124, 248, 0.04) 1px, transparent 1px);
}
html.dark .hero-typed {
    background: linear-gradient(135deg, #e2e3f0 20%, #8b7cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
html.dark .typing-cursor { -webkit-text-fill-color: #8b7cf8; color: #8b7cf8; }

html.dark .hero-image::before { border-color: rgba(139, 124, 248, 0.18); }
html.dark .hero-image::after  { border-color: rgba(240, 168, 78, 0.14); }
html.dark .hero-image img {
    border-color: rgba(139, 124, 248, 0.1);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(139, 124, 248, 0.05);
}

html.dark .stats-section { background: var(--card-background); }

html.dark .btn-primary { color: #fff; }
html.dark .btn-primary:hover { box-shadow: 0 8px 24px rgba(139, 124, 248, 0.22); }

html.dark .project-card { box-shadow: none; }
html.dark .project-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(139, 124, 248, 0.3);
}
html.dark .project-screenshots-wrapper { background: rgba(139, 124, 248, 0.02); }
html.dark .project-overlay { background: rgba(8, 9, 13, 0.82); }
html.dark .project-num { color: rgba(139, 124, 248, 0.06); }

html.dark .contact-card { box-shadow: none; }
html.dark .contact-card:hover { box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45); }

html.dark .skills-card { box-shadow: none; }

html.dark .back-to-top { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
html.dark .back-to-top:hover { color: #0e0f18; }

html.dark .reading-progress { background: linear-gradient(90deg, #8b7cf8, #f0a84e); }
html.dark .lang-fill { background: linear-gradient(90deg, #8b7cf8, rgba(139, 124, 248, 0.5)); }

html.dark .toast { background: var(--card-background); color: var(--text-color); border: 1px solid var(--border-color); }
html.dark footer { background-color: transparent; border-top-color: var(--border-color); }

html.dark .filter-btn { background: var(--card-background); }
html.dark .filter-btn.active { background: var(--primary-color); color: #0e0f18; border-color: var(--primary-color); }

html.dark .quote-block { background: rgba(139, 124, 248, 0.04); }

html.dark .tag {
    background-color: rgba(139, 124, 248, 0.06);
    border-color: rgba(139, 124, 248, 0.14);
}
html.dark .tech-badge { background: var(--card-background); }
html.dark .status-badge { color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }

html.dark .timeline-dot { background: var(--background-color); }
html.dark .timeline-item.past .timeline-dot::after { background: var(--border-color); }

html.dark .contact-card::before {
    background: linear-gradient(90deg, #8b7cf8, #f0a84e);
}
