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

:root {
    --primary-color: #8e44ad;
    --secondary-color: #9b59b6;
    --accent-color: #a569bd;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #ffffff;
    --bg-light: #ecf0f1;
    --border-color: #bdc3c7;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-image: url('./assets/sakura.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
    pointer-events: none;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/sakura.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Improved focus indicator */
a:focus,
button:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.85;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a:focus {
    opacity: 1;
    color: var(--primary-color);
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('./assets/sakura.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 100px 20px 50px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.85;
    animation: fadeInUp 0.8s ease 0.4s both;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.5s both;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.9;
}

.social-links a:hover,
.social-links a:focus {
    transform: translateY(-5px);
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    animation: fadeInUp 0.8s ease 0.9s both;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* CV Unavailable Button - Temporarily Disabled */
.btn-secondary.cv-unavailable {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
}

.btn-secondary.cv-unavailable:hover,
.btn-secondary.cv-unavailable:focus {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transform: none;
    box-shadow: none;
}

.btn i {
    margin-right: 0.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* Section Styles */
section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0.5rem auto;
    max-width: 800px;
    line-height: 1.6;
}

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

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.profile-intro {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.profile-role {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.profile-affiliation {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.profile-social {
    display: flex;
    gap: 1rem;
}

.profile-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
}

/* Subsections */
.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.bio-section,
.motivation-section,
.interests-section {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.bio-section p,
.motivation-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.motivation-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-left: 4px solid var(--primary-color);
}

/* Info Cards */
.about-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.info-card-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.highlight-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary-color);
}

.info-card h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.info-card strong {
    color: var(--text-color);
}

.info-location,
.info-date {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.info-location i,
.info-date i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

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

.info-card ul li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.info-card ul li i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Interests Section */
.interests-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.interests-section .interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.interests-section .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interests-section .clickable-tag {
    cursor: pointer;
    position: relative;
}

.interests-section .clickable-tag::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interests-section .clickable-tag:hover::after {
    opacity: 1;
}

.interests-section .tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.interests-section .tag i {
    font-size: 1.1rem;
}

/* Interest Modal */
.interest-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.interest-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.modal-description {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

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

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

.interests {
    margin-top: 2rem;
}

.interests h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

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

.info-card ul li {
    padding: 0.3rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.info-card ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

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

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.research-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 100%;
}

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

.research-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.research-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

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

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.skill-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skill-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-info {
    flex: 1;
}

.skill-info h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.skill-level {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
    position: relative;
}

.skill-progress::after {
    content: attr(data-progress) '%';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animation for skill bars when in viewport */
.skill-item.animated .skill-progress {
    width: var(--progress-width);
}

/* Awards Section */
.awards {
    background: var(--bg-color);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 100%;
}

/* When there's only 1 award, limit its width */
.awards-grid:has(.award-card:only-child) {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.award-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.award-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.award-content h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.award-org {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.award-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.award-desc {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.award-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
}

.award-link:hover,
.award-link:focus {
    gap: 0.8rem;
    text-decoration: underline;
}

.award-link i {
    font-size: 0.85rem;
}

/* Open Badges Section */
.badges {
    background: var(--bg-light);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
}

/* When there's only 1 badge, center it and limit width */
.badges-grid:has(.badge-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* When there are 2-3 badges, center them */
.badges-grid:has(.badge-item:nth-child(3):last-child),
.badges-grid:has(.badge-item:nth-child(2):last-child) {
    justify-content: center;
}

.badge-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 100%;
    max-width: 250px;
}

.badge-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.badge-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

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

.badge-title {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.badge-issuer {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.badge-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
    margin-top: 0.5rem;
}

.badge-link:hover,
.badge-link:focus {
    gap: 0.8rem;
    text-decoration: underline;
}

.badge-link i {
    font-size: 0.85rem;
}

/* Portfolio Section */
.portfolio {
    background: var(--bg-light);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-color);
}

.filter-btn:hover,
.filter-btn:focus,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* When there's only 1 portfolio item, center it and limit width */
.portfolio-grid:has(.portfolio-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* When there are 2-3 items, center them */
.portfolio-grid:has(.portfolio-item:nth-child(3):last-child),
.portfolio-grid:has(.portfolio-item:nth-child(2):last-child) {
    justify-content: center;
}

.portfolio-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* Portfolio Placeholder */
.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color);
}

.portfolio-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.portfolio-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.7;
}

/* Portfolio Status Badge */
.portfolio-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.portfolio-status.ongoing {
    background: #fef3c7;
    color: #92400e;
}

.portfolio-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Portfolio Meta */
.portfolio-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.portfolio-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.portfolio-meta i {
    color: var(--primary-color);
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tags .tag {
    font-size: 0.8rem;
    padding: 4px 12px;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.portfolio-link:hover {
    gap: 1rem;
}

/* Portfolio Highlights */
.portfolio-highlights {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.portfolio-highlights h4 {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-highlights h4 i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.portfolio-highlights ul {
    list-style: none;
    padding: 0;
}

.portfolio-highlights li {
    padding: 0.4rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.portfolio-highlights li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
}

/* Portfolio Guide Section */
.portfolio-guide {
    margin-top: 4rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.portfolio-guide h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-guide h3 i {
    color: #fbbf24;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.guide-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--bg-light);
    transition: transform 0.3s ease;
}

.guide-item:hover {
    transform: translateY(-5px);
}

.guide-item i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.guide-item h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.guide-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Blog Section */
.blog {
    background: var(--bg-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
}

/* When there's only 1 blog post, center it and limit width */
.blog-grid:has(.blog-card:only-child) {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* When there are 2-3 blog posts, center them */
.blog-grid:has(.blog-card:nth-child(3):last-child),
.blog-grid:has(.blog-card:nth-child(2):last-child) {
    justify-content: center;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

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

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.blog-date,
.blog-category {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-date i,
.blog-category i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.blog-content h3 {
    margin: 0.5rem 0 1rem;
    color: var(--text-color);
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.blog-tags .tag {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover,
.read-more:focus {
    gap: 1rem;
}

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

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-item a:hover,
.contact-item a:focus {
    opacity: 0.7;
}

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

/* CV Unavailable Text */
.cv-unavailable-text {
    color: rgba(136, 136, 136, 0.8);
    font-style: italic;
    font-size: 0.95rem;
}

.social-links-contact {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links-contact a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-links-contact a:hover,
.social-links-contact a:focus {
    transform: translateY(-5px);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contact-form .btn-primary:hover,
.contact-form .btn-primary:focus {
    opacity: 0.9;
}

/* Footer */
.footer {
    background-image: url('./assets/sakura.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 2rem 20px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 55, 72, 0.8);
    backdrop-filter: blur(1px);
}

.footer > * {
    position: relative;
    z-index: 1;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

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

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

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.8rem 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-social {
        justify-content: center;
    }

    .subsection-title {
        font-size: 1.3rem;
    }

    .bio-section,
    .motivation-section,
    .interests-section {
        padding: 1.5rem;
    }

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

    .research-grid,
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-links a {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        width: 100%;
        max-width: 200px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hidden class for portfolio filtering */
.portfolio-item.hidden {
    display: none;
}

/* Animations for awards and badges */
.award-card,
.badge-item {
    opacity: 1;
    animation: fadeInUp 0.6s ease;
}
