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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
}

/* Container - Mobile First */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.hero h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero .tagline {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0.5rem;
}

.hero-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.hero-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    display: block;
    /* Ensure touch targets are at least 44x44px on mobile */
    min-height: 44px;
}

.hero-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-nav .cta-button {
    background-color: #ffffff;
    color: #4c51bf;
}

.hero-nav .cta-button:hover {
    background-color: #f7fafc;
    color: #434190;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sections - Mobile First */
.section {
    padding: 3rem 0;
}

.section-alt {
    background-color: #f7fafc;
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #1a202c;
    font-weight: 700;
}

/* Projects Section - Mobile First */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.project-screenshot {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.project-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
    color: #2d3748;
    font-weight: 600;
}

.project-description {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    background-color: #edf2f7;
    color: #4a5568;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.project-link {
    color: #4c51bf;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-top: 8px;
    transition: all 0.2s ease;
    /* Larger touch target for mobile */
    padding: 0.25rem 0;
}

.project-link:hover {
    color: #434190;
    transform: translateX(4px);
}

.more-projects {
    text-align: center;
    margin-top: 1.5rem;
}

.secondary-link {
    color: #4c51bf;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.secondary-link:hover {
    color: #434190;
}

/* Skills Section - Mobile First */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    background-color: #ffffff;
    color: #2d3748;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.skill-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #667eea;
}

/* About Section - Mobile First */
.about-content {
    max-width: 750px;
    margin: 0 auto;
    font-size: 0.9375rem;
    line-height: 1.75;
}

.about-content p {
    margin-bottom: 1.25rem;
    color: #4a5568;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content strong {
    color: #2d3748;
    font-weight: 600;
}

/* Contact Section - Mobile First */
.contact-intro {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #4a5568;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: #2d3748;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.form-message {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    color: #2d3748;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    /* Ensure adequate touch target */
    min-height: 44px;
}

.contact-link:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.contact-link svg {
    flex-shrink: 0;
}

.github-link:hover {
    border-color: #2d3748;
    color: #1a202c;
}

.linkedin-link:hover {
    border-color: #0077b5;
    color: #0077b5;
}

/* Footer - Mobile First */
.footer {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Tablet Styles (min-width: 481px) */
@media (min-width: 481px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .subtitle {
        font-size: 1.25rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-nav a {
        display: inline-block;
    }

    .section h2 {
        font-size: 1.875rem;
    }

    .project-card {
        padding: 2rem;
    }

    .about-content {
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* Desktop Styles (min-width: 769px) */
@media (min-width: 769px) {
    .hero {
        padding: 5rem 0 4rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .subtitle {
        font-size: 1.5rem;
    }

    .hero .tagline {
        font-size: 1.125rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section h2 {
        font-size: 2.25rem;
        margin-bottom: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .project-screenshot {
        max-height: 300px;
        margin-bottom: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .project-description {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .tech-tag {
        font-size: 0.875rem;
    }

    .project-tech {
        margin-bottom: 1.5rem;
    }

    .more-projects {
        margin-top: 2rem;
    }

    .secondary-link {
        font-size: 1.125rem;
    }

    .skills-list {
        gap: 1rem;
    }

    .skill-item {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .about-content {
        font-size: 1.125rem;
    }

    .about-content p {
        margin-bottom: 1.5rem;
    }

    .contact-intro {
        font-size: 1.125rem;
        margin-bottom: 2.5rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .submit-button {
        width: auto;
        padding: 1rem 3rem;
    }

    .contact-links {
        gap: 1.25rem;
    }

    .contact-link {
        gap: 1rem;
        padding: 1.25rem 1.5rem;
        font-size: 1.125rem;
    }

    .footer {
        padding: 2.5rem 0;
    }

    .footer p {
        font-size: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}
