/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    --primary-color: #1d3557;
    --secondary-color: #457b9d;
    --accent-color: #e63946;
    --gold-accent: #f4a261;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eef3 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(69, 123, 157, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

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

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

.btn-full {
    width: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 0; top: 8px; }
    50% { opacity: 1; top: 16px; }
}

/* Fade-in Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s backwards;
}

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

/* ===================================
   Section Styles
   =================================== */
section {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

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

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text {
    color: var(--text-dark);
}

.lead-text {
    font-size: 20px;
    line-height: 1.8;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 24px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

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

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eef3 100%);
}

.image-placeholder svg {
    width: 100%;
    height: 100%;
}

/* ===================================
   Education Section
   =================================== */
.education {
    background: var(--bg-light);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), var(--gold-accent));
}

.timeline-item {
    position: relative;
    padding-left: 64px;
    margin-bottom: 64px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 4px var(--bg-white), 0 0 0 6px var(--accent-color);
}

.timeline-content {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--gold-accent));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.timeline-content h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.institution-detail,
.degree-detail {
    color: var(--text-light);
    margin-bottom: 8px;
}

.research-focus {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    line-height: 1.6;
}

.research-focus strong {
    color: var(--primary-color);
}

.achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.achievement-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-accent), #e76f51);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* ===================================
   Research Section
   =================================== */
.research {
    background: var(--bg-white);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.research-card {
    background: var(--bg-light);
    padding: 40px 32px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.research-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.research-card h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.research-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--accent-color);
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.project-header {
    margin-bottom: 16px;
}

.project-header h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.project-type {
    display: inline-block;
    background: var(--gold-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.project-description {
    color: var(--text-light);
    line-height: 1.8;
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.project-role,
.project-period {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* ===================================
   Skills Section
   =================================== */
.skills {
    background: var(--bg-white);
}

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

.skill-category h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-name {
    color: var(--text-dark);
    font-weight: 500;
}

.skill-badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

/* Contact Section Animated Background */
.contact-animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.contact-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(241, 250, 238, 0.3) 0%,
        rgba(168, 218, 220, 0.2) 25%,
        rgba(69, 123, 157, 0.15) 50%,
        rgba(168, 218, 220, 0.2) 75%,
        rgba(241, 250, 238, 0.3) 100%);
    background-size: 400% 400%;
    animation: contactGradient 18s ease-in-out infinite;
}

@keyframes contactGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.contact-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contact-shapes .shape {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.12;
    filter: blur(60px);
}

.contact-shapes .shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #457b9d, #a8dadc);
    top: -10%;
    right: 10%;
    animation: contactShapeFloat1 20s ease-in-out infinite;
}

.contact-shapes .shape-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f1faee, #69b2b8);
    bottom: -5%;
    left: 5%;
    animation: contactShapeFloat2 25s ease-in-out infinite;
}

.contact-shapes .shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #a8dadc, #1d3557);
    top: 40%;
    left: 40%;
    animation: contactShapeFloat3 22s ease-in-out infinite;
}

@keyframes contactShapeFloat1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg);
        border-radius: 70% 30% 40% 60% / 60% 50% 40% 50%;
    }
}

@keyframes contactShapeFloat2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 60% 40% 30% 70% / 50% 40% 60% 50%;
    }
    50% {
        transform: translate(40px, -40px) rotate(180deg);
        border-radius: 30% 70% 60% 40% / 40% 60% 50% 50%;
    }
}

@keyframes contactShapeFloat3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        border-radius: 50% 50% 30% 70% / 50% 30% 70% 50%;
    }
    50% {
        transform: translate(-20px, 20px) scale(1.1);
        border-radius: 30% 70% 50% 50% / 70% 50% 50% 30%;
    }
}

.contact .container {
    position: relative;
    z-index: 2;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-info h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-method {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-details h4 {
    color: var(--primary-color);
    margin-bottom: 4px;
    font-size: 16px;
}

.contact-details a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.contact-details p {
    color: var(--text-light);
}

/* Contact Form */
.contact-form-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

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

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

.footer-content p {
    margin-bottom: 8px;
}

.footer-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 32px 0;
        gap: 16px;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-dot {
        left: 0;
    }

    .timeline-item {
        padding-left: 48px;
    }
}

@media (max-width: 640px) {
    section {
        padding: 60px 0;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

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

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

    .image-placeholder {
        width: 200px;
        height: 200px;
    }

    .contact-form-container {
        padding: 24px;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
    text-align: center;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Publications Section
   =================================== */
.publications {
    background: var(--bg-white);
}

.publications-grid {
    display: grid;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.publication-card {
    background: var(--bg-light);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.publication-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.publication-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--gold-accent));
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.publication-badge.first-author {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.publication-card h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.5;
}

.publication-card .authors {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.publication-card .authors strong {
    color: var(--accent-color);
    font-weight: 600;
}

.publication-card .journal {
    color: var(--secondary-color);
    font-style: italic;
    font-size: 14px;
    margin-bottom: 8px;
}

.publication-note {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

.publication-note-section {
    margin-top: 48px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--gold-accent);
}

.publication-note-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 12px;
}

.publication-note-section p:last-child {
    margin-bottom: 0;
}

/* Featured Project Card */
.project-card.featured {
    border-left-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.05) 0%, var(--bg-white) 100%);
}

.project-description {
    line-height: 1.8;
    color: var(--text-light);
}

/* Statement Card */
.statement-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

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

.statement-card ul {
    list-style: none;
    padding: 0;
}

.statement-card li {
    line-height: 2;
    color: var(--text-light);
    margin-bottom: 16px;
    padding-left: 20px;
    position: relative;
}

.statement-card li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.test-scores ul,
.clinical-rotations,
.research-tasks,
.skills-acquired {
    list-style: disc;
    padding-left: 24px;
    color: var(--text-light);
    line-height: 1.8;
}

.test-scores ul li,
.clinical-rotations li,
.research-tasks li,
.skills-acquired li {
    margin-bottom: 8px;
}
