/* ==========================================
   CSS Variables & Theme System
   ========================================== */
:root {
    --bg: #0a0a0f;
    --bg2: #111118;
    --surface: #16161e;
    --surface2: #1e1e28;
    --text: #d4d4d8;
    --text-dim: #9e9eab;
    --heading: #f5f5f7;
    --accent: #f0a500;
    --green: #39ff85;
    --border: #2a2a35;
    --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    --glow-color: rgba(240, 165, 0, 0.04);
    --code-bg: #1a1a24;
    --scrollbar-thumb: #333;
    --scrollbar-track: #111;
    --badge-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg: #f5f5f9;
    --bg2: #ecedf2;
    --surface: #ffffff;
    --surface2: #f0f0f5;
    --text: #2d2d3a;
    --text-dim: #5c5c6e;
    --heading: #111122;
    --accent: #c47c00;
    --green: #0e9e4c;
    --border: #d4d4dc;
    --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    --glow-color: rgba(240, 165, 0, 0.02);
    --code-bg: #e8e8ee;
    --scrollbar-thumb: #bbb;
    --scrollbar-track: #eee;
    --badge-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   Reset & Base
   ========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Smooth transitions for all interactive elements */
button, a, .badge, .project-card, .profile-card, .achievement-item, .contact-item {
    -webkit-tap-highlight-color: transparent;
}

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

.hero-container {
    animation: fadeInUp 0.8s ease-out;
}

/* Add smooth page transitions */
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
    font-size: 16px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }

img { max-width: 100%; display: block; }

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

.section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 1.6rem;
    color: var(--heading);
    margin-bottom: 40px;
    font-weight: 700;
    font-family: 'Courier New', 'Fira Code', monospace;
}

.section-title .hash {
    color: var(--accent);
    margin-right: 8px;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Cursor Glow
   ========================================== */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, var(--glow-color), transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.2s;
}

[data-theme="light"] .cursor-glow {
    display: none;
}

/* ==========================================
   Header
   ========================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, box-shadow 0.3s;
}

#header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent) !important;
    white-space: nowrap;
}

.logo .blink {
    animation: blink 1s step-start infinite;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--accent);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--bg);
    transform: rotate(30deg);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

.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); }

#nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

#nav ul li a {
    color: var(--text-dim);
    font-size: 0.88rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

#nav ul li a:hover,
#nav ul li a.active {
    color: var(--accent);
    background: var(--surface2);
}

/* ==========================================
   Hero Section
   ========================================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-greeting {
    font-family: 'Courier New', 'Fira Code', monospace;
    color: var(--green);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--heading);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-roles {
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 16px;
    min-height: 1.5em;
}

.hero-roles .cursor {
    animation: blink 1s step-start infinite;
    color: var(--accent);
}

.hero-bio {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 14px;
    max-width: 540px;
    line-height: 1.7;
}

.hero-email {
    margin-bottom: 20px;
    font-size: 1rem;
}

.hero-email i {
    color: var(--accent);
    margin-right: 8px;
}

.hero-email a {
    color: var(--green);
    font-weight: 600;
}

.hero-email a:hover {
    text-decoration: underline;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.retro-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.retro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.retro-btn:hover {
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 165, 0, 0.3);
}

.retro-btn:hover::before {
    width: 100%;
}

.hero-ascii {
    display: none;
}

/* ==========================================
   About Section
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}

.about-text strong {
    color: var(--heading);
}

.about-text em {
    color: var(--accent);
    font-style: normal;
}

.about-stats {
    display: flex;
    gap: 36px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-plus {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.about-image {
    display: flex;
    justify-content: center;
}

.img-frame {
    width: 280px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    position: relative;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* ==========================================
   Skills Section
   ========================================== */
.skill-category {
    margin-bottom: 28px;
}

.skill-category:last-child {
    margin-bottom: 0;
}

.skill-category-title {
    font-size: 0.88rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--badge-bg, #333);
    color: var(--badge-fg, #fff);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--badge-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
    white-space: nowrap;
}

.badge i {
    font-size: 1rem;
}

.badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

/* ==========================================
   Projects Section
   ========================================== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 7px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(240, 165, 0, 0.2);
}

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

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 26px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.project-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.project-header a {
    color: var(--text-dim);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.project-header a:hover {
    color: var(--accent);
}

.project-card h3 {
    font-size: 1.1rem;
    color: var(--heading);
    margin-bottom: 10px;
    font-weight: 600;
}

.project-card p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.project-tech span {
    padding: 4px 11px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-weight: 600;
    transition: all 0.2s;
}

.project-tech span:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(240, 165, 0, 0.2);
    border-color: var(--accent);
}

.project-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.72rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

.badge-backend { background: rgba(51, 153, 51, 0.15); color: #39ff85; }
.badge-ml { background: rgba(238, 76, 44, 0.15); color: #ff6b4a; }
.badge-fullstack { background: rgba(97, 218, 251, 0.15); color: #61dafb; }
.badge-other { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

[data-theme="light"] .badge-backend { background: rgba(16, 185, 87, 0.12); color: #0a8a47; }
[data-theme="light"] .badge-ml { background: rgba(238, 76, 44, 0.12); color: #c44a30; }
[data-theme="light"] .badge-fullstack { background: rgba(97, 218, 251, 0.12); color: #0a7abf; }
[data-theme="light"] .badge-other { background: rgba(147, 51, 234, 0.12); color: #7c3aed; }

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination button.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   Experience & Education
   ========================================== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -35px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.timeline-header h3 {
    font-size: 1.05rem;
    color: var(--heading);
}

.timeline-date {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--accent);
    white-space: nowrap;
}

.timeline-place {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-place i {
    margin-right: 6px;
    color: var(--accent);
}

.timeline-content ul {
    padding-left: 20px;
}

.timeline-content li {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 4px;
}

/* Education Card */
.education-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 26px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.education-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.edu-icon {
    font-size: 2rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 4px;
}

.edu-info h3 {
    color: var(--heading);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.edu-place {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.edu-date {
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.edu-note {
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================
   CP Profiles
   ========================================== */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.profile-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(240, 165, 0, 0.1);
}

.profile-card:hover::after {
    transform: scaleX(1);
}

.profile-rank {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
}

.profile-card h3 {
    font-size: 1rem;
    color: var(--heading);
}

.profile-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.profile-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-dim);
    transition: color 0.2s, transform 0.2s;
}

.profile-card:hover .profile-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* ==========================================
   Achievements (List Style)
   ========================================== */
.achievements-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    position: relative;
    transition: background 0.2s;
}

.achievement-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-item:hover {
    background: var(--surface2);
}

.achievement-item:hover::before {
    transform: scaleY(1);
}

.achievement-item:first-child {
    border-radius: 8px 8px 0 0;
}

.achievement-item:last-child {
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
}

.achievement-item:only-child {
    border-radius: 8px;
    border-bottom: 1px solid var(--border);
}

.achievement-item .achievement-icon {
    font-size: 1.3rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
    width: 28px;
    text-align: center;
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    font-size: 1rem;
    color: var(--heading);
    margin-bottom: 4px;
    font-weight: 600;
}

.achievement-info p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.contact-intro h3 {
    font-size: 1.6rem;
    color: var(--heading);
    margin-bottom: 12px;
}

.contact-intro p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 16px;
}

.contact-intro .contact-location {
    text-align: left;
    border-top: none;
    padding-top: 0;
    font-size: 0.95rem;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.contact-card i {
    font-size: 1.6rem;
    color: var(--accent);
    transition: transform 0.3s;
}

.contact-card span {
    font-size: 0.82rem;
    font-weight: 500;
    word-break: break-word;
    font-family: 'Courier New', monospace;
}

.contact-card:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(240, 165, 0, 0.25);
}

.contact-card:hover i {
    color: var(--bg);
    transform: scale(1.1);
}

.contact-location i {
    margin-right: 6px;
    color: var(--accent);
}

/* ==========================================
   Footer
   ========================================== */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
}

footer p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ==========================================
   Back to Top
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 10px;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(240, 165, 0, 0.4);
    background: var(--green);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-bio {
        max-width: 100%;
    }

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

    .hero-ascii {
        display: none;
    }

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

    .about-image {
        order: -1;
    }

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    #nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    #nav.open {
        max-height: 400px;
    }

    #nav ul {
        flex-direction: column;
        gap: 0;
        padding: 12px 24px;
    }

    #nav ul li a {
        display: block;
        padding: 12px 0;
        font-size: 0.95rem;
    }

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

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

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

    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .timeline-header {
        flex-direction: column;
    }

    .achievement-item {
        padding: 16px 18px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .contact-intro .contact-location {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 50px 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .about-stats {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

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

    .achievement-item {
        padding: 14px 16px;
        gap: 14px;
    }

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

    .skill-badges {
        gap: 8px;
    }

    .badge {
        font-size: 0.78rem;
        padding: 5px 10px;
    }
}
