/* General Body & Typography */
:root {
    --primary-color: #005f73;
    --secondary-color: #0a9396;
    --accent-color: #94d3a2;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --heading-color: #212529;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 15px rgba(0,95,115,0.08);
    --shadow-medium: 0 8px 30px rgba(0,95,115,0.12);
    --shadow-dark: 0 15px 45px rgba(0,95,115,0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth animations for all elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal 0.8s ease forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 0;
}

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

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 10px auto 0;
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

section {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-light);
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0,95,115,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

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

nav .logo:hover::after {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

nav ul li a:hover {
    color: white;
    transform: translateY(-2px);
}

nav ul li a:hover::before {
    opacity: 1;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 150px; /* Account for fixed header */
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0,95,115,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(10,147,150,0.05) 0%, transparent 50%);
    z-index: -1;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin-bottom: 20px;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.profile-photo:hover::before {
    opacity: 0.2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInUp 1s ease;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 20px;
    animation: slideInUp 1s ease 0.2s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .summary {
    max-width: 700px;
    font-size: 1.1rem;
    margin-bottom: 30px;
    animation: slideInUp 1s ease 0.4s both;
    line-height: 1.8;
}

.cta-button {
    background: var(--gradient-primary);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    animation: slideInUp 1s ease 0.6s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.cta-button:hover::before {
    left: 100%;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--gradient-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    box-shadow: 0 0 10px rgba(0,95,115,0.3);
    z-index: 1;
}

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

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 60px; /* Space from center */
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 60px; /* Space from center */
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background: var(--primary-color);
    top: 27px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

/* Add a larger background circle behind each timeline circle to completely hide the line */
.timeline-item::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    right: -15px;
    background: var(--background-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:hover::after {
    background: var(--secondary-color);
    transform: scale(1.3);
    box-shadow: var(--shadow-medium);
}

.timeline-item:nth-child(even)::after {
    left: -8px;
    right: auto;
}

.timeline-item:nth-child(even)::before {
    left: -15px;
    right: auto;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--card-bg);
    position: relative;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,95,115,0.1);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-content:hover::before {
    opacity: 1;
}

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

.timeline-content .company {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.timeline-content .date {
    font-size: 0.9rem;
    color: #6c757d;
    display: block;
    margin-bottom: 15px;
}

.timeline-content ul {
    padding-left: 20px;
    margin: 0;
}

/* Skills Section */
.skills-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    flex: 1;
    min-width: 280px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,95,115,0.1);
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-tags span {
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,95,115,0.1);
    position: relative;
    overflow: hidden;
}

.skill-tags span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.skill-tags span:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.skill-tags span:hover::before {
    left: 0;
}

/* Contact Section */
#contact {
    text-align: center;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0,95,115,0.03) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(10,147,150,0.03) 0%, transparent 50%);
    z-index: 0;
}

#contact > * {
    position: relative;
    z-index: 1;
}

#contact h2::after {
    background: var(--gradient-primary);
}

.contact-info {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    display: inline-block;
    margin-top: 20px;
    border: 1px solid rgba(0,95,115,0.1);
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}

.contact-info a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.contact-info a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-info a:hover::before {
    width: 100%;
}

.contact-info span {
    color: var(--text-color);
    font-weight: 400;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--heading-color), #2c3e50);
    color: var(--background-color);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

footer p {
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    nav ul {
        display: none; /* Simple hiding for mobile, can be replaced with a burger menu */
    }

    .timeline::after {
        left: 31px;
        margin-left: 0;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 70px;
    }

    .timeline-item::after,
    .timeline-item:nth-child(even)::after {
        left: 23px;
        right: auto;
    }

    .timeline-item::before,
    .timeline-item:nth-child(even)::before {
        left: 16px;
        right: auto;
    }

    .hero h1 { font-size: 2.5rem; }
    .hero h2 { font-size: 1.3rem; }
    h2 { font-size: 1.8rem; }
    
    .skills-container {
        flex-direction: column;
        align-items: center;
    }
    
    .skill-category {
        min-width: 100%;
        max-width: 400px;
    }
    
    .contact-info {
        padding: 20px;
        margin: 0 10px;
    }
    
    .contact-info a {
        font-size: 1rem;
        display: block;
        margin: 5px 0;
    }
    
    .contact-info span {
        display: none;
    }
    
    /* Disable complex animations on mobile for better performance */
    .profile-photo {
        animation: none;
    }
    
    * {
        transition: none;
    }
    
    .timeline-content:hover,
    .skill-category:hover,
    .skill-tags span:hover {
        transform: none;
    }
}