/* General Reset */
body, ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

body {
    font-family: Times, serif;
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Navigation */
nav ul {
    display: flex;
    justify-content: center;
    padding: 1rem;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff6600;
}

/* Home Section */
#home {
    background-image: url('../../images/background.jpg');
    background-size: cover; /* Ensures the background image covers the entire section */
    background-position: center; /* Centers the background image */
    background-repeat: no-repeat; /* Prevents repeating the image */
    height: 100vh;
    display: flex;
    align-items: center; /* Vertically centers the content */
    justify-content: center; /* Horizontally centers the content */
    text-align: center;
    color: white; /* Ensure the text color contrasts well against the background */
}

.overlay {
    background: rgba(0, 0, 0, 0.6); /* Slightly darker overlay for better text readability */
    padding: 2rem;
    border-radius: 10px;
    max-width: 90%; /* Limits the width to ensure it doesn't overflow on smaller screens */
    margin: 0 auto; /* Centers the overlay horizontally */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adds a subtle shadow for better visibility */
}

h1 {
    font-size: 3rem;
    margin: 0.5rem 0;
}

p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.social-icons a {
    margin: 0 10px;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s;
}

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

.scroll-down a {
    color: white;
    font-size: 2rem;
    display: block;
    margin-top: 20px;
    transition: color 0.3s;
}

.scroll-down a:hover {
    color: #ff6600;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile header layout */
    header {
        justify-content: space-between;
    }
    
    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }
    
    /* Hide navigation by default */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    /* Show navigation when active */
    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    
    /* Home section mobile fixes */
    h1 {
        font-size: 2rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .overlay {
        padding: 1rem;
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .social-icons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .social-icons a {
        font-size: 1.2rem;
        margin: 0 5px;
    }
    
    /* Article cards mobile fixes */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .article-card img {
        height: 180px;
    }
    
    .article-info {
        padding: 15px;
    }
    
    .article-info h3 {
        font-size: 1.3em;
    }
    
    /* Hamburger menu animation */
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* About Section */
.about-section {
    padding: 60px 20px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-image {
    flex: 1;
    min-width: 250px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-info {
    flex: 2;
    min-width: 300px;
}

.about-info h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Times New Roman', serif;
}

.about-info p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-family: 'Times New Roman', serif;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.contact-info li {
    margin-bottom: 10px;
    font-family: 'Times New Roman', serif;
}

.btn-cv {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-family: 'Times New Roman', serif;
}

.btn-cv:hover {
    background-color: #2980b9;
}

/* Projects Section */
.projects-section {
    padding: 60px 20px;
    background-color: #FFECEC; /* Light background for contrast */
    /*background-image: url('../../images/mountain.jpg');*/
}

.projects-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-family: 'Times New Roman', serif;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Times New Roman', serif;
}

.project-info p {
    color: #666;
    font-family: 'Times New Roman', serif;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.project-link:hover {
    color: #2980b9;
}

/* Social Icons Styling */
.social-icons {
    margin-top: 20px;
}

.social-icons a {
    text-decoration: none;
    color: white; /* Change to your preferred color */
    margin-right: 15px;
    font-size: 1.5em; /* Adjust size as needed */
    display: inline-block;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #3498db; /* Change to your hover color */
}

.social-icons i {
    margin-right: 8px; /* Space between icon and text */
    vertical-align: middle;
}

/* Articles Section */
.articles-section {
    padding: 60px 20px;
    background-color: #f8f9fa; /* Light background for contrast */
    position: relative;
    overflow: hidden;
}

#particles-js-articles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.articles-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-family: 'Times New Roman', serif;
    position: relative;
    z-index: 2;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
    max-width: 100%;
    max-height: 200px;
    min-height: 180px;
}

.article-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Times New Roman', serif;
    color: #333;
}

.article-info p {
    color: #666;
    font-family: 'Times New Roman', serif;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    margin-bottom: 15px;
}

.article-date {
    color: #888;
    font-size: 0.9em;
    font-style: italic;
    font-family: 'Times New Roman', serif;
}

.article-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-family: 'Times New Roman', serif;
    margin-top: auto;
    align-self: flex-start;
}

.article-link:hover {
    background-color: #2980b9;
    color: #fff;
}

/* Education Section */
.education-section {
    padding: 60px 20px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

#particles-js-education {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.education-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-family: 'Times New Roman', serif;
    position: relative;
    z-index: 2;
}

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

.education-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.education-year {
    flex: 0 0 150px;
    font-weight: bold;
    color: #3498db;
    font-size: 1.1em;
    padding-right: 20px;
    text-align: right;
    border-right: 3px solid #3498db;
    margin-right: 30px;
    position: relative;
}

.education-year::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    background-color: #3498db;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #3498db;
}

.education-content {
    flex: 1;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.education-content h3 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 5px;
    font-family: 'Times New Roman', serif;
}

.education-content h4 {
    color: #3498db;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-family: 'Times New Roman', serif;
}

.education-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-family: 'Times New Roman', serif;
}

.education-details {
    list-style: none;
    padding: 0;
}

.education-details li {
    color: #555;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
    font-family: 'Times New Roman', serif;
}

.education-details li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 0.8em;
}

/* Skills Section */
.skills-section {
    padding: 60px 20px;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

#particles-js-skills {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.skills-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-family: 'Times New Roman', serif;
    position: relative;
    z-index: 2;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.skill-category {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Times New Roman', serif;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.skill-name {
    font-weight: bold;
    color: #333;
    font-family: 'Times New Roman', serif;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Contact Section */
.contact-section {
    padding: 60px 20px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

#particles-js-contact {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-family: 'Times New Roman', serif;
    position: relative;
    z-index: 2;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contact-info h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-family: 'Times New Roman', serif;
}

.contact-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-family: 'Times New Roman', serif;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    color: #3498db;
    font-size: 1.2em;
    margin-right: 15px;
    width: 20px;
}

.contact-item h4 {
    color: #333;
    margin: 0 0 5px 0;
    font-family: 'Times New Roman', serif;
}

.contact-item p {
    color: #666;
    margin: 0;
    font-family: 'Times New Roman', serif;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-family: 'Times New Roman', serif;
}

.social-link:hover {
    background-color: #2980b9;
    color: white;
}

.social-link i {
    margin-right: 8px;
}

.contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    font-family: 'Times New Roman', serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Times New Roman', serif;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-family: 'Times New Roman', serif;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
    .education-item {
        flex-direction: column;
    }
    
    .education-year {
        flex: none;
        text-align: left;
        border-right: none;
        border-bottom: 3px solid #3498db;
        padding-right: 0;
        padding-bottom: 10px;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .education-year::after {
        right: 0;
        top: auto;
        bottom: -8px;
        transform: none;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
}
