/* --- Global Styles & Variables --- */
:root {
    --primary-dark: #1a1a2e;
    --secondary-dark: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #53a8b6;
    --text-light: #e0e0e0;
    --text-dark: #333;
    --white: #ffffff;
    --border-color: #3a476a;

    --font-primary: 'Roboto', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-primary); background-color: var(--primary-dark); color: var(--text-light); line-height: 1.6; }
body.modal-open { overflow: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--white); margin-bottom: 20px; font-weight: 700; }
h2 { text-align: center; font-size: 2.5em; margin-bottom: 60px; position: relative; padding-bottom: 10px; }
h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background-color: var(--highlight-color); }
section { padding: 80px 0; }
.dark-section { background-color: var(--secondary-dark); }
.services-section { background-color: var(--primary-dark); }
.certs-section { background-color: var(--primary-dark); } /* Added */
.strengths-section { background-color: var(--secondary-dark); }
.contact-section { background-color: var(--secondary-dark); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--highlight-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--white); }

/* --- Buttons --- */
.cta-button, .cta-button-outline { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; border: 2px solid var(--highlight-color); margin-top: 20px; }
.cta-button { background-color: var(--highlight-color); color: var(--primary-dark); }
.cta-button:hover { background-color: var(--white); color: var(--primary-dark); border-color: var(--white); }
.cta-button-outline { background-color: transparent; color: var(--highlight-color); }
.cta-button-outline:hover { background-color: var(--highlight-color); color: var(--primary-dark); }

/* --- Header --- */
.site-header { position: fixed; top: 0; left: 0; width: 100%; background-color: rgba(26, 26, 46, 0.85); backdrop-filter: blur(10px); padding: 15px 0; z-index: 1000; border-bottom: 1px solid var(--border-color); transition: background-color 0.3s ease; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-family: var(--font-heading); font-size: 1.8em; color: var(--white); font-weight: 700; }
.logo span { display: block; font-size: 0.7em; color: var(--highlight-color); letter-spacing: 1px; margin-top: -5px; }
.main-nav .nav-menu { list-style: none; display: flex; }
.main-nav .nav-menu li { margin-left: 30px; }
.main-nav .nav-menu a { color: var(--text-light); font-weight: 700; padding: 5px 0; position: relative; }
.main-nav .nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--highlight-color); transition: width 0.3s ease; }
.main-nav .nav-menu a:hover::after, .main-nav .nav-menu a.active::after { width: 100%; }
.nav-toggle { display: none; }

/* --- Hero Section --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; padding-top: 80px; }
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 0; }
.hero-content { position: relative; z-index: 1; }
.hero-content h1 { font-size: 3.5em; margin-bottom: 5px; }
.hero-content h2 { font-family: var(--font-primary); font-size: 1.5em; color: var(--text-light); margin-bottom: 20px; font-weight: 400; }
.hero-content .highlight { color: var(--highlight-color); }
.hero-content .subtitle { font-size: 1.2em; color: var(--text-light); max-width: 700px; margin: 0 auto 30px auto; font-weight: 300; }

/* --- About Section --- */
.about-content { display: flex; align-items: center; gap: 50px; }
.profile-pic { width: 300px; height: 300px; object-fit: cover; border-radius: 50%; border: 5px solid var(--highlight-color); box-shadow: 0 0 25px rgba(83, 168, 182, 0.3); flex-shrink: 0; }
.about-text { flex: 1; }
.about-text strong { color: var(--highlight-color); font-weight: 700; }
.about-text p { margin-bottom: 15px; }

/* --- Skills / Services Section --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.skill-card { background-color: var(--secondary-dark); padding: 30px; border-radius: 10px; text-align: center; border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.dark-section .skill-card { background-color: var(--primary-dark); }
.skill-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.skill-icon { font-size: 3em; color: var(--highlight-color); margin-bottom: 15px; display: block; font-style: normal; }
.skill-card h3 { margin-bottom: 10px; font-size: 1.3em; }
.skills-detailed .skill-card ul { list-style: none; padding: 0; margin-top: 15px; text-align: left; font-size: 0.9em; }
.skills-detailed .skill-card li { margin-bottom: 8px; position: relative; padding-left: 18px; }
.skills-detailed .skill-card li::before { content: '✓'; color: var(--highlight-color); position: absolute; left: 0; top: 0; }

/* --- Projects Section --- */
.project-filters { text-align: center; margin-bottom: 40px; }
.filter-button { background: transparent; border: 1px solid var(--border-color); color: var(--text-light); padding: 12px 25px; margin: 5px 8px; cursor: pointer; border-radius: 25px; transition: all 0.3s ease; font-size: 1em; font-weight: 500; }
.filter-button.active, .filter-button:hover { background-color: var(--highlight-color); color: var(--primary-dark); border-color: var(--highlight-color); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 35px; }
.project-card { background-color: var(--secondary-dark); border-radius: 8px; overflow: hidden; cursor: pointer; border: 1px solid var(--border-color); transition: transform 0.4s ease, box-shadow 0.4s ease; display: flex; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.project-card img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.4s ease; }
.project-card .project-info { background-color: var(--secondary-dark); padding: 25px; color: var(--white); transition: background-color 0.3s ease; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.project-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.project-card:hover img { transform: scale(1.05); }
.project-card h3 { margin-bottom: 10px; font-size: 1.3em; color: var(--highlight-color); }
.project-card p { font-size: 1em; color: var(--text-light); line-height: 1.5; }
.project-card.hide { display: none; }
.project-card.show { display: flex; animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* --- Experience Section --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background-color: var(--border-color); transform: translateX(-50%); }
.timeline-item { padding: 20px 40px; position: relative; width: 50%; margin-bottom: 10px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; padding-right: 60px; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; padding-left: 60px; }
.timeline-dot { content: ''; position: absolute; top: 25px; width: 15px; height: 15px; background-color: var(--highlight-color); border-radius: 50%; border: 3px solid var(--secondary-dark); z-index: 10; }
.timeline-item:nth-child(odd) .timeline-dot { right: -7.5px; transform: translateX(50%); }
.timeline-item:nth-child(even) .timeline-dot { left: -7.5px; transform: translateX(-50%); }
.timeline-content h3 { margin-bottom: 5px; color: var(--highlight-color); font-size: 1.2em; }
.timeline-content .company { font-style: italic; color: var(--text-light); margin-bottom: 5px; display: block; font-size: 1em; }
.timeline-content .date { font-size: 0.9em; color: #aaa; margin-bottom: 5px; display: block; }
.timeline-content .desc { font-size: 0.9em; color: var(--text-light); margin-top: 5px; font-style: italic; }

/* --- Certifications Section --- */
.certs-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}
.certs-list li {
    background-color: var(--secondary-dark);
    margin-bottom: 15px;
    padding: 20px 25px;
    border-radius: 8px;
    border-left: 5px solid var(--highlight-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.05em;
}
.certs-list li:hover {
    transform: translateX(10px);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}
.certs-list strong {
    float: right;
    color: var(--highlight-color);
    font-weight: bold;
    font-size: 0.9em;
    padding-left: 15px;
}


/* --- Strengths Section --- */
.strengths-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; text-align: center; }
.strength-item { background-color: var(--primary-dark); padding: 30px; border-radius: 10px; border: 1px solid var(--border-color); }
.strength-item h3 { margin-top: 10px; font-size: 1.3em; }
.strength-item .skill-icon { font-size: 3em; color: var(--highlight-color); margin-bottom: 15px; display: block; font-style: normal; }

/* --- Contact Section --- */
.contact-section p { text-align: center; max-width: 600px; margin: 0 auto 30px auto; }
.contact-details { text-align: center; margin-bottom: 40px; font-size: 1.1em; }
.contact-details p { margin-bottom: 10px; }
.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { background-color: var(--primary-dark); border: 1px solid var(--border-color); border-radius: 5px; padding: 15px; color: var(--text-light); font-family: var(--font-primary); font-size: 1em; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--highlight-color); box-shadow: 0 0 10px rgba(83, 168, 182, 0.3); }
.contact-form button { align-self: center; cursor: pointer; }

/* --- Footer --- */
.site-footer-bottom { background-color: var(--primary-dark); padding: 20px 0; text-align: center; font-size: 0.9em; color: #888; border-top: 1px solid var(--border-color); }

/* --- Modal Styles --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.8); opacity: 0; transition: opacity 0.3s ease; }
.modal.show { display: block; opacity: 1; }
.modal-content { background-color: var(--secondary-dark); margin: 10% auto; padding: 30px 40px; border: 1px solid var(--border-color); width: 80%; max-width: 800px; border-radius: 10px; position: relative; box-shadow: 0 5px 25px rgba(0,0,0,0.5); transform: translateY(-50px); transition: transform 0.3s ease; }
.modal.show .modal-content { transform: translateY(0); }
.modal-close-button { color: #aaa; float: right; font-size: 32px; font-weight: bold; position: absolute; top: 10px; right: 20px; }
.modal-close-button:hover, .modal-close-button:focus { color: var(--white); text-decoration: none; cursor: pointer; }
#modalTitle { margin-top: 0; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); font-size: 1.8em; }
#modalBody { margin-top: 20px; max-height: 60vh; overflow-y: auto; padding-right: 15px; }
#modalBody h4 { color: var(--highlight-color); margin-top: 20px; margin-bottom: 5px; font-size: 1.1em; }
#modalBody p, #modalBody li { font-size: 0.95em; color: var(--text-light); margin-bottom: 10px; }
#modalBody ul { list-style: disc; padding-left: 25px; margin-bottom: 10px; }
#modalBody strong { color: var(--highlight-color); }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .about-content { flex-direction: column; text-align: center; }
    .profile-pic { margin-bottom: 30px; }
    .modal-content { width: 90%; margin: 5% auto; }
    .project-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
    .certs-list strong { float: none; display: block; margin-top: 5px; font-size: 0.85em; } /* Adjust certs year for smaller screens */
}
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5em; }
    .hero-content h2 { font-size: 1.2em; }
    .hero-content .subtitle { font-size: 1em; }
    h2 { font-size: 2em; }
    /* Mobile Nav */
    .nav-toggle { display: block; background: transparent; border: none; cursor: pointer; z-index: 1001; position: relative; }
    .nav-toggle span { display: block; width: 25px; height: 3px; background-color: var(--white); margin: 5px 0; transition: all 0.3s ease; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
    .main-nav .nav-menu { position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; background-color: var(--secondary-dark); flex-direction: column; justify-content: center; align-items: center; transition: right 0.4s ease-in-out; padding-top: 60px; }
    .main-nav .nav-menu.active { right: 0; }
    .main-nav .nav-menu li { margin: 20px 0; }
    .main-nav .nav-menu a { font-size: 1.5em; }
    /* Timeline */
     .timeline::before { left: 10px; }
     .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; text-align: left; }
     .timeline-item:nth-child(even) { left: 0; }
     .timeline-dot { left: 10px; transform: translateX(-50%); }
     .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 10px; transform: translateX(-50%); }
     .project-grid { grid-template-columns: 1fr; }
     .modal-content { padding: 20px; }
     #modalTitle { font-size: 1.5em; }
     #modalBody { max-height: 70vh; }
     .skills-grid, .strengths-content { grid-template-columns: 1fr; }
     .certs-list li { padding: 15px 20px; }
}