:root {
    --primary: #008080;
    /* Teal Medical */
    --primary-dark: #006666;
    --secondary: #e0f2f1;
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --bg-light: #f7fafc;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

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

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.text-primary {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: url('../img/hero-bg.png') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero-text .subtitle {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2rem;
    display: block;
}

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

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
}

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

.hero-image {
    position: relative;
}

.img-frame {
    width: 450px;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 10px solid var(--white);
    position: relative;
    z-index: 2;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-decor {
    position: absolute;
    z-index: 1;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--secondary);
    bottom: -30px;
    left: -30px;
}

/* About Section */
.about {
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    display: block;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

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

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: var(--white);
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--white);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--white);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--white);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--white) transparent transparent;
}

.right::after {
    left: -10px;
}

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

.date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

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

.skill-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.skill-card:hover {
    border-bottom-color: var(--primary);
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Contact */
.contact {
    background: var(--primary-dark);
    color: var(--white);
}

.contact .section-title,
.contact h3,
.contact p {
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

.form-control {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    background: #004d4d;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
        max-width: 100%;
        /* Use full width on mobile for better proportion */
        padding: 0 1rem;
        /* Add slight padding for readability */
    }

    .hero-image {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }

    /* Fix for inner skills grid alignment on mobile */
    .mobile-centered-grid .skill-item {
        justify-content: center;
    }

    .timeline::after {
        left: 31px;
    }

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

    .timeline-item::after {
        left: 21px;
    }

    .left::before,
    .right::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .right {
        left: 0%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
        /* Reduce padding on small screens */
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    /* Ensure inner skills grid becomes 1 column on very small screens if needed, or stays 2 but fits better */
    .inner-skills-grid {
        grid-template-columns: 1fr !important;
        /* Stack skills on small mobile */
        gap: 1rem !important;
    }

    /* Fix fixed width image frame causing horizontal scroll */
    .img-frame {
        width: 100%;
        max-width: 350px;
        /* Limit max width on mobile */
        height: auto;
        aspect-ratio: 4/5;
        /* Maintain aspect ratio */
        border-width: 5px;
        /* Reduce border size */
    }

    .hero-decor {
        width: 150px;
        height: 150px;
        bottom: -20px;
        left: -10px;
    }

    /* Adjust contact wrapper padding for mobile */
    .contact-wrapper {
        padding: 1.5rem;
        gap: 2rem;
    }

    .contact-info-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-icon {
        margin: 0 auto;
    }
}