/* ============================================
   CSS Variables & Theme System
   ============================================ */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(17, 17, 40, 0.7);
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #667eea;
    --accent-light: #8b9cf7;
    --accent-glow: rgba(102, 126, 234, 0.3);
    --accent-secondary: #00d4ff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #667eea 100%);
    --gradient-hero: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.15);
    --nav-bg: rgba(10, 10, 26, 0.85);
    --nav-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a8;
    --accent: #5a6fd6;
    --accent-light: #667eea;
    --accent-glow: rgba(90, 111, 214, 0.2);
    --accent-secondary: #0ea5e9;
    --gradient-hero: linear-gradient(135deg, #f8f9fc 0%, #e8ecf8 50%, #f8f9fc 100%);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(90, 111, 214, 0.1);
    --nav-bg: rgba(248, 249, 252, 0.85);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

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

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

/* ============================================
   Loading Screen
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

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

.loader-logo {
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.loader-bracket {
    color: var(--accent);
}

.loader-name {
    color: var(--text-primary);
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 3px;
    animation: loaderFill 1.5s ease-in-out forwards;
}

@keyframes loaderFill {
    to { width: 100%; }
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
}

/* ============================================
   Particles Canvas
   ============================================ */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    font-family: 'Fira Code', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s;
}

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

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.3s, background 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s, left 0.3s;
    border-radius: 2px;
}

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

.nav-link.active::after {
    width: 60%;
    left: 20%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    border: 1px solid var(--border);
}

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

.theme-toggle i {
    position: absolute;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: opacity 0.3s, transform 0.3s;
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0);
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 130vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--nav-height);
}

/* Eraser Canvas */
#eraser-canvas {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: crosshair;
    pointer-events: auto;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 12;
    text-align: center;
    max-width: 900px;
    padding-top: 10vh;
    padding-bottom: 0;
    pointer-events: none;
}

.hero-top {
    position: relative;
    z-index: 12;
    text-align: center;
    padding-top: 10vh;
}

.hero-scroll-phrases {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-greeting {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.hero-name {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-cursor {
    font-weight: 300;
    -webkit-text-fill-color: var(--accent);
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 2em;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-download:hover i {
    transform: translateY(3px);
}

/* Hero Scroll Phrases - Staggered Layout */
.hero-scroll-phrases {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.phrase-line {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.phrase-line:nth-child(even) {
    padding-left: 80px;
}

.phrase-line:nth-child(3n) {
    padding-left: 40px;
}

.phrase-zh {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.phrase-en {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 400;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    white-space: nowrap;
    opacity: 0.7;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: fadeInUp 1s ease 2s both;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
    animation: none;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.mouse-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent);
    border-radius: 3px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* Hero Decorations */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
}

.hero-deco-1 {
    width: 400px;
    height: 400px;
    background: #667eea;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-deco-2 {
    width: 300px;
    height: 300px;
    background: #764ba2;
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-deco-3 {
    width: 200px;
    height: 200px;
    background: #00d4ff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(-20px, 30px); }
    75% { transform: translate(20px, 20px); }
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.title-text {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
}

.title-line {
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 4px;
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.about-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.4s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card-inner {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    height: 100%;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.about-card:hover .about-card-inner {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.about-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.about-icon i {
    font-size: 1.2rem;
    color: white;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    transition: background 0.5s;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-category {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.skill-category-title i {
    color: var(--accent);
    font-size: 1rem;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skill-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-percent {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
}

.skill-bar-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skill Tags */
.skill-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s;
    cursor: default;
    animation: tagFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.3s);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

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

/* ============================================
   Gallery Section
   ============================================ */
.gallery {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 26, 0.95) 0%, rgba(10, 10, 26, 0.4) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-info p {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

.gallery-zoom {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    transform: scale(0);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-zoom {
    transform: scale(1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   Projects Section
   ============================================ */
.projects {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    transition: background 0.5s;
}

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

.project-card {
    position: relative;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.project-card-glow {
    position: absolute;
    inset: -1px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
    filter: blur(15px);
}

.project-card:hover .project-card-glow {
    opacity: 0.15;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon i {
    font-size: 1.3rem;
    color: white;
}

.project-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 50%;
    transition: color 0.3s, background 0.3s;
}

.project-links a:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    padding: 0.3rem 0.8rem;
    background: var(--accent-glow);
    color: var(--accent-light);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Fira Code', monospace;
}

.project-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.project-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.progress {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulse 2s infinite;
}

.status-dot.planned {
    background: var(--text-muted);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
    cursor: pointer;
}

.contact-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateX(8px);
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon i {
    font-size: 1.2rem;
    color: white;
}

.contact-card-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.contact-card-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-card-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

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

/* ============================================
   Guestbook Section
   ============================================ */
.guestbook {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    transition: background 0.5s;
}

.guestbook-content {
    max-width: 650px;
    margin: 0 auto;
}

.guestbook-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.form-row {
    width: 100%;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

.btn-submit:hover i {
    transform: translateX(3px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    position: relative;
    z-index: 1;
    transition: background 0.5s, border-color 0.5s;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.treehole-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    text-decoration: none;
    opacity: 0.06;
    transition: opacity 0.8s ease, color 0.5s ease;
    cursor: default;
}

.treehole-link:hover {
    opacity: 0.5;
    color: var(--accent);
    cursor: pointer;
}

.heart {
    color: #ef4444;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.back-to-top i {
    position: absolute;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 138.23;
    stroke-dashoffset: 138.23;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s;
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* ============================================
   Utility Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid .skill-category:last-child {
        grid-column: 1 / -1;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .phrase-line:nth-child(even) {
        padding-left: 40px;
    }

    .phrase-line:nth-child(3n) {
        padding-left: 20px;
    }

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

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

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .phrase-line {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }

    .phrase-line:nth-child(even),
    .phrase-line:nth-child(3n) {
        padding-left: 0;
    }

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

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
}
