:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --accent-primary: #2c3e50;
    --accent-secondary: #3498db;
    --accent-tertiary: #34495e;
    --text-primary: #2c3e50;
    --text-secondary: #555555;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'M PLUS Rounded 1c', 'BIZ UDGothic', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 2s forwards;
}

.loader-circle {
    width: 80px;
    height: 80px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px var(--shadow-color);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

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

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

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

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

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

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--accent-primary);
    transition: all 0.3s ease;
}

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

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

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

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

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 4px 12px var(--shadow-color);
        padding: 20px 0;
        gap: 0;
    }

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

    .nav-item {
        padding: 15px 0;
    }

    .nav-link::after {
        display: none;
    }
}

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

.section:first-of-type {
    padding-top: 150px;
}

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

.section-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--accent-primary);
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 0.8s ease-out forwards;
    font-weight: 700;
}

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

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 80px 0;
    position: relative;
}

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

.about-image {
    width: 300px;
    height: 300px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-info h3 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.hashtag {
    background: var(--secondary-bg);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--accent-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hashtag:hover {
    background: var(--accent-secondary);
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Research Section */
.research-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.research-image {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.research-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.research-image:hover img {
    transform: scale(1.05);
}

.research-info h3 {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.conference-info {
    background: var(--secondary-bg);
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    border-left: 4px solid var(--accent-secondary);
    border: 1px solid var(--border-color);
}

.conference-item {
    padding: 15px 0;
}

.conference-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.conference-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.conference-link:hover {
    color: var(--accent-tertiary);
    text-decoration: underline;
}

.paper-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.paper-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-secondary);
    color: var(--primary-bg);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.paper-btn:hover {
    background: var(--accent-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Hackathons Section */
.hackathons {
    position: relative;
}

.swiper {
    width: 100%;
    height: auto;
    padding: 40px 0;
}

.swiper-slide {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.swiper-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.project-title {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.award {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--secondary-bg);
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid var(--border-color);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.project-image:hover img {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: var(--primary-bg);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.modal-close:hover {
    background: var(--accent-secondary);
    color: var(--primary-bg);
    transform: scale(1.1);
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-secondary);
    color: var(--primary-bg);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.swiper-pagination-bullet {
    background: var(--text-secondary);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent-secondary);
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
    color: var(--accent-secondary) !important;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px !important;
    height: 50px !important;
    margin-top: -25px !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--accent-secondary);
    color: var(--primary-bg) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: 900;
}

.swiper-button-next {
    right: 10px !important;
}

.swiper-button-prev {
    left: 10px !important;
}

/* Experience Section */
.experience-subsection {
    margin-bottom: 40px;
}

.experience-subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-weight: 700;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.experience-card {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    padding: 15px 0;
}

.experience-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.company-name {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.role {
    color: var(--accent-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 600;
}

.period {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 400;
}

/* Interests Section */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.interest-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.interest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.interest-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Contact Section */
.contact {
    background: var(--secondary-bg);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid var(--border-color);
    min-width: 300px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    color: var(--accent-secondary);
}

.contact-item:hover .contact-icon {
    background: var(--accent-secondary);
    color: var(--primary-bg);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.contact-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.contact-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
    word-break: break-all;
}

.contact-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.copy-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--accent-secondary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.copy-btn:hover {
    background: var(--accent-secondary);
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.copy-btn.copied {
    background: var(--accent-tertiary);
    border-color: var(--accent-tertiary);
    color: var(--primary-bg);
}

.external-btn {
    background: var(--accent-secondary);
    color: var(--primary-bg);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
}

.external-btn:hover {
    background: var(--accent-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

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

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

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

    .contact-links {
        gap: 20px;
    }

    .contact-item {
        min-width: 280px;
    }

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

    .swiper-slide {
        padding: 20px;
    }

    .project-links {
        justify-content: center;
    }
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}