@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color-dark: #00bfff;
    --secondary-color-dark: #0a192f;
    --text-color-dark: #ccd6f6;
    --light-text-color-dark: #8892b0;
    --background-color-dark: #0a192f;
    --card-bg-color-dark: rgba(17, 34, 64, 0.6);
    --border-color-dark: #233554;
    --shadow-color-dark: rgba(0, 191, 255, 0.15);

    --primary-color-light: #007BFF;
    --secondary-color-light: #f4f7fa;
    --text-color-light: #333;
    --light-text-color-light: #555;
    --background-color-light: #f4f7fa;
    --card-bg-color-light: rgba(255, 255, 255, 0.6);
    --border-color-light: #d0e0f0;
    --shadow-color-light: rgba(0, 123, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color-dark);
}

.light-mode::-webkit-scrollbar-track {
     background: var(--secondary-color-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color-dark);
    border-radius: 10px;
}

.light-mode::-webkit-scrollbar-thumb {
    background: var(--primary-color-light);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.4s, color 0.4s;
    background-color: var(--background-color);
    color: var(--text-color);
}

body.dark-mode {
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --card-bg-color: var(--card-bg-color-dark);
    --border-color: var(--border-color-dark);
    --shadow-color: var(--shadow-color-dark);
    --light-text-color: var(--light-text-color-dark);
}

body.light-mode {
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --primary-color: var(--primary-color-light);
    --card-bg-color: var(--card-bg-color-light);
    --border-color: var(--border-color-light);
    --shadow-color: var(--shadow-color-light);
    --light-text-color: var(--light-text-color-light);
}

/* Splash Screen & Loading State */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.4s ease-out; /* MODIFIED: Faster fade-out */
    pointer-events: none;
}

#splash-screen.hidden {
    opacity: 0;
}

.splash-text {
    position: relative;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--primary-color);
    height: 1.2em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-text span {
    position: absolute;
    opacity: 0;
    animation: fadeInOut 0.8s ease-in-out forwards;
}

.splash-text span:nth-child(1) { animation-delay: 0s; }
.splash-text span:nth-child(2) { animation-delay: 0.8s; }
.splash-text span:nth-child(3) { animation-delay: 1.6s; }

body.loading {
    overflow: hidden;
}

header, main, footer {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

body:not(.loading) header,
body:not(.loading) main,
body:not(.loading) footer {
    opacity: 1;
}

/* Custom Cursor */
.cursor {
    width: 25px;
    height: 25px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

.cursor.hover {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    opacity: 0.3;
    box-shadow: 0 0 15px var(--primary-color), 0 0 30px var(--primary-color);
}

/* Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: top 0.3s, background-color 0.4s, box-shadow 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 { color: var(--primary-color); font-size: 1.8rem; font-weight: 700; }
nav ul { list-style: none; display: flex; }
nav ul li { margin-left: 2rem; }
nav ul li a { color: var(--text-color); text-decoration: none; font-weight: 400; transition: color 0.3s; position: relative; padding-bottom: 5px; }
nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s; }
nav ul li a:hover::after { width: 100%; }
nav ul li a:hover { color: var(--primary-color); }

.header-right { display: flex; align-items: center; gap: 1.5rem; }
.theme-switcher { cursor: pointer; font-size: 1.2rem; }
.theme-switcher .fa-sun { display: none; }
.light-mode .theme-switcher .fa-sun { display: inline-block; }
.light-mode .theme-switcher .fa-moon { display: none; }
.hamburger { display: none; cursor: pointer; }
.hamburger i { font-size: 1.5rem; color: var(--primary-color); }

/* Main Content & Sections */
main { padding: 0 5%; }

.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; }
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 0; }
.hero-text { max-width: 800px; z-index: 1; }
.name-reveal { 
    font-size: clamp(2.5rem, 5vw, 4rem); 
    font-weight: 700; 
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem; 
    opacity: 0; 
    animation: fadeIn 0.8s 0.3s forwards;
}
.subtitle-reveal { font-size: clamp(1rem, 3vw, 1.5rem); color: var(--text-color); margin-bottom: 2rem; opacity: 0; animation: fadeIn 0.8s 0.6s forwards; }

.hero-buttons { display: flex; justify-content: center; gap: 1rem; opacity: 0; animation: fadeIn 0.8s 0.9s forwards; }
.cta-button { display: inline-block; background-image: linear-gradient(45deg, var(--primary-color) 0%, #0077cc 100%); color: white; border: none; padding: 0.8rem 2rem; border-radius: 5px; text-decoration: none; font-weight: 600; transition: all 0.3s; background-size: 150% auto; }
.cta-button:hover { transform: translateY(-5px); box-shadow: 0 8px 15px var(--shadow-color); background-position: right center; }
.cta-button.secondary { background-image: none; background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.cta-button.secondary:hover { background-color: var(--primary-color); color: var(--background-color); }

.content-section { padding: 6rem 0; opacity: 0; transform: translateY(50px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.content-section.visible { opacity: 1; transform: translateY(0); }

.section-title { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 3rem; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%) scaleX(0); width: 80px; height: 4px; background-color: var(--primary-color); border-radius: 2px; transition: transform 0.4s ease-out; }
.content-section.visible .section-title::after { transform: translateX(-50%) scaleX(1); }

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.about-image {
    flex-basis: 300px;
    flex-shrink: 0;
}
.about-image img {
    width: 100%;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 25px var(--shadow-color);
}
.about-text {
    flex-basis: 500px;
    flex-grow: 1;
}

/* Card Styles */
.skills-grid, .projects-grid, .education-container, .certs-grid, .achievements-grid { 
    display: grid; 
    gap: 1.5rem; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.skills-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.education-container { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.certs-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.achievements-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }


.skill-card, .project-card, .education-card, .cert-card, .achievement-card, .timeline-content { 
    background: var(--card-bg-color); 
    border-radius: 10px; 
    border: 1px solid var(--border-color); 
    backdrop-filter: blur(5px); 
    position: relative; 
    overflow: hidden;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover, .project-card:hover, .education-card:hover, .cert-card:hover, .achievement-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 10px 20px var(--shadow-color);
}
.project-card, .timeline-content { padding: 0; }
.project-content { padding: 1.5rem; }

.skill-card h3, .project-content h3, .education-card h3, .timeline-content h3 { 
    color: var(--primary-color); 
    margin-bottom: 1rem; 
}
.skill-card h3 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.1rem;}
.project-content h3 { margin-bottom: 0.5rem; }

/* Sheen Effect on Cards */
.skill-card::before, .project-card::before, .education-card::before, .cert-card::before, .achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
    transform: skewX(-25deg);
}
.skill-card:hover::before, .project-card:hover::before, .education-card:hover::before, .cert-card:hover::before, .achievement-card:hover::before {
    left: 120%;
}

/* Specific Component Styles */
.project-card { display: flex; flex-direction: column; }
.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}
.project-content { display: flex; flex-direction: column; flex-grow: 1; }
.project-content p { color: var(--light-text-color); flex-grow: 1; }
.tech-stack { margin: 1rem 0; }
.tech-stack span { display: inline-block; background-color: var(--border-color); color: var(--light-text-color); padding: 0.2rem 0.5rem; border-radius: 5px; font-size: 0.8rem; margin: 0.25rem; }
.project-links a { color: var(--primary-color); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }
.education-card, .achievement-card { text-align: center; }
.education-card p { color: var(--text-color); }
.education-card span { color: var(--light-text-color); font-size: 0.9rem; }

.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline::after { content: ''; position: absolute; width: 2px; background-color: var(--primary-color); top: 0; bottom: 0; left: 20px; }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 50px; opacity: 0; animation: slideIn 0.4s forwards; }
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item::before { content: ''; position: absolute; left: 11px; top: 5px; width: 20px; height: 20px; background: var(--background-color); border: 3px solid var(--primary-color); border-radius: 50%; z-index: 1; }
.timeline-content { padding: 1.5rem; }
.company { font-style: italic; color: var(--light-text-color); }
.date { display: block; margin-bottom: 0.5rem; color: var(--light-text-color); font-size: 0.9rem; }
.timeline-content ul { padding-left: 20px; color: var(--light-text-color); }

.achievement-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.achievement-card h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.achievement-card p {
    color: var(--light-text-color);
    font-size: 0.9rem;
}

/* Certification Section Styles */
.cert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cert-card h3 {
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cert-card h3 i {
    font-size: 3.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease-in-out;
}

.cert-card:hover h3 i {
    transform: scale(1.15) rotate(-8deg);
}

/* Contact and Footer */
#contact { text-align: center; }
.contact-container { max-width: 600px; margin: 0 auto; }
.contact-container p { margin-bottom: 2rem; }
.contact-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.contact-socials a {
    color: var(--light-text-color);
    font-size: 2.5rem;
    transition: color 0.3s, transform 0.3s;
}
.contact-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

footer { text-align: center; padding: 3rem 5%; border-top: 1px solid var(--border-color); }
footer p { color: var(--light-text-color); font-size: 0.9rem; }

/* Animations */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: scale(0.9); }
    25%, 75% { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }

/* Responsive Design */
@media (max-width: 992px) {
    nav ul li { margin-left: 1.5rem; }
}

@media (max-width: 768px) {
    .hamburger { display: block; z-index: 1001; }
    .header-right { gap: 1rem; }
    nav { position: fixed; top: 0; left: -100%; width: 100%; height: 100vh; background-color: var(--background-color); transition: left 0.3s; display: flex; justify-content: center; align-items: center; }
    nav.active { left: 0; }
    nav ul { flex-direction: column; text-align: center; }
    nav ul li { margin: 1.5rem 0; }
    .name-reveal { font-size: 2.5rem; }
    .subtitle-reveal { font-size: 1.2rem; }
    .about-container { text-align: center; }
    .about-image { margin-bottom: 2rem; }
    .timeline::after { left: 10px; }
    .timeline-item { padding-left: 40px; }
    .timeline-item::before { left: 1px; }
}

