/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #334155;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

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

/* Dark mode font - IBM Plex Mono */
[data-theme="dark"] body {
    font-family: 'IBM Plex Mono', 'Inter', monospace, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    position: relative;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(15deg);
}

.theme-toggle:hover .theme-icon {
    color: white;
}

.theme-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: var(--transition);
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon.moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-icon.sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-icon.moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0e27;
    color: white;
    text-align: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Light mode hero background - original gradient */
[data-theme="light"] .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Dark mode hero background (default) */
[data-theme="dark"] .hero {
    background: #0a0e27;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

/* Hide canvas in light mode */
[data-theme="light"] .hero-canvas {
    display: none;
}

[data-theme="dark"] .hero-canvas {
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.15) 0%, rgba(10, 14, 39, 0.95) 70%);
    z-index: 1;
    transition: background 0.5s ease;
}

/* Hide overlay in light mode */
[data-theme="light"] .hero-overlay {
    display: none;
}

/* Dark mode overlay */
[data-theme="dark"] .hero-overlay {
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.15) 0%, rgba(10, 14, 39, 0.95) 70%);
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

/* Light mode text shadows */
[data-theme="light"] .hero-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
}

.greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* Light mode greeting - white text */
[data-theme="light"] .greeting {
    color: white;
    opacity: 0.9;
}

[data-theme="dark"] .greeting {
    color: white;
}

.name {
    display: block;
    background: linear-gradient(120deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.3));
    position: relative;
}

/* Light mode name - white to match other text */
[data-theme="light"] .name {
    color: white;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
    background-clip: unset;
    filter: none;
}

[data-theme="dark"] .name {
    color: #00f5ff;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.6), 0 0 40px rgba(0, 245, 255, 0.4), 0 0 60px rgba(0, 245, 255, 0.2);
    filter: drop-shadow(0 4px 20px rgba(0, 245, 255, 0.5));
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* Light mode subtitle - white text */
[data-theme="light"] .hero-subtitle {
    color: white;
    opacity: 0.95;
}

[data-theme="dark"] .hero-subtitle {
    color: white;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Light mode description - white text */
[data-theme="light"] .hero-description {
    color: white;
    opacity: 0.9;
}

[data-theme="dark"] .hero-description {
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    opacity: 0.9;
    font-size: 0.875rem;
    animation: bounce 2s infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

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

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Experience Section */
.experience {
    background: var(--bg-primary);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--border-color);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 600;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: auto;
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-bullets {
    list-style: none;
    padding-left: 0;
}

.timeline-bullets li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-placeholder {
    color: white;
    font-size: 1.125rem;
    opacity: 0.8;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

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

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-link svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-dark);
}

.project-link:hover svg {
    transform: scale(1.15);
}

/* Project Card Hidden State */
.project-card-hidden {
    display: none;
}

.projects-grid.expanded .project-card-hidden {
    display: flex;
    animation: fadeInUp 0.4s ease;
}

/* Projects Expand Button */
.projects-expand-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.projects-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.projects-expand-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.projects-expand-btn:hover .chevron-icon {
    transform: translateY(2px);
}

.projects-expand-btn .chevron-icon {
    transition: var(--transition);
    transform: rotate(0deg);
}

.projects-expand-btn.expanded .chevron-icon {
    transform: rotate(180deg);
}

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

.skills-content {
    max-width: 900px;
    margin: 0 auto;
}

.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.skill-tab {
    padding: 0.875rem 2rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.skill-tab:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.skill-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.skill-tab.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.skills-panels {
    position: relative;
    min-height: 300px;
}

.skills-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.skills-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s ease;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.skill-item {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: inline-block;
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

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

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-link:hover .contact-icon {
    transform: scale(1.1);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

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

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .skills-tabs {
        gap: 0.5rem;
    }

    .skill-tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .skills-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 1.5rem;
        gap: 0.75rem;
    }

    .skills-panels {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .greeting {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

