:root {
    --primary-color: #0d2c4e; /* Deep blue */
    --secondary-color: #4a90e2; /* Bright blue */
    --background-color: #f4f7f9;
    --text-color: #333;
    --light-text-color: #ffffff;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

/* --- Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 44, 78, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: block;
}

.nav-logo img {
    height: 45px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li a {
    color: var(--light-text-color);
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 400;
    position: relative;
    transition: color 0.3s;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.4s ease;
}

.nav-links li a:hover { color: var(--secondary-color); }
.nav-links li a:hover::after { width: 100%; }

/* --- Hero Section --- */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(13, 44, 78, 0.8), rgba(13, 44, 78, 0.8)), url('https://www.transparenttextures.com/patterns/cubes.png');
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
    position: relative;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 7px solid var(--secondary-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(74, 144, 226, 0.5);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    min-height: 2.2rem;
}

#typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-summary {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 300;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    font-size: 2rem;
    color: var(--light-text-color);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}


/* --- General Section Styling --- */
section {
    padding: 6rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

section h2 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

/* --- About Section --- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.skill-item h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skill-bar-container {
    width: 100%;
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    width: 0; /* Animated by JS/CSS */
    background: linear-gradient(90deg, #4a90e2, #0d2c4e);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.show .skill-bar {
    width: var(--width);
}

/* --- Experience Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}
.timeline-item:nth-child(odd) { left: -40px; }
.timeline-item:nth-child(even) { left: calc(50% + 40px); }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--background-color);
    border: 5px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd)::after { right: -52px; }
.timeline-item:nth-child(even)::after { left: -52px; }

.timeline-item h3 { color: var(--secondary-color); font-size: 1.3rem; }
.timeline-item h4 { color: var(--primary-color); font-style: italic; margin-bottom: 5px; }
.timeline-item .date { font-weight: 600; color: #777; margin-bottom: 10px; }

/* --- Contact Section --- */
#contact { background-color: var(--primary-color); color: var(--light-text-color); }
#contact h2, #contact h2 i { color: var(--light-text-color); }
#contact h2::after { background-color: var(--light-text-color); }

.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
}
.contact-info p { display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.contact-info i { font-size: 1.5rem; margin-right: 15px; color: var(--secondary-color); }
.contact-info a { color: var(--light-text-color); text-decoration: none; transition: color 0.3s; }
.contact-info a:hover { color: var(--secondary-color); }

.social-links { text-align: center; }
.social-links a { font-size: 2rem; color: var(--light-text-color); margin: 0 20px; transition: color 0.3s, transform 0.3s; display: inline-block; }
.social-links a:hover { color: var(--secondary-color); transform: translateY(-5px); }

/* --- Footer --- */
footer { text-align: center; padding: 2rem 0; background-color: #081c33; color: #aaa; }

/* --- Scroll Animations --- */
.hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero-name { font-size: 2.5rem; }
    .hero-title { font-size: 1.4rem; }
    
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 20px; margin-bottom: 30px; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 10px; }
}
