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

:root {
    /* Colors */
    --primary: #1e40af;
    --accent: #3b82f6;
    --background: #ffffff;
    --foreground: #0f172a;
    --muted: #64748b;
    --muted-foreground: #475569;
    --border: #e2e8f0;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 5rem 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--muted-foreground);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.linkedin-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
}

/* Mobile Navigation */
.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 8rem 1.5rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

/* About Section */
.about {
    padding: 3rem 1.5rem;
}

.about-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 2fr 1fr;
        gap: 4rem;
    }
}

.about-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;
}

@media (min-width: 768px) {
    .about-content h2 {
        font-size: 2.5rem;
    }
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--card-foreground);
}

.facts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fact-item i {
    color: var(--accent);
    width: 1.25rem;
    height: 1.25rem;
}

.patents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Experience Section */
.experience {
    padding: var(--section-padding);
    background: var(--secondary);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 3rem;
}

@media (min-width: 768px) {
    .timeline-item {
        width: 50%;
        padding: 0 2rem;
    }
    
    .timeline-item:nth-child(even) {
        margin-left: 50%;
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--background);
}

@media (min-width: 768px) {
    .timeline-item::before {
        left: -2.5rem;
    }
    
    .timeline-item:nth-child(even)::before {
        right: -2.5rem;
        left: auto;
    }
}

.timeline-content {
    background: var(--card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.company {
    color: var(--accent);
    font-weight: 500;
    margin-right: 1rem;
}

.period {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.role-description {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.achievements h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.achievements ul {
    list-style: none;
    padding-left: 0;
}

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.achievements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Skills Section */
.skills {
    padding: var(--section-padding);
}

.skills-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-category {
    background: var(--card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
    background: var(--background);
}

.projects-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.project-card > p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-details {
    margin-bottom: 1rem;
}

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

.project-details ul {
    list-style: none;
    padding-left: 0;
}

.project-details li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.project-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-metrics {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Blog Section */
.blog {
    padding: var(--section-padding);
    background: var(--secondary);
}

.blog-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.blog-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.blog-date i {
    width: 1rem;
    height: 1rem;
}

.blog-card h3 {
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--foreground);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.blog-card h3 a:hover {
    color: var(--accent);
}

.blog-card > p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.blog-tag {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    transition: var(--transition);
}

.read-more:hover {
    color: #2563eb;
}

.read-more i {
    width: 0.75rem;
    height: 0.75rem;
}

.blog-cta {
    text-align: center;
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background: var(--primary);
    color: white;
    text-align: center;
}

.contact .section-title {
    color: white;
    margin-bottom: 1.5rem;
}

.contact-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.contact-cta {
    display: flex;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary i {
    width: 1rem;
    height: 1rem;
}

.btn-large i {
    width: 1.5rem;
    height: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 767px) {
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .about {
        padding: 2rem 1rem;
    }
    
    .experience,
    .skills,
    .projects,
    .blog {
        padding: 3rem 1rem;
    }
    
    .contact {
        padding: 3rem 1rem;
    }
    
    .timeline-item {
        padding-left: 2rem;
    }
    
    .timeline::before {
        left: 0.5rem;
    }
    
    .timeline-item::before {
        left: 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .contact {
        display: none;
    }
    
    .hero {
        padding-top: 2rem;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}