/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #64ffda;
    --secondary-color: #8892b0;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --bg-primary: #0a192f;
    --bg-secondary: #112240;
    --bg-tertiary: #172a45;
    --accent-color: #ff6b6b;
    --nav-height: 70px;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: left;
    justify-content: flex-start;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.1);
}

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

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

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

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

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

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

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-container {
    max-width: var(--max-width);
    padding: 0 20px;
    width: 100%;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 700px;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: 0;
}

.hero-image .image-wrapper {
    width: 400px;
    height: 400px;
    position: relative;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.carousel-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: left;
    font-style: italic;
}

.carousel-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 15px;
    text-align: center;
    min-height: 40px;
    transition: opacity 0.3s ease;
    line-height: 1.6;
}

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2.0s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    z-index: 2;
    opacity: 0.7;
}

.carousel-btn:hover {
    background: rgba(100, 255, 218, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 15px;
}

.carousel-btn-next {
    right: 15px;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.5s ease;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 5px;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-greeting {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease;
}

.hero-name {
    font-size: clamp(32px, 6vw, 60px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title {
    font-size: clamp(24px, 4.5vw, 45px);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 60px;
    right: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 18px;
    animation: bounce 2s infinite;
    z-index: 1;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    transform: rotate(45deg);
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

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

/* Section Styles */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: clamp(26px, 5vw, 32px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    justify-content: flex-start;
}

.section-number {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 20px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
}

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

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    list-style: none;
    margin-top: 20px;
}

.skills-list li {
    color: var(--text-secondary);
    font-size: 16px;
    position: relative;
    padding-left: 20px;
}

.skills-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

.image-wrapper {
    width: 300px;
    height: 300px;
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    display: block;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover .image-placeholder {
    transform: translate(-5px, -5px);
}

.image-wrapper:hover::before {
    transform: translate(5px, 5px);
}

/* Experience Section */
.experience-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
}

.experience-tabs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tab-button {
    background: transparent;
    border: none;
    border-left: 2px solid var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-family: inherit;
}

.tab-button:hover {
    background-color: rgba(100, 255, 218, 0.05);
    color: var(--primary-color);
}

.tab-button.active {
    border-left-color: var(--primary-color);
    background-color: rgba(100, 255, 218, 0.05);
    color: var(--primary-color);
}

.experience-details {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.job-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

.job-period {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.job-description {
    list-style: none;
    color: var(--text-secondary);
}

.job-description li {
    padding-left: 20px;
    margin-bottom: 10px;
    position: relative;
    line-height: 1.8;
}

.job-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    gap: 30px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.project-card.featured {
    grid-template-columns: 1.5fr 1fr;
}

#glaucoma-project {
    scroll-margin-top: 120px;
}

.project-label {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.project-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.project-description {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.project-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    margin-bottom: 20px;
}

.project-tech li {
    color: var(--text-secondary);
    font-size: 14px;
    font-family: 'Courier New', monospace;
}


.project-link {
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.project-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.project-link span {
    font-size: 14px;
}

.project-image {
    height: 300px;
    min-height: 300px;
}

.project-image iframe,
.project-image video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
    background-color: var(--bg-tertiary);
    object-fit: cover;
}

.project-image .image-placeholder,
.project-image .pdf-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.project-link {
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.project-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.project-link span {
    font-size: 14px;
}

/* Table of Contents */
.toc-container {
    position: relative;
}

.toc-link {
    position: relative;
}

.toc-link:hover {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.toc-link:hover span:first-child {
    transform: translateX(3px);
    transition: transform 0.3s ease;
}

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

.skill-category {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: var(--transition);
}

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

.skill-category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: left;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-item {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skill-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Education Section */
.education-timeline {
    position: relative;
    padding-left: 40px;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), transparent);
}

.education-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 40px;
}

.education-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-primary);
}

.education-year {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.education-degree {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.education-school {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 10px;
}

.education-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Contact Section */
.contact {
    text-align: left;
}

.contact-content {
    text-align: left;
}

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

.contact-btn {
    margin-bottom: 50px;
}

.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 10px;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Footer */
.footer {
    text-align: left;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
}

.footer-year {
    margin-top: 10px;
    font-size: 12px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    }

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

    .nav-item {
        margin: 10px 0;
    }

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

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

    .experience-content {
        grid-template-columns: 1fr;
    }

    .experience-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .tab-button {
        border-left: none;
        border-bottom: 2px solid var(--bg-tertiary);
        white-space: nowrap;
    }

    .tab-button.active {
        border-bottom-color: var(--primary-color);
        border-left: none;
    }

    .project-card,
    .project-card.featured {
        grid-template-columns: 1fr;
    }

    .project-image {
        order: -1;
        height: 200px;
    }

    .section {
        padding: 60px 0;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        max-width: 100%;
        order: -1;
    }

    .hero-carousel {
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .project-title {
        font-size: 22px;
    }

    .education-item {
        padding-left: 30px;
    }
}
