/* ============================================
   Global Styles & Reset
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1f2937;
    --accent-color: #10b981;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--white);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero-content {
    padding: 2rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-section {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

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

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

/* ============================================
   Project Card
   ============================================ */
.project-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--light-bg);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Tech Stack Badges
   ============================================ */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    display: inline-block;
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* ============================================
   Buttons
   ============================================ */
.card-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

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

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

/* ============================================
   Skills Section
   ============================================ */
.skills-section {
    padding: 4rem 0;
    background-color: var(--white);
}

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

.skill-category {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.skill-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.skill-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
}

.contact-section .section-title {
    color: var(--white);
    margin-bottom: 2rem;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content > p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--white);
    border-radius: 8px;
    transition: var(--transition);
}

.contact-link:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

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

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-description {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    .card-links {
        gap: 0.75rem;
    }

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

    .contact-links {
        gap: 1rem;
    }

    .contact-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 3rem 0;
    }

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

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

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .projects-section,
    .skills-section,
    .contact-section {
        padding: 2rem 0;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }

    .nav-links {
        gap: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .logo {
        font-size: 1.25rem;
    }

    .card-image-wrapper {
        height: 200px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .tech-stack {
        gap: 0.35rem;
    }

    .tech-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        flex: 1;
    }

    .card-links {
        flex-direction: column;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-link {
        width: 100%;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeIn 0.6s ease-in-out;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.btn:focus,
.contact-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
