/* --- Global Styles & Variables --- */
:root {
    --primary-color: #4a9eff;
    --primary-light: #6eb4ff;
    --bg-dark: #0f0f0f;
    --bg-medium: #1a1a1a;
    --text-light: #ffffff;
    --text-medium: #ccc;
    --text-dark: #888;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        linear-gradient(135deg, rgba(15, 15, 15, 0.95), rgba(26, 26, 26, 0.9)),
        url('./images/image5.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-light), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(20, 22, 24, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease-in-out;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* --- Header --- */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 80px; /* Offset for fixed nav */
    background: radial-gradient(circle at 50% 50%, rgba(74, 158, 255, 0.08) 0%, transparent 60%);
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin-bottom: 2rem;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.3);
    object-fit: cover;
}

.typing-text {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-light), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-weight: 400;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* --- Skills Ticker --- */
.skills-ticker {
    position: absolute;
    bottom: 50px;
    width: 100%;
    overflow: hidden;
    background: rgba(74, 158, 255, 0.05);
    padding: 15px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #fff 20%, #fff 80%, transparent);
    mask-image: linear-gradient(90deg, transparent, #fff 20%, #fff 80%, transparent);
}

.skills-scroll {
    display: flex;
    width: fit-content;
    animation: scroll 40s linear infinite;
    gap: 3rem;
}

.skill-item {
    white-space: nowrap;
    color: var(--primary-light);
    font-weight: 500;
    font-size: 1rem;
}

@keyframes scroll {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

/* --- Sections --- */
section {
    padding: 6rem 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.quick-stats {
    background: rgba(74, 158, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.quick-stats h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
    padding-bottom: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-light);
}

/* --- Experience Section --- */
.experience-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline-line {
    position: absolute;
    left: 10px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
}

.experience-item {
    position: relative;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -48px; /* Adjusted position */
    top: 25px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-medium);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-light);
}

.job-company {
    color: var(--text-medium);
    font-size: 1.1rem;
}

.job-duration {
    background: rgba(74, 158, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    white-space: nowrap;
}

.experience-item ul {
    list-style: none;
    padding-left: 0;
}

.experience-item li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-medium);
}

.experience-item li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-medium);
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: rgba(74, 158, 255, 0.2);
    color: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-links {
    margin-top: auto; /* Pushes links to the bottom */
}

.project-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

/* --- Footer --- */
footer {
    background: rgba(16, 18, 19, 0.98);
    padding: 4rem 0 3rem;
    text-align: center;
    border-top: 1px solid rgba(74, 158, 255, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--primary-light);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(74, 158, 255, 0.5);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

footer p {
    color: var(--text-dark);
    font-size: 0.9rem;
}

footer .tagline {
    color: var(--text-medium);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Consider a hamburger menu for mobile */
    }
    
    .typing-text {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-timeline {
        padding-left: 20px;
    }

    .experience-item::before {
        left: -28px;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
}