/* CSS Variables */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #1a2530;
    --gray: #95a5a6;
    --text: #333333;
    --text-light: #7f8c8d;
    --white: #ffffff;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 8px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background-color: rgba(26, 37, 48, 0.95);
    color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(26, 37, 48, 0.98);
    padding: 5px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: var(--transition);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--secondary);
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content .tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
    font-weight: 500;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--light);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

/* About Section */
.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.highlight {
    color: var(--secondary);
    font-weight: 600;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    left: 0;
    background-color: rgba(52, 152, 219, 0.2);
    z-index: -1;
    transform: skewX(-15deg);
}

/* Skills Section */
.skills-section {
    background-color: #f8f9fa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
    transition: var(--transition);
}

.skill-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.2);
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: var(--light);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Education Section - FIXED */

/* Education Section - FIXED with same line layout */
.education-section {
    background-color: #f8f9fa;
}

.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary);
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-start;
    padding-right: 50%;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
    padding-left: 50%;
}

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    width: 100%;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--secondary);
    border-radius: 50%;
    top: 1.5rem;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -28px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -28px;
}

/* FIXED: Date and college name on the same line */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary);
    background: var(--light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-title {
    flex: 1;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.timeline-subtitle {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.timeline-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.status-badge, .gpa-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.status-badge {
    background: var(--success);
    color: var(--white);
}

.gpa-badge {
    background: var(--warning);
    color: var(--white);
}

/* Responsive Design for Education Section */
@media (max-width: 768px) {
    .education-timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        padding: 0 !important;
        margin-bottom: 1.5rem;
    }

    .timeline-content {
        width: 100%;
        margin-left: 40px;
        padding: 1.25rem;
    }

    .timeline-content::before {
        left: -25px !important;
        right: auto !important;
        top: 1.25rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-date {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .education-timeline::before {
        left: 15px;
    }
    
    .timeline-content {
        margin-left: 30px;
        padding: 1rem;
    }
    
    .timeline-content::before {
        left: -20px !important;
        width: 14px;
        height: 14px;
        top: 1rem;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-date {
        font-size: 0.85rem;
        padding: 0.3rem 0.7rem;
    }
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.certification-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.certification-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.certification-header i {
    font-size: 2.5rem;
}

.certification-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.certification-body {
    padding: 2rem;
}

.certification-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light);
}

.certification-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--primary);
}

.detail-value.completed {
    color: var(--success);
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,0 1000,1000 0,1000"/></svg>');
    background-size: cover;
}

.contact-section .section-title h2 {
    color: var(--white);
}

.contact-section .section-title h2::after {
    background-color: var(--light);
}

.contact-section .section-title p {
    color: var(--light);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--secondary);
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--white);
}

.contact-details p {
    color: var(--light);
    margin: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.3rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    color: var(--secondary);
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--light);
}

.footer-content p:last-child {
    margin-bottom: 0;
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: rgba(26, 37, 48, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.5s;
        box-shadow: var(--shadow-hover);
        padding: 2rem 0;
        backdrop-filter: blur(10px);
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding: 150px 0 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .tagline {
        font-size: 1.3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .section {
        padding: 80px 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile timeline adjustments - FIXED */
    .education-timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        padding: 0 !important;
        margin-bottom: 2rem;
    }

    .timeline-date {
        position: relative;
        width: auto;
        margin-bottom: 0.5rem;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        display: inline-block;
    }

    .timeline-content {
        width: 100%;
        margin-left: 40px;
        padding: 1.5rem;
    }

    .timeline-content::before {
        left: -25px !important;
        right: auto !important;
        top: 1.5rem;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .container {
        width: 95%;
    }
    
    .project-content, .certification-body {
        padding: 1.5rem;
    }
    
    .education-timeline::before {
        left: 20px;
    }
    
    .timeline-content {
        margin-left: 30px;
        padding: 1.25rem;
    }
    
    .timeline-content::before {
        left: -20px !important;
        width: 14px;
        height: 14px;
        top: 1.25rem;
    }
    
    .timeline-date {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}