/* Global Styles + Variables */
:root {
    /* Dark Theme */
    --bg-color: #121212;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --accent-color: #ffffff;
    --card-bg-color: #1e1e1e;
    --border-color: #333333;
    --header-bg-color: rgba(18, 18, 18, 0.8);
}

body.light-mode {
    /* Light Theme */
    --bg-color: #f0f0f0;
    --primary-text-color: #121212;
    --secondary-text-color: #555555;
    --accent-color: #000000;
    --card-bg-color: #ffffff;
    --border-color: #dddddd;
    --header-bg-color: rgba(240, 240, 240, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    line-height: 1.6;
}

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


/* Layout & Sections */
header {
    background-color: var(--header-bg-color); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

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

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

nav ul li a {
    color: var(--primary-text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

main {
    padding-top: 80px;
}

.content-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-section .subtitle {
    font-size: 1.5rem;
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}


/* Shared Grid & Card Styles */
.project-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card, .blog-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Staggered animation for cards */
.content-section.visible .project-card:nth-child(1), .content-section.visible .blog-card:nth-child(1) { transition-delay: 0.1s; }
.content-section.visible .project-card:nth-child(2), .content-section.visible .blog-card:nth-child(2) { transition-delay: 0.2s; }
.content-section.visible .project-card:nth-child(3), .content-section.visible .blog-card:nth-child(3) { transition-delay: 0.3s; }


.content-section.visible .project-card, .content-section.visible .blog-card {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover, .blog-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-card img, .blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Project-Specific Card Styles */
.project-card h3 {
    font-size: 1.5rem;
    padding: 1rem 1.5rem 0.5rem;
}

.project-card p {
    font-size: 1rem;
    color: var(--secondary-text-color);
    padding: 0 1.5rem 1.5rem;
}

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

.project-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.project-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.project-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Blog-Specific Card Styles */
.blog-card-content {
    padding: 1.5rem;
}

.blog-meta {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

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

.read-more {
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block;
}

.read-more:hover {
    transform: translateX(5px);
}


/* About & Contact */
h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

#about p, #contact p {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

#contact .email-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

#contact .email-link:hover {
    color: var(--accent-color);
}

/* START: Experience Section Styles */
#experience h2 {
    margin-bottom: 2.5rem;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem; 
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px; 
    margin-top: 5px; 
    background-color: var(--card-bg-color); 
}

.experience-details {
    flex: 1; 
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-item h3 {
    font-size: 1.7rem;
    color: var(--primary-text-color);
    margin-bottom: 0.5rem;
}

.experience-meta {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-item ul {
    list-style-position: outside;
    padding-left: 20px; 
}

.experience-item li {
    margin-bottom: 0.75rem;
    color: var(--secondary-text-color);
}

.experience-logo {
    width: 60px;
    height: 60px;
    border-radius: 25px;
    margin-top: 5px;
    background-color: var(--bg-color); 
    object-fit: contain;
}

/* END: Experience Section Styles */


/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
}


.social-icons a {
  color: #fff; 
  font-size: 24px; 
  margin: 0 10px; 
  text-decoration: none;
  transition: color 0.3s ease-in; 
}

.social-icons a:hover {
  color: #0077b5; 
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section .subtitle { font-size: 1.2rem; }
    nav ul { display: none; }
}

/* NEW BLOG POST STYLES */
.blog-post {
    max-width: 750px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.blog-post h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.blog-post .blog-meta {
    margin-bottom: 2rem;
    color: var(--secondary-text-color);
}

.blog-post-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.blog-post h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-align: left; 
    border-bottom: none;
}

.blog-post p {
    font-size: 1.1rem;
    color: var(--primary-text-color);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.blog-post blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--secondary-text-color);
}

/* Updated About Me Section Styles */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem; 
}

.profile-picture {
    width: 250px;
    height: 210px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

/* Make the h2 in this section align left */
.about-text h2 {
    text-align: left;
    display: block; 
}

/* Add to your @media query for responsiveness */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column; 
        text-align: center;
        gap: 2rem;
    }

    .about-text h2 {
        text-align: center; 
    }
}

/* Theme transitions */
body, .project-card, .blog-card, header, .cta-button, .profile-picture {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Theme toggle buttons */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--primary-text-color);
    transition: transform 0.4s ease;
}

#theme-toggle:hover svg {
    transform: scale(1.1) rotate(15deg);
}


.icon-sun {
    display: none;
}


body.light-mode .icon-sun {
    display: block;
}
body.light-mode .icon-moon {
    display: none;
}


.certifications {
    margin-top: 2rem;
}

.certifications h3 {
    font-size: 1.2rem;
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certifications-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cert-image {
    height: 120px; 
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-image:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}