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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-alt: #1e293b;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --border-color: #334155;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-alt);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

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

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
    background-color: var(--bg-color);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-alt);
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-alt) 100%);
    padding-top: 64px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Availability Badge */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 24px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Tech Logos */
.tech-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
}

.tech-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    min-width: 80px;
}

.tech-logo:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.tech-logo svg,
.tech-logo img {
    width: 40px;
    height: 40px;
}

.tech-logo span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

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

/* Sections */
.section {
    padding: 96px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-color);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.about-image {
    width: 100%;
}

.image-placeholder {
    width: 250px;
    height: 250px;
    background: var(--bg-alt);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.about-text p {
    margin-bottom: 16px;
    font-size: 1.125rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.skill-category {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.skill-category-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.skill-list li:last-child {
    border-bottom: none;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.project-date {
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
    padding-top: 2px;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-alt);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cert-card {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-4px);
}

.cert-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.cert-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.cert-issuer {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.cert-date {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Contact Section */

/* Homelab Section */
.homelab-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto 48px;
    font-size: 1.125rem;
    line-height: 1.7;
}

.homelab-arch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 64px;
    padding: 32px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--card-shadow);
}

.arch-node {
    text-align: center;
    padding: 16px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    transition: var(--transition);
}

.arch-node:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.arch-icon {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.arch-node h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.arch-node p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

.arch-connector {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1;
}

.arch-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.arch-service {
    text-align: center;
    padding: 10px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.arch-service:hover {
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .homelab-arch {
        padding: 20px;
    }
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.contact-links {
    list-style: none;
}

.contact-links li {
    margin-bottom: 12px;
    color: var(--text-color);
}

.contact-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-links a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.contact-form .btn {
    align-self: flex-start;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 32px 0;
    text-align: center;
}

[data-theme="dark"] .footer {
    background: #1e293b;
    border-top: 1px solid #334155;
}

.footer p {
    margin-bottom: 16px;
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        display: flex;
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}