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

:root {
    --primary-color: #0057FF; /* Intelligent Blue */
    --secondary-color: #333333; /* Dark Gray */
    --dark-color: #1a1a1a;
    --light-color: #FDFDFD; /* Off-white */
    --text-color: #333333;
    --border-color: #EAEAEA;
    --accent-color: #0057FF;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%;
}

body {
    font-family: 'Lato', 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    background-color: var(--light-color);
    font-size: 1.6rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    cursor: none;
}

/* Custom Cursor */
.cursor-dot, .cursor-dot-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 9999;
}

@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-dot-outline {
        display: none !important;
    }
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-dot-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
}

/* Loading Screen */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading.loaded {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--primary-color);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(200%); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(253, 253, 253, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    position: static;
    text-decoration: none;
    color: var(--secondary-color);
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 600;
}

.menu-btn {
    display: none; /* Hiding for this concept */
}

.social-link {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    color: var(--secondary-color);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 999;
    transition: color 0.3s ease;
}
.social-link:hover {
    color: var(--primary-color);
}

/* About Section */
.about-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.about-description {
    margin-top: 3rem;
}

.about-text {
    font-size: 1.8rem;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* About Page */
.about-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 2rem 5rem;
}

.about-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Page */
.contact-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 2rem 5rem;
}

.contact-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Active navigation link */
.nav-link.active {
    color: var(--primary-color);
}

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

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav-list {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.header-nav-item {
    position: relative;
    z-index: 100;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dropdown-trigger:hover {
    background: rgba(87, 157, 255, 0.05);
}

.dropdown.open .dropdown-trigger {
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.8rem 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dropdown open state - controlled by JavaScript */
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0px);
}

.dropdown-item {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.dropdown-item:hover {
    background: rgba(87, 157, 255, 0.08);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Mobile Dropdown Styles */
@media (max-width: 768px) {
    .dropdown-menu {
        position: absolute;
        top: calc(100% + 5px);
        left: 50%;
        transform: translateX(-50%);
        width: 180px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 6px 32px rgba(0, 0, 0, 0.15);
        z-index: 10000;
    }
    
    .dropdown-trigger {
        font-size: 1rem;
        padding: 0.3rem 0.8rem;
    }
    
    .dropdown-item {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
        text-align: center;
        color: #333;
        white-space: nowrap;
    }
    
    .dropdown-item:hover {
        background: rgba(87, 157, 255, 0.08);
        color: var(--primary-color);
    }
    
    /* Ensure proper spacing in mobile header */
    .header-nav-item.dropdown {
        position: relative;
        z-index: 10000;
    }
    
}

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

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


/* Main Container */
.main-container {
    position: relative;
    width: 100%;
    background: var(--light-color);
}

/* Hero Section Containers */
.hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8vw;
}

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

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(4rem, 8vw, 9rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.hero-portfolio-text {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 2px;
    margin: 1rem 0;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-color);
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.8;
    margin: 0 auto;
}

/* Portfolio Container */
.portfolio-container {
    position: relative;
    width: 100%;
    background: var(--light-color);
    padding-top: 60px;
}

.portfolio-section {
    padding: 3rem 8vw 4rem;
}

.portfolio-section-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Legacy support - will be removed */
.scroll-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.scroll-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Slides */
.slide {
    height: 100vh;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8vw;
    position: relative;
}

/* 古いスライド用のスタイル（削除予定） */
.portfolio-grid-slide {
    padding-top: 12rem;
    padding-bottom: 4rem;
    box-sizing: border-box;
}

.slide__inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

/* Hero Slide */
.slide--first .slide__inner {
    text-align: left;
}

.slide__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(4rem, 8vw, 9rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.slide__portfolio-text {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 2px;
    margin: 1rem 0;
    opacity: 0.9;
}

.slide__subtitle {
    font-size: 2rem;
    color: var(--text-color);
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.8;
    margin: 0 auto;
    text-align: center;
}

.slide--first .slide__subtitle {
    margin: 0 auto;
}

/* Portfolio Section Title */
.portfolio-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem; /* Reduced margin */
    letter-spacing: 1px;
}

/* Portfolio Slides */
.portfolio-slide .slide__inner {
    flex-direction: row;
    gap: 6vw;
    text-align: left;
}

.portfolio-item {
    position: relative;
    width: 50vw;
    max-width: 700px;
    height: 60vh;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.portfolio-item:hover {
    border-color: var(--primary-color);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 87, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay span {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.portfolio-info {
    flex: 1;
    max-width: 400px;
}

.portfolio-info .slide__title {
    font-size: clamp(2.4rem, 4vw, 4rem);
    margin-bottom: 1.5rem;
}

.slide__project {
    font-size: 1.6rem;
    color: var(--text-color);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
}

/* Legacy Portfolio Grid Styles (will be removed) */
.portfolio-grid-slide .slide__inner {
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding-top: 2rem;
}

.portfolio-grid-wrapper {
    position: relative;
    width: 85vw;
    max-width: 1200px;
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
    justify-content: center;
    align-items: stretch;
}

/* hiddenクラスは常に非表示（最優先） */
.portfolio-grid-item.hidden {
    display: none !important;
}

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

/* もっと見るボタン */
.show-more-btn {
    flex: 0 0 100%; /* Flexboxで全幅に配置 */
    width: fit-content; /* ボタン自体は内容に合わせたサイズ */
    max-width: 300px; /* 最大幅を制限 */
    margin: 2rem auto 0; /* 水平中央揃え */
    padding: 1.2rem 3rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    text-align: center;
}

.show-more-btn.visible {
    display: block;
}

.show-more-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 87, 255, 0.2);
}

.show-more-btn.hidden {
    display: none;
}

.portfolio-grid-item {
    position: relative;
    flex: 0 0 auto;
    width: 350px;
    max-width: 400px;
    height: 25vh;
    min-height: 250px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #f8f9fa;
    /* タッチデバイス対応 */
    -webkit-tap-highlight-color: rgba(0, 87, 255, 0.2);
    touch-action: manipulation;
}

.portfolio-grid-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 87, 255, 0.1);
}

.portfolio-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-grid-item:hover img {
    transform: scale(1.05);
}

.portfolio-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    color: white;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.grid-project {
    font-size: 1.2rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.grid-title {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    display: block;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.portfolio-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed var(--border-color);
    cursor: default;
    padding: 1rem;
    box-sizing: border-box;
}

.portfolio-placeholder:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

.placeholder-text {
    font-size: 1.6rem;
    color: #999;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.placeholder-subtext {
    font-size: 1.2rem;
    color: #bbb;
    margin-top: 0.5rem;
    display: block;
}

/* Tag Styles */
.grid-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 123, 255, 0.9);
    border: 1px solid rgba(0, 123, 255, 1);
    border-radius: 20px;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.portfolio-placeholder .grid-tags {
    margin-top: 1.5rem;
}

.portfolio-placeholder .tag {
    background: rgba(0, 87, 255, 0.1);
    border: 1px solid rgba(0, 87, 255, 0.2);
    color: var(--primary-color);
}

/* Tag Color System */
.tag.tech {
    background: #3b82f6;
    border-color: #2563eb;
}

.tag.industry {
    background: #10b981;
    border-color: #059669;
}

.tag.function {
    background: #8b5cf6;
    border-color: #7c3aed;
}

.tag.feature {
    background: #f59e0b;
    border-color: #d97706;
}

.tag.type {
    background: #ec4899;
    border-color: #db2777;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.filter-tag {
    font-size: 1.2rem;
    padding: 0.8rem 1.6rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    /* タッチデバイス対応 */
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(0, 87, 255, 0.3);
    touch-action: manipulation;
}

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

.filter-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}

.portfolio-grid-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-grid-item.hidden {
    display: none;
}

/* Contact Slide */
.contact-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-content .slide__title {
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--light-color);
    background-color: var(--primary-color);
    text-decoration: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 87, 255, 0.2);
}

.contact-link-arrow {
    transition: transform 0.3s ease;
}

.contact-link:hover .contact-link-arrow {
    transform: translateX(5px);
}

.contact-divider {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin: 4rem auto;
}

.contact-subtitle {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    text-align: center;
    width: 100%;
}

.contact-email {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-email:hover {
    opacity: 0.7;
}

/* Scrollbar */
.scrollbar {
    position: fixed;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 250px;
    background: var(--border-color);
    border-radius: 1.5px;
    z-index: 100;
}

.scrollbar__handle {
    width: 100%;
    height: 0; /* Initially 0, will be updated by JS */
    background: var(--primary-color);
    border-radius: 1.5px;
    position: absolute;
    top: 0;
    transition: height 1s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.5s ease;
}

.scrollbar__handle--end {
    background-color: #28a745; /* Green color for completion */
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-slide .slide__inner {
        flex-direction: column;
        gap: 3vh;
        text-align: center;
        justify-content: center;
        align-items: center;
    }
    .portfolio-item {
        width: 80vw;
        height: 45vh;
    }
    .portfolio-info {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    .cursor-dot, .cursor-dot-outline {
        display: none;
    }
    /* もっと見るボタンのモバイル調整 */
    .show-more-btn {
        font-size: 1.4rem;
        padding: 1rem 2.5rem;
    }
    .header {
        padding: 1.5rem 2rem;
        flex-direction: column;
        gap: 1.5rem;
        position: fixed;
        background: rgba(253, 253, 253, 0.95);
        backdrop-filter: blur(10px);
    }

    .hero-container {
        padding-top: 12rem;
        padding-left: 4vw;
        padding-right: 4vw;
    }

    .hero-title {
        font-size: clamp(3rem, 12vw, 6rem);
        margin-bottom: 1.5rem;
    }

    .hero-portfolio-text {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

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

    .portfolio-container {
        padding-top: 2rem;
    }
    
    .header-nav {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .header-nav-list {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 0.8rem 1rem;
        border-radius: 4px;
        background: rgba(0, 87, 255, 0.05);
        border: 1px solid rgba(0, 87, 255, 0.1);
        transition: all 0.3s ease;
        /* タッチデバイス対応 */
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 87, 255, 0.3);
        touch-action: manipulation;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link:hover, .nav-link.active {
        background: rgba(0, 87, 255, 0.1);
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .logo {
        order: 1;
        font-size: 1.8rem;
    }
    
    .social-link {
        order: 3;
        position: static;
        margin-top: 1rem;
        font-size: 1.2rem;
    }
    
    .about-text {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .about-page {
        padding: 12rem 2rem 5rem;
        min-height: 100vh;
    }
    
    .contact-page {
        padding: 12rem 2rem 5rem;
        min-height: 100vh;
    }
    
    .main-container {
        padding-top: 12rem;
    }
    
    /* Maintain smooth scroll on mobile */
    
    .slide {
        padding: 2rem 1rem;
        min-height: calc(100vh - 12rem);
    }
    
    /* 新しいポートフォリオセクション */
    .portfolio-container {
        padding-top: 2rem; /* Reduced for mobile */
    }
    
    .portfolio-section {
        padding: 1rem 4vw 3rem;
        min-height: auto;
    }
    
    .portfolio-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    
    /* 古いスライド用（削除予定） */
    .portfolio-grid-slide {
        padding-top: 14rem;
        padding-bottom: 5rem;
    }
    
    .portfolio-grid-slide .slide__inner {
        padding-top: 1rem;
    }
    
    .portfolio-section-title {
        font-size: 1.8rem;
        margin-top: 0.5rem;
        margin-bottom: 2rem;
        letter-spacing: 0.5px;
    }
    .social-link {
        bottom: 2rem;
        right: 2rem;
    }
    .slide {
        padding: 0 5vw;
        height: 100vh;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .slide__inner {
        height: auto;
        justify-content: center;
        align-items: center;
    }
    .slide__title {
        font-size: clamp(2.5rem, 12vw, 4rem);
        margin-bottom: 1.5rem;
    }
    .slide__portfolio-text {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .slide__subtitle {
        font-size: 1.4rem;
        line-height: 1.5;
    }
    .scrollbar {
        right: 1rem;
        height: 150px;
        width: 2px;
    }
    .portfolio-item {
        width: 90vw;
        height: 40vh;
        max-width: none;
    }
    .portfolio-info h3 {
        font-size: 2rem;
    }
    .portfolio-info p {
        font-size: 1.4rem;
    }
    .portfolio-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 95vw;
        padding: 0 1rem;
    }
    .portfolio-grid-wrapper {
        width: 95vw;
    }
    .portfolio-grid-item {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        height: 30vh;
        min-height: 180px;
        border-radius: 8px;
    }
    .portfolio-grid-overlay {
        padding: 1rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }
    .grid-project {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    .grid-title {
        font-size: 1.2rem;
        line-height: 1.2;
    }
    .placeholder-text {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .placeholder-subtext {
        font-size: 0.9rem;
        margin-top: 0.4rem;
    }
    
    /* タブレット用プレースホルダー調整 */
    .portfolio-placeholder {
        padding: 0.8rem;
        border-width: 1.5px;
    }
    
    .portfolio-placeholder .grid-tags {
        margin-top: 1rem;
        gap: 0.3rem;
    }
    .contact-content {
        padding: 0 2rem;
    }
    .contact-link {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    .contact-email {
        font-size: 1.8rem;
    }
}

/* Additional mobile styles for very small screens */
@media (max-width: 600px) {
    .header {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .header-nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.6rem 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .portfolio-section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .slide__title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .slide__portfolio-text {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
    }
    
    .about-page, .contact-page {
        padding: 10rem 1.5rem 4rem;
    }
    
    .main-container {
        padding-top: 10rem;
    }
}

@media (max-width: 480px) {
    .slide {
        padding: 0 4vw;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .portfolio-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 95vw;
        padding: 0 0.5rem;
    }
    
    .portfolio-grid-item {
        flex: 0 0 auto;
        height: 25vh;
        min-height: 200px;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    
    .portfolio-grid-overlay {
        padding: 0.5rem;
    }
    
    .grid-project {
        font-size: 0.6rem;
    }
    
    .grid-title {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .grid-tags {
        gap: 0.2rem;
        margin-top: 0.3rem;
    }
    
    .tag {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
        margin: 1px;
    }
    
    .filter-tags {
        position: relative;
        gap: 0.4rem;
        margin-bottom: 2rem;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.5rem 1rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* スクロールインジケーター */
    .filter-tags::before,
    .filter-tags::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 2;
    }
    
    .filter-tags::before {
        left: 0;
        background: linear-gradient(to right, var(--light-color) 0%, var(--light-color) 50%, transparent 100%);
    }
    
    .filter-tags::after {
        right: 0;
        background: linear-gradient(to left, var(--light-color) 0%, var(--light-color) 50%, transparent 100%);
    }
    
    .filter-tags::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 36px;
        border-width: 1px;
        min-width: fit-content;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* スクロールインジケーターのスマホ対応 */
    .filter-tags::before,
    .filter-tags::after {
        width: 10px;
    }
    
    /* Scroll indicators for mobile carousel */
    .portfolio-scroll-indicators {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 15px;
    }
    
    .scroll-indicator-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        transition: all 0.3s ease;
    }
    
    .scroll-indicator-dot.active {
        background: var(--primary-color);
        transform: scale(1.2);
    }
    .portfolio-slide .slide__inner {
        height: auto;
        justify-content: center;
        gap: 2vh;
    }
    .slide__title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    .slide__subtitle {
        font-size: 1.2rem;
    }
    .portfolio-item {
        height: 35vh;
    }
    .portfolio-info h3 {
        font-size: 1.8rem;
    }
    .portfolio-info p {
        font-size: 1.3rem;
    }
    .portfolio-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        width: 98vw;
    }
    
    .portfolio-grid-item {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        height: 25vh;
        min-height: 200px;
        max-height: 300px;
    }
    .portfolio-grid-overlay {
        padding: 1rem;
    }
    .grid-project {
        font-size: 0.8rem;
    }
    .grid-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .placeholder-text {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .placeholder-subtext {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }
    
    /* プレースホルダーのタグサイズ調整 */
    .portfolio-placeholder .tag {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }
    
    /* プレースホルダーのパディング調整 */
    .portfolio-placeholder {
        padding: 0.5rem;
        border-width: 1px;
    }
    
    .portfolio-placeholder .grid-tags {
        margin-top: 0.8rem;
        gap: 0.2rem;
    }
    
    .contact-link {
        font-size: 1.4rem;
        padding: 1rem 2rem;
        border-radius: 8px;
        background: var(--primary-color);
        color: var(--light-color);
        border: 1px solid var(--primary-color);
        margin: 1.5rem 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 200px;
        transition: all 0.3s ease;
    }
    
    .contact-link:hover {
        background: var(--secondary-color);
        border-color: var(--secondary-color);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 87, 255, 0.3);
    }
    
    .contact-email {
        font-size: 1.4rem;
        padding: 1rem;
        background: rgba(0, 87, 255, 0.05);
        border-radius: 8px;
        word-break: break-all;
    }
    .contact-email {
        font-size: 1.6rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    animation: fadeInUp 2s ease-out;
}

.scroll-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    letter-spacing: 0.1em;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: var(--text-color);
    position: relative;
    opacity: 0.7;
    animation: scrollPulse 2s infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid var(--text-color);
    opacity: 0.7;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Others Page Specific Styles */
.others-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003dcc 100%);
    color: white;
}

.others-hero .hero-title {
    color: white;
}

.others-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.others-hero .hero-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.4rem;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.others-grid {
    min-height: 60vh;
}

.others-cta {
    text-align: center;
    margin-top: 6rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
}

.cta-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 87, 255, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 87, 255, 0.3);
    background: #0047d1;
}

/* Grid Author Style */
.grid-author {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile responsive for scroll indicator */
@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 15vh;
    }
    .scroll-text {
        font-size: 1rem;
    }
    .scroll-arrow {
        height: 20px;
    }
    
    .others-hero .hero-description {
        font-size: 1.2rem;
    }
    
    .others-cta {
        margin-top: 4rem;
        padding: 3rem 1.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-text {
        font-size: 1.4rem;
    }
}
