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

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #475569;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

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

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

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

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

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Sections */
.section {
    padding: 4rem 0;
}

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

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Page Header */
.page-header {
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.card-content h3 a:hover {
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #475569;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-alt);
    color: var(--text-light);
    border-radius: 1rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.tag:hover {
    background: var(--border-color);
}

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

.tag-small {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
}

/* Posts */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-preview {
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.post-preview h2,
.post-preview h3 {
    margin-bottom: 0.5rem;
}

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

.post-preview h2 a:hover,
.post-preview h3 a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Post Detail */
.post-detail,
.project-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-header,
.project-header {
    margin-bottom: 2rem;
}

.post-header h1,
.project-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-featured-image,
.project-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.post-content,
.project-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content h2,
.project-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p,
.project-content p {
    margin-bottom: 1rem;
}

.post-footer,
.project-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Resume */
.resume-section {
    margin-bottom: 3rem;
}

.resume-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.resume-entry {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.resume-entry:last-child {
    border-bottom: none;
}

.resume-entry h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.resume-entry h4 {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.date-range {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.skill-card h4 {
    margin-bottom: 0.5rem;
}

.proficiency {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.proficiency-beginner {
    background: #fef3c7;
    color: #92400e;
}

.proficiency-intermediate {
    background: #dbeafe;
    color: #1e40af;
}

.proficiency-advanced {
    background: #d1fae5;
    color: #065f46;
}

.proficiency-expert {
    background: #e9d5ff;
    color: #6b21a8;
}

/* Filter Section */
.filter-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 0.5rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 3rem;
    font-size: 1.125rem;
}

/* Intro Section */
.intro-section {
    max-width: 800px;
    margin: 0 auto;
}

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

/* Contact Form */
.contact-content {
    max-width: 600px;
    margin: 2rem auto;
}

.contact-form {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

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

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

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Alerts/Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

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

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

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

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}
