* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GitHub Light Mode */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #ffffff;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-tertiary: #6e7781;
    --accent: #0969da;
    --accent-hover: #0550ae;
    --accent-light: rgba(9, 105, 218, 0.1);
    --border: #d0d7de;
    --shadow: rgba(31, 35, 40, 0.12);
    --shadow-lg: rgba(31, 35, 40, 0.15);
}

/* GitHub Dark Mode */
body.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #0d1117;
    --text-primary: #e6edf3;
    --text-secondary: #8d96a0;
    --text-tertiary: #7d8590;
    --accent: #2f81f7;
    --accent-hover: #539bf5;
    --accent-light: rgba(47, 129, 247, 0.1);
    --border: #30363d;
    --shadow: rgba(1, 4, 9, 0.4);
    --shadow-lg: rgba(1, 4, 9, 0.6);
}

/* Terminal Mode */
body.terminal-mode {
    --bg-primary: #0c0c0c;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #0c0c0c;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-tertiary: #00aa2b;
    --accent: #00ff41;
    --accent-hover: #00cc33;
    --accent-light: rgba(0, 255, 65, 0.1);
    --border: #00ff41;
    --shadow: rgba(0, 255, 65, 0.2);
    --shadow-lg: rgba(0, 255, 65, 0.3);
}

body.terminal-mode {
    font-family: 'Courier New', 'Consolas', monospace;
}

body.terminal-mode .logo::before {
    content: '$ ';
}

body.terminal-mode .section-title::before {
    background: var(--accent);
    animation: blink 1s infinite;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* Navbar */
.navbar {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--shadow);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo::before {
    content: '👋 ';
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

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

.theme-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.theme-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
    opacity: 0.6;
}

.theme-btn:hover {
    background: var(--accent-light);
    opacity: 1;
    transform: scale(1.1);
}

.theme-btn.active {
    background: var(--accent-light);
    opacity: 1;
    border: 1px solid var(--accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

/* Hero Section */
.hero {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 180px 0 120px;
    text-align: left;
    margin-top: 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-light) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.highlight {
    color: var(--accent);
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-tagline {
    font-size: 1rem;
    margin-bottom: 2.5rem;
    color: var(--text-tertiary);
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 14px var(--shadow);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-lg);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: left;
    font-size: 2.25rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 32px;
    background: var(--accent);
    margin-right: 12px;
    vertical-align: middle;
}

.about-text {
    max-width: 800px;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.skill-item {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-item:hover::before {
    transform: scaleX(1);
}

.skill-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.skill-item h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.skill-item p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.project-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow);
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.2rem;
}

.project-card p {
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.project-link:hover {
    color: var(--accent-hover);
    gap: 8px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-info {
    max-width: 600px;
    margin: 2.5rem auto 0;
    text-align: left;
}

.contact-item {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    padding: 0.5rem 0;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 600;
}

.contact-item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        box-shadow: -4px 0 24px var(--shadow);
        transition: right 0.3s ease;
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        display: block;
        font-size: 1.1rem;
    }

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

    .nav-right {
        gap: 1rem;
    }

    .theme-switcher {
        padding: 3px;
    }

    .theme-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }

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

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

    .section-title::before {
        height: 28px;
    }

    .about-text {
        font-size: 1rem;
    }
    
    .project-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 20px;
    }

    .about,
    .skills,
    .projects,
    .contact {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

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

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

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

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

    .about-text {
        font-size: 0.95rem;
    }

    .project-card,
    .skill-item {
        padding: 1.5rem;
    }

    .container {
        padding: 0 16px;
    }
}
