:root {
    --primary-color: #007acc;
    --text-primary: #333333;
    --text-secondary: #666666;
    --background-white: #ffffff;
    --border-color: #e5e5e5;
    --link-color: #007acc;
    --hover-color: #005a9e;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
    font-size: 16px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 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-color);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    width: 100%;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-picture {
    flex-shrink: 0;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: transform 0.3s ease;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2rem;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* Fallback for missing image */
.profile-picture::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--link-color), var(--hover-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-img:not([src]), .profile-img[src=""] {
    background: linear-gradient(135deg, var(--link-color), var(--hover-color));
    color: white;
}

.profile-img:not([src])::after, .profile-img[src=""]::after {
    content: '👤';
    font-size: 3rem;
}

.profile-text {
    flex: 1;
}

.profile-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.profile-text .hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-weight: 400;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--link-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.link-button:hover {
    background: var(--hover-color);
}

.link-button i {
    font-size: 1rem;
}

/* About Section */
.about {
    padding: 80px 0;
}

.about-content {
    max-width: 700px;
}

.about h2 {
    margin-bottom: 2rem;
}

.about p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.skills {
    margin-top: 3rem;
}

.skills h3 {
    margin-bottom: 1rem;
}

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

.skill-list span {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background: #fafafa;
}

.projects h2 {
    margin-bottom: 3rem;
}

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

.project-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.project-tech span {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-cta {
    margin-top: 1rem;
}

.project-btn {
    background: var(--link-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.project-btn:hover {
    background: var(--hover-color);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-body h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-body p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.modal-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.modal-tech span {
    background: var(--link-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.modal-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--link-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.modal-link:hover {
    background: var(--hover-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 70vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-links {
        flex-direction: column;
    }
}

/* Blog Section */
.blog {
    padding: 80px 0;
}

.blog h2 {
    margin-bottom: 3rem;
}

.blog-list {
    display: grid;
    gap: 2rem;
}

.blog-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog-item h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-item p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.blog-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.blog-view-all {
    text-align: center;
    margin-top: 3rem;
}

.view-all-posts {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.view-all-posts:hover {
    color: var(--hover-color);
}

/* Blog header page */
.blog-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-header h1 {
    margin-bottom: 1rem;
}

.blog-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Blog content page */
.blog-content {
    padding: 60px 0;
}

.blog-post-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-post-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.blog-post-header h2 {
    margin-bottom: 1rem;
}

.blog-post-header h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-header h2 a:hover {
    color: var(--link-color);
}

.blog-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.blog-read-more {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--hover-color);
}

/* Individual blog post page */
.blog-post {
    padding: 120px 0 60px;
}

.blog-post-navigation {
    margin-bottom: 2rem;
}

.back-to-blog {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: var(--hover-color);
}

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

.blog-post-header .blog-date {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.blog-post-body {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.blog-post-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-post-body p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.blog-post-body ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-body li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.blog-post-footer {
    margin-top: 4rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    transition: opacity 0.3s ease;
}

.image-modal-close:hover {
    opacity: 0.7;
}

.image-modal-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    max-width: 600px;
}

/* Make poster image clickable */
.poster-img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
}

.poster-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #fafafa;
}

.contact h2 {
    margin-bottom: 1rem;
}

.contact p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

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

.contact-link i {
    font-size: 1.2rem;
    width: 20px;
    color: var(--text-secondary);
}

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

.footer p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .profile-text h1 {
        font-size: 2.5rem;
    }
    
    .profile-text .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-links {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .link-button {
        width: fit-content;
    }
    
    .about, .projects, .blog, .contact {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .contact-links {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .skill-list {
        justify-content: center;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--link-color);
    color: white;
}

/* Focus styles */
a:focus, button:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}
