:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;

    /* Education timeline colors */
    --edu-card-bg: #f4ede6;         /* warm light card like your screenshot */
    --edu-card-border: #e8d9c9;     /* subtle border color */
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    height: 40px;
    text-decoration: none;
    padding: 2px 0; /* Add small padding to prevent navbar from growing */
}

.logo img {
    height: 110%; /* Slightly larger than container */
    width: auto;
    max-height: 44px; /* Slightly larger than container */
    object-fit: contain;
    transform: scale(1.1); /* Scale up slightly */
    transform-origin: left center; /* Scale from left to prevent shifting */
}

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

.nav-links a {
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    outline: none !important;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #e2e8f0;
    flex-direction: column;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #cbd5e0;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #a0aec0;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #e69008;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-dark {
    background: rgba(15, 23, 42, 0.5);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #a0aec0;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Text Colors */
.text-blue { color: #3b82f6; }
.text-gray { color: #a0aec0; }
.text-yellow { color: #f59e0b; }

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    width: 350px;  /* Fixed width for the image container */
    margin: 0 auto; /* Center the image */
}

.about-image:hover {
    transform: translateY(-5px);
}

.about-image img {
    width: 100%;
    height: auto;
    
    display: block;
    object-fit: cover;
    aspect-ratio: 1/1; /* Makes the image square */
}

.about-text {
    font-size: 1.1rem;
    color: #cbd5e0;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background: rgba(30, 41, 59, 0.7);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0.8;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-card:hover::before {
    opacity: 1;
    height: 6px;
}

.skill-icon {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: #f8fafc;
    position: relative;
    display: inline-block;
}

.skill-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.skill-card:hover h3::after {
    width: 70px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.2rem 0 1.8rem;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.skill-level {
    background: rgba(255, 255, 255, 0.08);
    height: 8px;
    border-radius: 10px;
    margin-top: 1.5rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    animation: shimmer 2s infinite linear;
    background-size: 200% 100%;
    opacity: 0.6;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.project-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 255, 218, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(8px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #64ffda);
    opacity: 0.8;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.25);
    border-color: rgba(100, 255, 218, 0.2);
}

.project-card:hover::before {
    opacity: 1;
    height: 5px;
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-title {
    margin: 0 0 1.25rem;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
    line-height: 1.3;
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.project-card:hover .project-title::after {
    width: 80px;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    line-height: 1.7;
    flex-grow: 1;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.project-features li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.tech-tag {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.3);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.project-links .btn {
    flex: 1;
    text-align: center;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-links .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.project-links .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.project-links .btn-outline {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.project-links .btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-card {
        margin: 0 0.5rem;
    }
    
    .project-content {
        padding: 1.75rem 1.5rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .project-links .btn {
        width: 100%;
    }
}

/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #334155;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(30, 41, 59, 0.5);
    color: white;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   Education Timeline (NEW)
================================ */
.timeline {
    position: relative;
    margin: 30px 0;
    padding: 20px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(245,158,11,0.15),
        var(--accent-color),
        rgba(245,158,11,0.15)
    );
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-dot {
    position: absolute;
    top: 36px;
    left: calc(50% - 10px);
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border: 4px solid #fff;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(245,158,11,0.35);
}

.timeline-content {
    position: relative;
    background: var(--edu-card-bg);
    border: 1px solid var(--edu-card-border);    /* clear border as requested */
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    color: var(--text-dark);
}

/* Pointer with border (triangle) */
.timeline-item.left .timeline-content::before,
.timeline-item.left .timeline-content::after,
.timeline-item.right .timeline-content::before,
.timeline-item.right .timeline-content::after {
    content: "";
    position: absolute;
    top: 34px;
    border: solid transparent;
    height: 0;
    width: 0;
    pointer-events: none;
}

.timeline-item.left .timeline-content::before {
    right: -18px;
    border-width: 10px;
    border-left-color: var(--edu-card-border);    /* border edge */
}
.timeline-item.left .timeline-content::after {
    right: -16px;
    border-width: 10px;
    border-left-color: var(--edu-card-bg);        /* inner color */
}

.timeline-item.right .timeline-content::before {
    left: -18px;
    border-width: 10px;
    border-right-color: var(--edu-card-border);
}
.timeline-item.right .timeline-content::after {
    left: -16px;
    border-width: 10px;
    border-right-color: var(--edu-card-bg);
}

/* Typography inside cards */
.timeline-date {
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: .3px;
    display: inline-block;
    margin-bottom: 10px;
}

.timeline-content h3 {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 700;
}
.timeline-content h4 {
    color: #374151;
    font-size: .98rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.timeline-content ul {
    margin-left: 1.2rem;
    margin-top: .5rem;
    color: #374151;
}
.timeline-content li {
    margin: .35rem 0;
}

/* Responsive Timeline */
@media (max-width: 992px) {
    .timeline-item { padding: 18px 28px; }
}

@media (max-width: 768px) {
    .timeline::before {
        left: 24px;
        transform: none;
    }
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        width: 100%;
        padding: 14px 20px 14px 60px;
    }
    .timeline-dot {
        left: 24px;
        transform: translateX(-50%);
        top: 34px;
    }
    .timeline-item .timeline-content::before,
    .timeline-item .timeline-content::after {
        display: none; /* cleaner on small screens */
    }
    a, button, input, textarea {
        outline: none;
    }
    a:focus, button:focus, input:focus, textarea:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Extra small tweaks */
@media (max-width: 480px) {
    .timeline-content { padding: 18px; }
    .timeline-date { margin-bottom: 6px; }
}

/* Responsive Design (existing) */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    .nav-links.active { display: flex; }

    .mobile-menu-btn { display: flex; }
    .mobile-menu-btn.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active .bar:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }


    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn { width: 200px; text-align: center; }

    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .skill-card, .project-card { padding: 1.5rem; }
    .container { padding: 0 15px; }
}

@media (min-width: 769px) {
    .timeline-dot { display: none; }
}

@media (max-width: 985px) {
    .about-content { grid-template-columns: 1fr; gap: 2rem; }
}   