/* --- Root Variables from your Design --- */
:root {
    --theme-color: #0181EC;
    --background-color: #000000; /* UPDATED: Changed to solid black */
    --card-color: rgba(18, 18, 18, 0.6); /* Slightly adjusted for better contrast on black */
    --text-color: #ffffff;
    --text-secondary-color: #b3b3b3;
    --action-color-green: #1db954;
    --action-color-grey: #6c757d;
}

/* --- Base & Animated Background (UPDATED) --- */
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *:before, *:after { box-sizing: inherit; }
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color); /* UPDATED: Solid black background */
    color: var(--text-color);
    overflow-x: hidden;
}

/* NEW: Styles for the tsParticles background container */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* This is crucial - it places the animation behind everything else */
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* --- Glassmorphism Card (Reusable) --- */
.glass-card {
    background-color: var(--card-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    margin-bottom: 25px;
}

/* --- Header & Navigation --- */
header {
    padding: 1rem 0;
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: auto; padding: 0 20px; }
.logo { font-size: 1.6rem; font-weight: 700; color: var(--text-color); }
nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
nav li { margin-left: 25px; }
nav a { color: var(--text-secondary-color); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
nav a:hover, nav a.active { color: var(--theme-color); }

/* --- Professional Hero Section --- */
.hero-pro { padding: 60px 0; }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-text { flex: 1; }
.hero-text .tagline { font-size: 1.8rem; color: var(--theme-color); font-weight: 600; }
.hero-text .description { font-size: 1.1rem; color: var(--text-secondary-color); margin: 20px 0 30px 0; }
.hero-actions { display: flex; gap: 15px; }
.cta-button { display: inline-block; background-color: var(--action-color-green); color: white; padding: 15px 30px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 1.1rem; transition: background-color 0.2s ease, transform 0.2s ease; }
.cta-button:hover { background-color: #1aa34a; }
.cta-button:active { transform: scale(0.98); }
.cta-button-secondary { background-color: transparent; border: 2px solid var(--action-color-green); padding: 13px 28px; display: inline-block; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 1.1rem; color: white; transition: background-color 0.2s ease; }
.cta-button-secondary:hover { background-color: var(--action-color-green); }
.hero-image-wrapper {
    flex-basis: 400px;
    aspect-ratio: 1 / 1;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(1, 129, 236, 0.3);
    flex-shrink: 0;
}
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }

/* --- RST Company Section --- */
.rst-card { display: flex; align-items: center; gap: 30px; }
.rst-logo { height: 100px; width: 100px; object-fit: contain; flex-shrink: 0; }
.rst-details h2 { margin: 0 0 10px 0; color: var(--theme-color); }
.rst-details p { margin: 0; color: var(--text-secondary-color); line-height: 1.7; }

/* --- General Section Styling --- */
section.container h2 { font-size: 2.2rem; margin-bottom: 30px; text-align: center; border-bottom: 2px solid var(--theme-color); display: inline-block; padding-bottom: 10px; }
.section-wrapper { text-align: center; }

/* --- Skills Section --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-top: 40px; }
.skill-card { text-align: center; padding: 40px 20px; }
.skill-icon { font-size: 3rem; color: var(--theme-color); margin-bottom: 20px; }
.skill-card h3 { margin-bottom: 15px; font-size: 1.5rem; }
.skill-card p { color: var(--text-secondary-color); font-size: 1rem; }

/* --- Timeline Section --- */
.timeline { position: relative; max-width: 800px; margin: 50px auto; }
.timeline::after { content: ''; position: absolute; width: 4px; background-color: rgba(255, 255, 255, 0.1); top: 0; bottom: 0; left: 50%; margin-left: -2px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background-color: #000; border: 4px solid var(--theme-color); top: 25px; border-radius: 50%; z-index: 1; }
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content { padding: 20px 30px; }
.timeline-content h3 { margin-top: 0; color: var(--theme-color); }
.timeline-content p { color: var(--text-secondary-color); margin-bottom: 0; }

/* --- Contact Form --- */
.contact-form-wrapper { margin-top: 40px; text-align: center; }
.contact-form-wrapper p { max-width: 600px; margin: 0 auto 30px auto; color: var(--text-secondary-color); }
form { display: flex; flex-direction: column; gap: 20px; max-width: 600px; margin: auto; }
form input, form textarea { padding: 15px; background-color: rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: var(--text-color); font-size: 1rem; font-family: 'Poppins', sans-serif; }
form input:focus, form textarea:focus { outline: none; border-color: var(--theme-color); }
form button { cursor: pointer; }

/* --- Projects Page --- */
/* (Styles for projects.html are unchanged but kept for completeness) */
.projects-header { text-align: center; margin-bottom: 40px; }
.search-wrapper { position: relative; max-width: 500px; margin: 20px auto 0; }
.search-wrapper .fa-magnifying-glass { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary-color); }
#search-bar { width: 100%; padding: 15px 20px 15px 45px; background-color: rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; color: var(--text-color); font-size: 1rem; font-family: 'Poppins', sans-serif; }
#search-bar:focus { outline: none; border-color: var(--theme-color); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.app-card { display: flex; flex-direction: column; text-align: left; transition: transform 0.3s ease, border-color 0.3s ease; border-color: rgba(255, 255, 255, 0.1); }
.app-card.clickable { cursor: pointer; }
.app-card.clickable:hover { transform: translateY(-5px); border-color: rgba(1, 129, 236, 0.5); }
.app-card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.app-title h3 { margin: 0; font-size: 1.2rem; }
.app-title .status-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; margin-top: 5px; color: #fff; text-transform: uppercase; }
.status-tag.live { background-color: var(--action-color-green); }
.status-tag.development { background-color: #f1c40f; color: #333; }
.status-tag.discontinued { background-color: var(--action-color-grey); }
.app-card p { color: var(--text-secondary-color); font-size: 0.9rem; flex-grow: 1; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 15px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-content { max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; padding: 20px 30px; transform: scale(0.95); transition: transform 0.3s ease; }
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: var(--text-secondary-color); font-size: 2rem; cursor: pointer; line-height: 1; transition: color 0.2s ease; }
.modal-close-btn:hover { color: var(--text-color); }
.modal-header { display: flex; align-items: center; gap: 20px; }
.app-icon-large { width: 100px; height: 100px; border-radius: 22px; }
.modal-title h1 { margin: 0; font-size: 2.5rem; }
.modal-title .developer-name { color: var(--theme-color); font-weight: 500; }
.modal-actions { margin: 25px 0; }
.modal-actions .cta-button { display: block; text-align: center; }
.modal-body .section-header { text-align: left; font-size: 1.5rem; border-left: 3px solid var(--theme-color); padding-left: 10px; margin: 30px 0 15px 0; border-bottom: none;}
.screenshots-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.screenshots-container::-webkit-scrollbar { height: 6px; }
.screenshots-container::-webkit-scrollbar-track { background: var(--card-color); border-radius: 3px; }
.screenshots-container::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.screenshot-item { flex: 0 0 auto; height: 250px; width: auto; border-radius: 12px; }
footer { text-align: center; padding: 30px 20px; margin-top: 40px; color: var(--text-secondary-color); border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .hero-content { flex-direction: column; text-align: center; }
    .hero-text { order: 2; }
    .hero-image-wrapper { order: 1; margin-bottom: 30px; width: auto; height: auto; aspect-ratio: 1/1; }
    .hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
    .hero-actions { justify-content: center; }
}
@media (max-width: 768px) {
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 15px; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item::after { left: 10px; }
    .rst-card { flex-direction: column; text-align: center; }
}