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

/* CSS Variables */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --secondary: #666;
    --accent: #0066cc;
    --border: #e0e0e0;
}

body.dark {
    --bg: #0a0a0a;
    --text: #e0e0e0;
    --secondary: #999;
    --accent: #4a9eff;
    --border: #2a2a2a;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 60px;
}

.logo {
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* Hero Section */
.hero {
    margin-bottom: 80px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.hero .description {
    font-size: 16px;
    color: var(--secondary);
    line-height: 1.8;
    max-width: 600px;
}

/* Sections */
.section {
    margin-bottom: 80px;
}

.section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.skill-item {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s, border-color 0.2s;
}

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

.skill-item .emoji {
    font-size: 24px;
    margin-bottom: 10px;
}

.skill-item h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.skill-desc {
    color: var(--secondary);
    font-size: 14px;
    margin-top: 5px;
}

/* Certifications Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cert-card {
    padding: 30px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.cert-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.cert-badge {
    font-size: 40px;
    margin-bottom: 15px;
}

.cert-badge-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 15px;
    display: block;
    transition: transform 0.2s;
}

.cert-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cert-issuer {
    color: var(--secondary);
    font-size: 14px;
}

/* Project Cards */
.project-card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.project-card p {
    color: var(--secondary);
    line-height: 1.8;
}

.project-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
    color: var(--secondary);
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tag {
    padding: 5px 12px;
    background: var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: opacity 0.2s;
    margin-top: 20px;
}

.cta-button:hover {
    opacity: 0.9;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Blog Posts */
.post-list {
    list-style: none;
}

.post-item {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.post-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.post-date {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.post-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.post-item h3 a {
    color: var(--text);
    text-decoration: none;
}

.post-item h3 a:hover {
    color: var(--accent);
}

.post-excerpt {
    color: var(--secondary);
    line-height: 1.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--secondary);
    font-size: 14px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

    .nav-links {
        gap: 15px;
        font-size: 13px;
    }

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

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

    nav {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .theme-toggle {
        order: 2;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 20px;
        justify-content: center;
    }
}