/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4ecdc4; /* Teal */
    --secondary-color: #2a9d8f; /* Darker teal */
    --accent-color: #ff6b6b; /* Coral */
    --text-primary: #ffffff; /* White */
    --text-secondary: #b0b0b0; /* Light gray */
    --text-muted: #7c7c7c; /* Medium gray */
    --bg-primary: #121212; /* Dark background */
    --bg-secondary: #1e1e1e; /* Slightly lighter dark */
    --bg-card: #1e1e1e; /* Card background */
    --border-color: #2d2d2d; /* Border color */
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-prominent: 0 6px 16px rgba(0, 0, 0, 0.5);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 900px; /* More compact container */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.95); /* Dark semi-transparent */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 75vh; /* More compact height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    background: radial-gradient(circle at 50% 50%, rgba(78, 205, 196, 0.1) 0%, transparent 60%);
}

.hero-content {
    max-width: 700px;
    padding: 0 1rem;
}

.hero-title {
    margin-bottom: 1.2rem;
}

.hero-name {
    display: block;
    font-size: clamp(2rem, 7vw, 3rem); /* Slightly smaller */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.1;
}

.hero-subtitle-container {
    display: block;
    height: clamp(1.3rem, 4vw, 1.8rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    display: inline-block;
    font-size: clamp(1rem, 3.5vw, 1.3rem); /* Smaller */
    font-weight: 400;
    color: var(--primary-color);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle.fade-out {
    opacity: 0;
    transform: translateY(8px);
}

.hero-description {
    font-size: 0.95rem; /* Smaller */
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.5rem; /* More compact */
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #121212;
    box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--primary-color);
}

/* Sections */
section {
    padding: 2.5rem 0; /* Reduced padding */
}

.section-header {
    text-align: center;
    margin-bottom: 2rem; /* Reduced */
}

.section-title {
    font-size: clamp(1.6rem, 5vw, 2rem); /* Smaller */
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.section-subtitle {
    font-size: 0.95rem; /* Smaller */
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 0.8rem;
}
/* Add to your existing CSS */
.project-period {
    font-size: 0.9rem;
    color: #777;
    margin-right: 15px;
}


.project-description ul {
    padding-left: 20px;
    margin: 15px 0;
}

.project-description li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Education Timeline */
.education {
    width: 100%;
}
.education h3, .skills h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}
.education h3::after, .skills h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}
.education-timeline {
    position: relative;
    padding-left: 25px; /* Space for line and markers */
    border-left: 2px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}
.education-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.education-item:last-child {
    padding-bottom: 0;
}
.education-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    z-index: 1;
}
.education-period {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.education-institution {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.education-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
}


.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-category h4 {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    background: rgba(30, 30, 30, 0.7);
    color: var(--text-primary);
    border-radius: 5px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-tag-icon:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.skill-tag-icon img {
    width: 16px;
    height: 16px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
}

.project-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-prominent);
    transform: translateY(-3px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    gap: 0.8rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.project-status {
    background: var(--primary-color);
    color: var(--bg-card);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.6rem;
    background: rgba(78, 205, 196, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(78, 205, 196, 0.2);
    font-weight: 500;
}

/* Experience Section - UNIFIED FOR ALL DEVICES */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px; /* Position of the vertical line */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    padding: 0.6rem 0 1.5rem 2rem; /* Padding to the left of the line */
    width: 100%;
    box-sizing: border-box;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 1rem;
    left: 8px; /* Aligns with the ::before line */
    transform: translateX(-50%);
    border: 2px solid var(--bg-primary);
    z-index: 2;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
    width: 100%;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-prominent);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.timeline-period {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    padding-left: 1.5rem;
}

.timeline-description li {
    margin-bottom: 0.5rem;
    position: relative;
}

/* Achievements Section */
.achievements-grid {
    max-width: 600px;
    margin: 0 auto;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
    text-align: center;
}

.achievement-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-prominent);
    transform: translateY(-3px);
}

.achievement-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.achievement-icon {
    color: var(--primary-color);
}

.achievement-title {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.achievement-company {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.achievement-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 1rem;
}

.contact-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
    text-decoration: none;
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-prominent);
}

.contact-icon {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.contact-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
}

#location-item {
    cursor: pointer;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        padding: 1.2rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }

    section {
        padding: 2rem 0;
    }
}

/* Add to existing styles */
.github-link {
    color: var(--text-secondary);
    margin-left: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.github-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.project-header > div {
    display: flex;
    align-items: center;
}
