/* Base Styles and Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-color: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

/* Page-specific adjustments */
.page-experience {
    /* Ensures in-page anchors and initial content are not hidden under fixed header */
    scroll-padding-top: 100px;
}

.page-experience #experience {
    padding-top: 140px; /* create space under fixed header */
}

/* Additional padding for other sections on experience page */
.page-experience #other-experience {
    padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
}

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

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

a.logo {
    text-decoration: none;
    color: var(--primary-color);
}

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

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

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

.primary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.secondary-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Header and Navigation */
header {
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    border: 3px solid var(--secondary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    position: relative;
}

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

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

.nav-links a.active {
    color: var(--secondary-color);
}

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: var(--transition);
}

/* Burger Animation */
.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.toggle .line2 {
    opacity: 0;
}

.burger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Nav Link Animation */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* Hero Section */
#hero {
    background-color: white;
    padding: 150px 0 80px;
}

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

.hero-text {
    width: 55%;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.hero-text h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 400;
}

.hero-text p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    width: 40%;
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
}

/* About Section */
#about {
    background-color: var(--light-color);
}

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

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Skills Section */
#skills {
    background-color: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Experience Section */
#experience {
    background-color: var(--light-color);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 4px;
    height: 100%;
    background-color: var(--secondary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-dot {
    position: absolute;
    left: 46px;
    top: 10px;
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-left: 80px;
    position: relative;
}

.timeline-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.time-period {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

.timeline-content ul li:before {
    content: '•';
    position: absolute;
    left: 5px;
    color: var(--secondary-color);
    font-weight: bold;
}

.resource-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.resource-link i {
    margin-right: 8px;
}

.resource-link:hover {
    color: var(--accent-color);
}

/* Contact Section */
#contact {
    background-color: white;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center; /* center the grid as a whole */
    justify-items: center;   /* center items within their grid areas */
}

.contact-card {
    padding: 30px;
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    width: 100%;
    max-width: 360px; /* keep cards from stretching too wide */
}

.contact-card:hover {
    text-decoration: none;
}

/* Ensure anchor-wrapped contact cards look like cards */
a.contact-card {
    color: inherit;
    display: block;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.contact-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.contact-card h3 {
    margin-bottom: 10px;
}

/* Contact Form Dropdown */
.contact-form-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-top: 15px;
    z-index: 100;
}

.contact-form-dropdown:before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

.contact-form-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.contact-form-dropdown .btn {
    width: 100%;
    margin-top: 10px;
}

.email-toggle {
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

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

footer p {
    margin: 0;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
/* LinkedIn icon in navbar */
.nav-linkedin {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-left: 15px;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.nav-linkedin:hover {
    color: var(--secondary-color);
    background-color: rgba(74, 107, 255, 0.1);
    transform: scale(1.1);
}

@media screen and (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text, .hero-image {
        width: 100%;
        margin-bottom: 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        text-align: center;
    }
}

@media screen and (max-width: 768px) {
    /* Prevent horizontal scrolling on mobile */
    body {
        overflow-x: hidden;
        font-size: 14px;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
        max-width: none;
    }

    /* Improve anchor scrolling under fixed header */
    section, #portfolio, #about, #skills, #experience, #other-experience, #contact {
        scroll-margin-top: 90px;
    }

    /* Tighten vertical rhythm on mobile */
    section {
        padding: 60px 0;
    }

    header nav {
        padding: 12px 0;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 80px;
        background-color: white;
        flex-direction: column;
        width: 85%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 1;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .burger {
        display: block;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
        word-wrap: break-word;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
        word-wrap: break-word;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .timeline:before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 26px;
    }
    
    .timeline-content {
        margin-left: 60px;
        padding: 20px;
    }

    /* Single column grids for mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    footer .container {
        flex-direction: column;
    }
    
    footer p {
        margin-bottom: 15px;
    }
    
    .contact-form-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        margin: 0;
        z-index: 1000;
    }
    
    .contact-form-dropdown:before {
        display: none;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .overlay.active {
        display: block;
    }
    
    /* Hide LinkedIn button on mobile */
    .nav-linkedin {
        display: none;
    }
    
    /* Stack resource links on mobile */
    .resource-links {
        flex-direction: column;
        gap: 15px;
    }
}



@media screen and (max-width: 480px) {
    .nav-links {
        width: 100%;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }

    /* Single column grids for very small screens */
    .skills-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    #hero {
        padding: 120px 0 50px;
    }
} 