/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --accent: #3b82f6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    padding: 3rem 0 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Main Content */
main {
    flex: 1;
}

section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

section.intro {
    animation-delay: 0.1s;
}

section.about {
    animation-delay: 0.2s;
}

section.current {
    animation-delay: 0.3s;
}

section.connect {
    animation-delay: 0.4s;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

/* Intro Section */
.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
}

/* About Section */
.about p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Connect Section */
.connect p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.link-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.link-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.link-button:active {
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 3rem 0 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    header {
        padding: 2rem 0 1.5rem;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .links {
        flex-direction: column;
    }

    .link-button {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1rem;
    }

    section {
        margin-bottom: 3rem;
    }
}

/* Projects Page */
.projects-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-header h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-tag.active {
    background: #fef3c7;
    color: #92400e;
}

.project-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Blog Page */
.blog-posts {
    margin-top: 2rem;
}

.blog-post {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent);
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-category {
    padding: 0.25rem 0.75rem;
    background: var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more:hover {
    color: var(--primary-dark);
    gap: 0.5rem;
}

/* Contact Page */
.contact-section {
    margin-top: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form-container h2,
.contact-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--background);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group.focused label {
    color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: -0.5rem;
}

.submit-button {
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.submit-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-icon {
    transition: transform 0.3s ease;
}

.submit-button:hover:not(:disabled) .button-icon {
    transform: translateX(4px);
}

.form-status {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.contact-method {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow);
    border-color: var(--accent);
}

.method-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.method-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.method-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.method-details a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.method-details a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.availability {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.availability h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.availability p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* Dark mode support (optional, respects user preference) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
        --primary-dark: #2563eb;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --background: #111827;
        --surface: #1f2937;
        --border: #374151;
        --accent: #60a5fa;
        --shadow: rgba(0, 0, 0, 0.3);
        --shadow-lg: rgba(0, 0, 0, 0.5);
    }
    
    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .project-tag.active {
        background: #78350f;
        color: #fef3c7;
    }
    
    .form-status.success {
        background: #064e3b;
        color: #d1fae5;
        border-color: #065f46;
    }
    
    .form-status.error {
        background: #7f1d1d;
        color: #fee2e2;
        border-color: #991b1b;
    }
}
