/* Base Styles */
:root {
    --primary-color: #5c6ac4;
    --secondary-color: #2d325a;
    --accent-color: #e1f0fe;
    --text-color: #333;
    --light-text: #777;
    --white: #fff;
    --light-bg: #f9f9f9;
    --dark-bg: #333;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
}

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

ul {
    list-style: none;
}

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

.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.divider {
    height: 4px;
    width: 70px;
    background: var(--primary-color);
    margin: 0 auto;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--light-bg);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
    overflow-x: hidden; /* Prevent header overflow */
}

header.scrolled {
    padding: 10px 0;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
}

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

.nav-link {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-link:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover:before {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--white) 100%);
    padding-top: 80px;
}

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

.hero-text {
    flex: 1;
    padding-right: 30px;
}

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

.hero-text h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--light-text);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.photo-placeholder {
    width: 350px;
    height: 350px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.photo-placeholder i {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.photo-placeholder p {
    font-size: 1rem;
    color: var(--light-text);
}

/* Timeline for Education and Experience */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    padding: 20px 0;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

.timeline-content {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content:before {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-content:before {
    content: '';
    position: absolute;
    top: 20px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.timeline-content .date {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item .icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--white);
    font-size: 1.5rem;
}

.contact-item .text h3 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.contact-item .text p a:hover {
    color: var(--primary-color);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

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

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px 0;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

/* Animation Classes - Updated to handle transforms in CSS instead of JS */
.reveal-from-bottom {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal-from-left {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.reveal-from-right {
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.reveal-from-bottom.active,
.reveal-from-left.active,
.reveal-from-right.active {
    opacity: 1;
    visibility: visible;
    transform: translate(0);
}

@media (max-width: 768px) {
    /* Disable transforms on mobile to prevent layout issues */
    .reveal-from-bottom,
    .reveal-from-left,
    .reveal-from-right {
        transform: none;
    }
    
    .reveal-from-bottom.active,
    .reveal-from-left.active,
    .reveal-from-right.active {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-padding {
        padding: 80px 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero-image {
        justify-content: center;
    }
    
    .photo-placeholder {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        transition: var(--transition);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Fix hero section alignment */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-text h1, 
    .hero-text h2, 
    .hero-text p {
        width: 100%;
        text-align: center;
    }
    
    .hero-image {
        justify-content: center;
        width: 100%;
        display: flex;
    }
    
    .photo-placeholder {
        margin: 0 auto;
    }
    
    /* Fix timeline alignment */
    .timeline {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .timeline:before {
        left: 25px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 15px !important;
        margin-bottom: 20px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-content:before,
    .timeline-item:nth-child(even) .timeline-content:before {
        left: -20px;
        width: 20px;
        height: 20px;
    }
    
    /* Fix contact section layout */
    .contact-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .contact-info {
        width: 100%;
        max-width: 400px;
        margin: 0 auto 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        flex-direction: column;
        text-align: center;
        align-items: center;
        margin-bottom: 30px;
    }
    
    .contact-item .icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .contact-item .text {
        text-align: center;
        width: 100%;
    }
    
    .contact-form {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .form-group {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .photo-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .photo-placeholder i {
        font-size: 3.5rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 1rem;
    }
    
    .hero-content,
    .hero-text,
    .hero-image {
        padding-left: 0;
        padding-right: 0;
    }
    
    .timeline {
        padding: 0 10px;
    }
    
    .timeline-item {
        padding-left: 50px !important;
    }
    
    .contact-item .text h3 {
        font-size: 1.2rem;
    }
}
