/* ========================================
   CSS Variables & Reset
   ======================================== */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ========================================
   Main Content & Sections
   ======================================== */

main {
    min-height: calc(100vh - 200px);
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
}

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

.page-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.highlight {
    color: var(--primary-color);
}

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

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* ========================================
   Project Grid & Cards
   ======================================== */

.project-grid,
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card,
.portfolio-item {
    background-color: var(--bg-white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover,
.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image,
.portfolio-image {
    width: 100%;
    height: 250px;
    background-color: var(--bg-light);
    overflow: hidden;
    position: relative;
}

.project-image img,
.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.view-project {
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    border-radius: 0.5rem;
}

.project-info,
.portfolio-details {
    padding: 1.5rem;
}

.project-info h3,
.portfolio-details h3 {
    margin-bottom: 0.5rem;
}

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

.project-tags {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-light);
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   Portfolio Filter
   ======================================== */

.portfolio-filter {
    padding: 2rem;
    text-align: center;
}

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

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: white;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   About Page
   ======================================== */

.about-intro {
    background-color: var(--bg-light);
    padding: 4rem 2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    width: 100%;
    max-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
}

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

.skill-category {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* ========================================
   Timeline
   ======================================== */

.timeline {
    max-width: 800px;
    margin: 2rem auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
}

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

/* ========================================
   Contact Page
   ======================================== */

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    height: fit-content;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.social-list li {
    margin-bottom: 0.5rem;
}

.availability-status {
    color: #059669;
    font-weight: 600;
}

/* ========================================
   Contact Form
   ======================================== */

.contact-form-wrapper h2 {
    margin-bottom: 2rem;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    display: block;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    text-align: center;
    background-color: var(--bg-light);
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin-top: 4rem;
}

/* ========================================
   Footer
   ======================================== */

footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: white;
}

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

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    section {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .project-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
