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

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'ヒラギノ角ゴ Pro', 'Yu Gothic', YuGothic, 'MS UI Gothic', Meiryo, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Main Container */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.sidebar-nav ul {
    list-style: none;
    margin-top: 20px;
}

.sidebar-nav li {
    margin: 10px 0;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ffd89b;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left-color: #ffd89b;
    font-weight: 600;
}

/* Sidebar Social Links */
.sidebar-social {
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* CTF Animated Button */
.ctf-btn-wrapper {
    padding: 15px 20px 25px;
}

.ctf-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 2px solid #00ff88;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 15px rgba(0, 255, 136, 0.1);
}

.ctf-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    animation: ctfShine 2.5s infinite;
}

@keyframes ctfShine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

.ctf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(0, 255, 136, 0.5), inset 0 0 25px rgba(0, 255, 136, 0.2);
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

.ctf-btn-icon {
    font-size: 24px;
    animation: ctfPulse 1.5s infinite;
}

@keyframes ctfPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.ctf-btn-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ctf-btn-title {
    color: #00ff88;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.ctf-btn-subtitle {
    color: #aaa;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
}

.ctf-btn-arrow {
    color: #00ff88;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.ctf-btn:hover .ctf-btn-arrow {
    transform: translateX(5px);
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 40px;
    overflow-y: auto;
    background-color: #f8f9fc;
    background-image:
        radial-gradient(circle at 25px 25px, rgba(102, 126, 234, 0.03) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(118, 75, 162, 0.03) 2px, transparent 0);
    background-size: 100px 100px;
}

/* Page Styles */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Scroll Down Animation */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    padding: 20px 0;
}

.scroll-indicator p {
    font-size: 8px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow span {
    width: 24px;
    height: 24px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(-45deg);
    margin-top: -16px;
    animation: scrollDown 1.5s infinite;
}

.scroll-arrow span:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrow span:nth-child(2) {
    animation-delay: 0.3s;
}

.scroll-arrow span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translateY(-10px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(-45deg) translateY(10px);
    }
}

/* Introduction Section */
.introduction-section {
    background: white;
    border-left: 4px solid #667eea;
    padding: 30px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
}

.introduction-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Intro with photo side by side */
.intro-with-photo {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}

/* Introduction content */
.introduction-content {
    flex: 1;
    line-height: 1.8;
    color: #333;
}

.introduction-content p {
    margin-bottom: 15px;
    font-size: 16px;
    text-align: justify;
}

.introduction-content p:last-child {
    margin-bottom: 0;
}

/* Photo on right side with shadow */
.intro-photo-right {
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 15px 30px 15px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    transition: all 0.4s ease;
    border-radius: 2px;
    margin: 10px 20px;
}

.intro-photo-right:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(0, 0, 0, 0.15);
}

.intro-photo-right>img {
    width: 130px;
    height: 170px;
    object-fit: cover;
    object-position: center;
    border-radius: 1px;
    opacity: 1;
    box-shadow: none;
    display: block;
}

.intro-photo-right::after {
    display: none;
}

/* Signature styling */
.signature {
    margin-top: 15px;
}

.signature img {
    width: 180px;
    height: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    mix-blend-mode: multiply;
}

.signature img:hover {
    opacity: 1;
    mix-blend-mode: normal;
}

/* Digital Signature Text */
.digital-signature {
    margin-top: 15px;
    text-align: center;
}

.signature-text {
    font-family: 'Brush Script MT', 'Segoe Script', cursive;
    font-size: 24px;
    color: #667eea;
    font-style: italic;
    display: inline-block;
    position: relative;
}

.signature-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
}

/* CTA Button */
.cta-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px rgba(102, 126, 234, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 80px rgba(102, 126, 234, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

/* Tabs Styling */
.tabs-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    background-color: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    min-width: 150px;
}

.tab-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: white;
}

.tab-contents {
    padding: 40px;
}

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

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

.tab-content h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.tab-content h3 {
    font-size: 18px;
    color: #554d9f;
    margin-top: 20px;
    margin-bottom: 10px;
}

#skills h3 {
    font-size: 22px;
    color: #2563eb;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
}

.skills-section {
    margin-bottom: 40px;
}

.skills-section:first-of-type {
    margin-top: 0;
}

.info-section {
    line-height: 1.8;
}

.info-section p {
    margin: 12px 0;
    font-size: 16px;
}

.info-section ul {
    margin-left: 20px;
    margin-top: 10px;
}

.info-section li {
    margin: 8px 0;
    font-size: 16px;
}

.info-section strong {
    color: #554d9f;
}

/* Two Column Grid Layout */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

#skills .info-grid {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '▹';
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 60px;
    color: rgba(37, 99, 235, 0.05);
    opacity: 0.5;
}

.info-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    border-left-color: #2563eb;
}

.info-item strong {
    color: #2563eb;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.info-item span {
    font-size: 15px;
    color: #555;
    font-weight: 400;
    line-height: 1.6;
    text-align: justify;
}

/* About Me Section */
.about-me-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.about-me-section h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.about-me-content {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 16px;
    color: #555;
}

.about-me-content p {
    margin: 12px 0;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.interest-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #2563eb;
    border-top: 5px solid #2563eb;
    position: relative;
    overflow: hidden;
}

.interest-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.interest-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
    border-left-color: #2563eb;
    border-top-color: #2563eb;
}

.interest-card h3 {
    font-size: 20px;
    color: #2563eb;
    margin: 20px 0 12px 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.interest-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.card-icon {
    height: 120px;
    display: flex;
}

/* Science Animation */
.science-animation {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nucleus {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #FF1744, #C41C3B);
    border-radius: 50%;
    box-shadow: 0 0 20px #FF1744, 0 0 40px rgba(255, 23, 68, 0.5);
    z-index: 10;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 40px;
    height: 40px;
}

.orbit-2 {
    width: 70px;
    height: 70px;
    border-color: rgba(76, 175, 80, 0.3);
}

.orbit-3 {
    width: 100px;
    height: 100px;
    border-color: rgba(255, 152, 0, 0.3);
}

.electron {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, #00D4FF, #0288D1);
    border-radius: 50%;
    box-shadow: 0 0 10px #00D4FF;
    left: 50%;
    top: 50%;
}

.electron-1 {
    animation: orbitPath1 3s infinite linear;
}

.electron-1.electron-offset {
    animation: orbitPath1 3s infinite linear 1.5s;
}

.electron-2 {
    animation: orbitPath2 4s infinite linear;
}

.electron-2.electron-offset {
    animation: orbitPath2 4s infinite linear 1.33s;
}

.electron-2.electron-offset-2 {
    animation: orbitPath2 4s infinite linear 2.66s;
}

.electron-3 {
    animation: orbitPath3 5s infinite linear;
}

.electron-3.electron-offset {
    animation: orbitPath3 5s infinite linear 2.5s;
}

.energy-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 8px #FFD700;
}

.energy-1 {
    animation: energyPath1 2s infinite ease-in-out;
}

.energy-2 {
    animation: energyPath1 2s infinite ease-in-out 1s;
}

@keyframes orbitPath1 {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateX(20px) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(20px) rotate(-360deg);
    }
}

@keyframes orbitPath2 {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateX(35px) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(35px) rotate(-360deg);
    }
}

@keyframes orbitPath3 {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateX(50px) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

@keyframes energyPath1 {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0;
    }

    50% {
        transform: translate(30px, 30px);
        opacity: 1;
    }
}

/* Technology Animation */
.pcb-circuit {
    width: 100px;
    height: 100px;
}

.circuit-path {
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: drawCircuit 3s ease-in-out infinite;
}

.circuit-path-alt {
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: drawCircuit 3s ease-in-out infinite 0.5s;
}

@keyframes drawCircuit {

    0%,
    100% {
        stroke-dashoffset: 150;
    }

    50% {
        stroke-dashoffset: 0;
    }
}

/* Music Animation */
.headphone-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.headphone {
    position: relative;
    width: 70px;
    height: 50px;
    margin: 0 auto;
}

.ear-left,
.ear-right {
    position: absolute;
    width: 20px;
    height: 30px;
    background: #4CAF50;
    border-radius: 50%;
    top: 10px;
}

.ear-left {
    left: 0;
    animation: earhop 0.6s ease-in-out infinite;
}

.ear-right {
    right: 0;
    animation: earhop 0.6s ease-in-out infinite 0.1s;
}

.band {
    position: absolute;
    width: 50px;
    height: 8px;
    background: #4CAF50;
    border-radius: 4px;
    top: 0;
    left: 10px;
}

@keyframes earhop {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.music-notes {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.note {
    font-size: 20px;
    animation: floatNotes 1s ease-in-out infinite;
}

.note:nth-child(1) {
    color: #FF6B6B;
    animation-delay: 0s;
}

.note:nth-child(2) {
    color: #4ECDC4;
    animation-delay: 0.2s;
}

.note:nth-child(3) {
    color: #FFD93D;
    animation-delay: 0.4s;
}

@keyframes floatNotes {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

/* Travel Animation */
.travel-animation {
    position: relative;
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.backpack {
    width: 30px;
    height: 40px;
    background: #FF6B6B;
    border-radius: 5px;
    position: relative;
    animation: bounce 2s ease-in-out infinite;
}

.backpack::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 5px;
    background: #8B4513;
    top: -5px;
    left: 5px;
    border-radius: 3px;
}

.bike {
    position: relative;
    width: 45px;
    height: 30px;
    animation: bikemove 2s ease-in-out infinite;
}

.wheel {
    position: absolute;
    border: 3px solid #333;
    border-radius: 50%;
    width: 25px;
    height: 25px;
}

.wheel-front {
    left: 0;
    top: 0;
    animation: spin 1s linear infinite;
}

.wheel-rear {
    right: 0;
    top: 0;
    animation: spin 1s linear infinite;
}

.frame {
    position: absolute;
    width: 30px;
    height: 2px;
    background: #333;
    top: 50%;
    left: 5px;
}

@keyframes bikemove {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(15px);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Bike Riding Animation */
.bike-riding-animation {
    position: relative;
    width: 120px;
    height: 80px;
    overflow: hidden;
}

.bicycle {
    position: relative;
    width: 80px;
    height: 40px;
    animation: bikeRide 1.5s ease-in-out infinite;
}

.bike-wheel {
    position: absolute;
    border: 3px solid #667eea;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    background: transparent;
    animation: wheelSpin 0.8s linear infinite;
}

.bike-wheel::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bike-wheel-front {
    right: 0;
    bottom: 0;
}

.bike-wheel-rear {
    left: 0;
    bottom: 0;
}

.bike-frame {
    position: absolute;
    width: 50px;
    height: 3px;
    background: #667eea;
    bottom: 14px;
    left: 14px;
    transform: rotate(-15deg);
}

.bike-handlebar {
    position: absolute;
    width: 20px;
    height: 3px;
    background: #667eea;
    right: 2px;
    bottom: 28px;
    border-radius: 2px;
}

.bike-seat {
    position: absolute;
    width: 15px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    left: 8px;
    bottom: 32px;
}

.rider {
    position: absolute;
    width: 12px;
    height: 20px;
    background: #764ba2;
    border-radius: 5px;
    left: 22px;
    bottom: 35px;
    animation: riderBob 0.75s ease-in-out infinite;
}

.rider::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #764ba2;
    border-radius: 50%;
    top: -8px;
    left: 1px;
}

.road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: #333;
    border-radius: 5px;
}

.road-line {
    position: absolute;
    width: 20px;
    height: 3px;
    background: #FFD89B;
    top: 50%;
    transform: translateY(-50%);
    animation: roadMove 0.5s linear infinite;
}

.road-line:nth-child(1) {
    left: 10px;
    animation-delay: 0s;
}

.road-line:nth-child(2) {
    left: 50px;
    animation-delay: 0.2s;
}

.road-line:nth-child(3) {
    left: 90px;
    animation-delay: 0.4s;
}

@keyframes bikeRide {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes wheelSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes riderBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes roadMove {
    from {
        transform: translateY(-50%) translateX(0);
    }

    to {
        transform: translateY(-50%) translateX(-30px);
    }
}

/* Bike Riding Card Styling */
.interest-card.bike-riding {
    border-top-color: #FF6B6B;
}

.interest-card.bike-riding:hover {
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.2);
}

/* Fashion Animation */
.fashion-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.cool-guy {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.sunglasses {
    position: absolute;
    width: 50px;
    height: 20px;
    top: 20px;
    left: 5px;
    animation: sunglassesRotate 2s ease-in-out infinite;
}

.sunglasses::before,
.sunglasses::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 3px solid #333;
    border-radius: 50%;
    top: 0;
}

.sunglasses::before {
    left: 0;
}

.sunglasses::after {
    right: 0;
}

.shirt {
    position: absolute;
    width: 50px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    top: 35px;
    left: 5px;
    animation: shirtShine 1.5s ease-in-out infinite;
}

@keyframes sunglassesRotate {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes shirtShine {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Food Animation */
.food-animation {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.curry,
.ramen {
    font-size: 50px;
    animation: foodBounce 1s ease-in-out infinite;
}

.curry {
    animation-delay: 0s;
}

.ramen {
    animation-delay: 0.3s;
}

@keyframes foodBounce {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.1) translateY(-10px);
    }
}

/* Project Category Container */
.project-navbar {
    display: flex;
    background-color: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
    position: relative;
}

/* Dropdown Container */
.dropdown-container {
    position: relative;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 10px;
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-container:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-container:hover .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-container:hover .dropdown-menu {
    display: block;
}

/* Dropdown Items */
.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    color: #333;
}

.dropdown-item.active {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}

.dropdown-container .project-nav-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom-color: transparent;
}

.project-nav-btn {
    flex: 1;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    min-width: 150px;
}

.project-nav-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.project-nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: white;
}

/* Projects Grid */
#projects-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Projects Item */
.project-item {
    background: white;
    border-left: 4px solid #667eea;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.project-item-content {
    flex-grow: 1;
}

.project-item-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.project-emoji {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.project-item-title-section {
    flex-grow: 1;
}

.project-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.project-item-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #667eea;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.project-item-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 15px;
    text-align: justify;
}

.project-item-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-item-arrow {
    display: flex;
    justify-content: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.scroll-arrow-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.scroll-arrow-small span {
    width: 20px;
    height: 20px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(-45deg);
    animation: scrollDown 1.5s infinite;
}

.scroll-arrow-small span:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrow-small span:nth-child(2) {
    animation-delay: 0.3s;
}

.scroll-arrow-small span:nth-child(3) {
    animation-delay: 0.6s;
}

/* Project Card */
.project-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
    position: relative;
}

.project-card::before {
    content: '▹';
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 60px;
    color: rgba(37, 99, 235, 0.05);
    opacity: 0.5;
    z-index: 0;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    border-left-color: #2563eb;
}

.project-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    position: relative;
    z-index: 1;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.project-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #667eea;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    width: fit-content;
}

.project-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    padding: 5px 12px;
    background: #f0f0f0;
    color: #2c3e50;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

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

.project-link {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-projects p {
    font-size: 18px;
}

/* Project Scroll Button */
.project-scroll-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0 8px 0;
    margin-top: 15px;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.project-scroll-btn:hover {
    background-color: rgba(102, 126, 234, 0.05);
    border-radius: 4px;
}

.project-scroll-btn .scroll-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.project-scroll-btn .scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-scroll-btn .scroll-arrow span {
    width: 16px;
    height: 16px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(-45deg);
    margin-top: -10px;
    animation: scrollDown 1.5s infinite;
}

.project-scroll-btn .scroll-arrow span:nth-child(1) {
    animation-delay: 0s;
}

.project-scroll-btn .scroll-arrow span:nth-child(2) {
    animation-delay: 0.3s;
}

.project-scroll-btn .scroll-arrow span:nth-child(3) {
    animation-delay: 0.6s;
}

/* Network Topologies Styling */
.topologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
    width: 100%;
}

.topology-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    cursor: pointer;
}

.topology-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.topology-image {
    width: 100%;
    height: 180px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topology-image:hover {
    background: #f0f0f0;
}

.topology-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.topology-info {
    padding: 24px;
    text-align: center;
}

.topology-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    font-family: 'Segoe UI', sans-serif;
}

.topology-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.topologies-heading {
    grid-column: 1 / -1;
    font-size: 24px;
    color: #333;
    margin-top: 35px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    font-weight: 600;
}

/* CTF Section Styling */
.info-item.ctf-item {
    border-left: 5px solid #00d97e;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.info-item.ctf-item::before {
    content: '🎯';
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 50px;
    color: rgba(0, 217, 126, 0.1);
    opacity: 0.8;
}

.info-item.ctf-item:hover {
    border-left-color: #00d97e;
    box-shadow: 0 8px 20px rgba(0, 217, 126, 0.2);
}

.ctf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ctf-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #00d97e 0%, #00b368 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 12px;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 217, 126, 0.4);
    }

    50% {
        opacity: 0.9;
        box-shadow: 0 0 0 6px rgba(0, 217, 126, 0);
    }
}

.ctf-content {
    margin-top: 10px;
}

.ctf-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: white;
    border: 2px solid #00d97e;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 217, 126, 0.15);
}

.ctf-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 126, 0.3);
    background: linear-gradient(135deg, #00d97e 0%, #00b368 100%);
}

.ctf-link:hover .ctf-username,
.ctf-link:hover .external-link-icon {
    color: white;
}

.ctf-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.ctf-username {
    font-size: 15px;
    font-weight: 600;
    color: #00a065;
    transition: color 0.3s ease;
}

.external-link-icon {
    color: #00a065;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

/* CTF Solutions Section */
.info-item.ctf-solutions-item {
    border-left: 5px solid #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
}

.info-item.ctf-solutions-item::before {
    content: '🔐';
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 50px;
    color: rgba(99, 102, 241, 0.1);
    opacity: 0.8;
}

.info-item.ctf-solutions-item:hover {
    border-left-color: #6366f1;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.ctf-solved-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.ctf-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 10px 0 15px 0;
    text-align: justify;
}

.ctf-solutions-link {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.ctf-solutions-link:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Modal for Topology Images */
.topology-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.topology-modal .modal-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.topology-modal #modal-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.topology-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.topology-modal .modal-close:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 768px) {

    /* Mobile Menu Toggle Button */
    .menu-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        width: 45px;
        height: 45px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        transition: all 0.3s ease;
    }

    .menu-toggle:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    .menu-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

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

    /* Sidebar - Hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        width: 85%;
        max-width: 320px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Ensure sidebar content is fully visible */
    .sidebar-header,
    .sidebar-nav,
    .sidebar-social,
    .ctf-btn-wrapper {
        max-width: 100%;
        overflow: visible;
    }

    /* Fix navigation link text overflow - allow wrapping for Japanese text */
    .nav-link {
        display: block;
        padding: 14px 18px;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 15px;
        border-left: 4px solid transparent;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
        line-height: 1.4;
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: #ffd89b;
    }

    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
        border-left-color: #ffd89b;
        font-weight: 600;
    }

    /* Overlay for mobile menu */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Main Content - Full width on mobile */
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        padding-top: 80px;
    }

    /* Tabs container full width */
    .tabs-container {
        width: 100%;
        max-width: 100%;
    }

    /* Tabs - Horizontal scroll */
    .tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .tabs::-webkit-scrollbar {
        height: 4px;
    }

    .tabs::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .tabs::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 2px;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 12px 15px;
        font-size: 14px;
        white-space: nowrap;
    }

    .tab-contents {
        padding: 15px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    /* Info Grid - Single column */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .info-item {
        padding: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        border-left-width: 3px;
    }

    .info-item strong {
        font-size: 12px;
    }

    .info-item span {
        font-size: 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Interests Grid - Single column */
    .interests-grid {
        grid-template-columns: 1fr;
    }

    /* Intro Card Responsive */
    .intro-content-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }

    .introduction-text {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .intro-with-photo {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        width: 100%;
    }

    .introduction-content {
        width: 100%;
        max-width: 100%;
        flex: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .intro-photo-right {
        width: 100%;
        max-width: 280px;
        align-self: center;
        transform: rotate(0deg);
        margin: 20px auto;
        padding: 10px 10px 20px 10px;
        order: -1;
        /* Photo on top for mobile */
    }

    .intro-photo-right img {
        width: 150px;
        height: 180px;
    }

    .signature {
        text-align: center;
    }

    .signature img {
        width: 140px;
    }

    /* Introduction section - wider on mobile */
    .introduction-section {
        padding: 20px;
        margin-top: 25px;
        width: 100%;
        max-width: 100%;
    }

    .introduction-content p {
        font-size: 14px;
        text-align: left;
        line-height: 1.8;
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
    }

    /* Projects Responsive */
    #projects-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Project Navbar Responsive */
    .project-navbar {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 10px 8px;
        gap: 5px;
        border-bottom: 2px solid #e0e0e0;
        position: relative;
        z-index: 100;
        overflow: visible;
    }

    .dropdown-container {
        position: relative;
        flex: 1;
        min-width: 150px;
    }

    .dropdown-container .project-nav-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        min-width: 100%;
    }

    /* Make dropdown appear in front, not expand navbar */
    .dropdown-toggle {
        background: #f9f9f9 !important;
        border: 1px solid #e0e0e0 !important;
    }

    .dropdown-toggle::after {
        content: '▼' !important;
        font-size: 10px;
        margin-left: 5px;
        display: inline-block !important;
    }

    .dropdown-container.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Dropdown Menu - Appears OVER content, not expanding navbar */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 180px;
        max-height: 200px;
        overflow-y: auto;
        background: white;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        border-radius: 8px;
        z-index: 9999;
        display: none;
        margin-top: 5px;
    }

    .dropdown-container.active .dropdown-menu {
        display: block;
    }

    .dropdown-container:hover .dropdown-menu {
        display: none;
    }

    .dropdown-container.active:hover .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 10px 12px;
        font-size: 12px;
        width: 100%;
        background: white;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
        cursor: pointer;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background-color: #f0f0f0;
    }

    .dropdown-item.active {
        background-color: rgba(102, 126, 234, 0.1);
        color: #667eea;
        font-weight: 600;
    }

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

    /* Topologies Responsive */
    .topologies-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .topology-card {
        border-radius: 8px;
    }

    .topology-image {
        height: 150px;
        padding: 12px;
    }

    .topology-info {
        padding: 15px;
    }

    .topology-name {
        font-size: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .topology-description {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .topologies-heading {
        font-size: 20px;
        margin-top: 25px;
        margin-bottom: 20px;
    }

    /* CTF Button */
    .ctf-btn-wrapper {
        padding: 10px 15px 20px;
    }

    .ctf-btn {
        padding: 12px;
    }

    .ctf-btn-title {
        font-size: 14px;
    }

    /* Skills Section */
    .skills-section {
        margin-bottom: 25px;
    }

    .tab-content h2 {
        font-size: 20px;
    }

    #skills h3 {
        font-size: 18px;
    }

    /* Page Header */
    .page-header {
        margin-bottom: 20px;
    }

    /* Introduction section */
    .introduction-section {
        padding: 20px;
        margin-top: 25px;
    }

    .introduction-section h2 {
        font-size: 20px;
    }

    .introduction-content p {
        font-size: 14px;
        text-align: left;
    }

    /* Social links in sidebar */
    .sidebar-social {
        padding: 15px;
        gap: 10px;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {

    /* Further refinements for very small screens */
    .menu-toggle {
        width: 40px;
        height: 40px;
        top: 10px;
        left: 10px;
    }

    .main-content {
        padding: 12px;
        padding-top: 70px;
        width: 100%;
        max-width: 100%;
    }

    /* Ensure content uses full width */
    .tabs-container {
        width: 100%;
        max-width: 100%;
    }

    .tab-contents {
        padding: 12px;
        width: 100%;
    }

    .sidebar {
        width: 85%;
        max-width: 320px;
    }

    .sidebar-header h2 {
        font-size: 20px;
    }

    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
    }

    .page-header {
        width: 100%;
    }

    .page-header h1 {
        font-size: 22px;
        width: 100%;
    }

    .tab-btn {
        padding: 6px 8px;
        font-size: 10px;
        min-width: 70px;
    }

    .info-grid {
        gap: 8px;
        width: 100%;
    }

    .info-item {
        padding: 8px;
        width: 100%;
        border-left-width: 2px;
    }

    .info-item strong {
        font-size: 9px;
    }

    .info-item span {
        font-size: 11px;
    }

    /* Intro section - wider on very small screens */
    .intro-content-wrapper {
        width: 100%;
    }

    .introduction-text {
        width: 100%;
    }

    .intro-with-photo {
        width: 100%;
    }

    .intro-photo-right {
        max-width: 250px;
    }

    .intro-photo-right img {
        width: 100px;
        height: 130px;
    }

    .signature img {
        width: 100px;
    }

    /* Project cards */
    .projects-grid {
        gap: 12px;
        width: 100%;
    }

    .project-card {
        border-radius: 6px;
    }

    .project-image {
        height: 80px;
        font-size: 32px;
    }

    .project-content {
        padding: 12px;
    }

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

    .project-description {
        font-size: 12px;
    }

    /* Topologies */
    .topologies-grid {
        gap: 10px;
    }

    .topology-image {
        height: 100px;
    }

    /* Modal */
    .topology-modal .modal-content {
        max-width: 95%;
    }

    .topology-modal #modal-caption {
        font-size: 14px;
    }

    /* Skills section */
    #skills .info-grid {
        padding: 12px;
        width: 100%;
    }

    /* Fix project navbar buttons for very small screens */
    .project-nav-btn {
        padding: 8px 10px;
        font-size: 11px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
    }

    .dropdown-container {
        flex: 1;
        min-width: 120px;
    }

    .dropdown-container .project-nav-btn {
        width: 100%;
        min-width: 100%;
    }

    .dropdown-menu {
        width: 160px;
    }

    .dropdown-item {
        padding: 8px 10px;
        font-size: 11px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-wrap: break-word;
    }

    /* Fix for sidebar CTF button on small screens */
    .ctf-btn {
        padding: 10px;
    }

    .ctf-btn-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .ctf-btn-subtitle {
        font-size: 9px;
    }

    /* Fix social links on very small screens */
    .sidebar-social {
        padding: 10px;
        gap: 8px;
    }

    .social-link {
        width: 32px;
        height: 32px;
    }

    /* Fix scroll indicator on mobile */
    .scroll-indicator {
        margin-top: 30px;
        padding: 15px 0;
    }

    /* Fix tabs on very small screens */
    .tabs {
        padding: 0 5px;
    }

    .tab-btn {
        min-width: 80px;
        padding: 8px 5px;
    }
}

/* Hide menu toggle on desktop */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* Print styles */
@media print {

    .sidebar,
    .menu-toggle,
    .sidebar-overlay {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .container {
        display: block;
    }
}