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

:root {
    /* Light Mode Colors - Professional Developer Theme */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #0ea5e9;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-accent: #f3f4f6;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-inverse: #ffffff;
    
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

body.dark-mode {
    /* Dark Mode Colors - Professional Developer Theme */
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --accent-color: #38bdf8;
    
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-accent: #374151;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-inverse: #111827;
    
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

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

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

/* Navigation Bar */
.navbar {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

body.dark-mode .navbar {
    background-color: rgba(17, 24, 39, 0.95);
    border-bottom-color: var(--border-color);
}

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

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

.availability {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 600;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

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

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

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

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

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

/* Dark Mode Toggle */
.dark-mode-toggle-wrapper {
    position: relative;
}

.dark-mode-toggle {
    background: var(--bg-accent);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--text-primary);
    color: var(--text-inverse);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
}

.dark-mode-toggle:hover .dark-mode-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Sections */
.section {
    padding: 5rem 0;
    min-height: 50vh;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    color: var(--text-inverse);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
    font-weight: 700;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
    font-weight: 400;
    color: #93c5fd;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.4s backwards;
    color: #e0e7ff;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #ffffff;
    color: #1e40af;
    border: 2px solid #ffffff;
}

.btn-primary:hover {
    background: #f3f4f6;
    color: #1e3a8a;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* About Section */
#about {
    background-color: var(--bg-primary);
}

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

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

.about-text h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.skill-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.skill-tag:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
    box-shadow: var(--shadow);
}

/* Stats Section */
.stats-section {
    background: var(--bg-secondary);
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Projects Section */
#projects {
    background-color: var(--bg-primary);
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background: var(--bg-accent);
    border-color: var(--primary-color);
}

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

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

.project-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Stagger animation */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.project-card > div:not(.project-image) {
    padding: 1.5rem;
}

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

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

.project-card p {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0 1.5rem;
}

.project-tag {
    background-color: var(--bg-accent);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Contact Section */
#contact {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

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

.contact-content > p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

.contact-item p {
    color: var(--text-primary);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

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

.footer p {
    margin: 0.5rem 0;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

body.dark-mode .login-box {
    background: var(--bg-secondary);
}

.login-box h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    display: none;
    text-align: center;
    font-weight: 600;
}

#contact-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* Admin Panel */
.admin-container {
    padding: 2rem 0;
}

.admin-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.admin-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.project-form {
    max-width: 600px;
}

.admin-projects-list {
    display: grid;
    gap: 1.5rem;
}

.admin-project-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
}

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

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

.admin-project-card p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.admin-project-card a {
    color: var(--primary-color);
    word-break: break-all;
}

.admin-project-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    font-size: 1.1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .availability {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}