/* Portfolios Page Specific Styles */

.portfolios-main {
    min-height: 100vh;
    padding: 2rem;
    padding-top: 6rem;
}

.portfolios-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Header Section */
.portfolios-header {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

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

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

/* Projects Section */
.projects-section {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.project-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

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

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

.project-info {
    flex: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.tag {
    background: var(--bg-primary);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-features h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    color: var(--text-secondary);
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.project-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow);
}

/* GitHubボタン専用スタイル（紫色から水色のグラデーション） */
.project-link[href*="github.com"] {
    background: linear-gradient(135deg, #9333EA, #00bcd4);
    position: relative;
    overflow: hidden;
}

.project-link[href*="github.com"]:hover {
    background: linear-gradient(135deg, #7c2dcc, #0097a7);
    box-shadow: 0 10px 20px rgba(147, 51, 234, 0.4);
    transform: translateY(-2px);
}

.project-link[href*="github.com"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(142, 36, 170, 0.3), transparent);
    animation: shimmer 0.6s ease-in-out;
}

.project-link[href*="github.com"]:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(142, 36, 170, 0.15), rgba(156, 39, 176, 0.15));
    pointer-events: none;
}

/* Websiteボタン専用スタイル（濃い紫色から水色のグラデーション） */
.project-link[href*="coffin399.github.io"],
.project-link[href*="website"],
.project-link[href*="demo"],
.project-link[href*="nonexistent-website-404"] {
    background: linear-gradient(135deg, #7C3AED, #00bcd4);
    position: relative;
    overflow: hidden;
}

.project-link[href*="coffin399.github.io"]:hover,
.project-link[href*="website"]:hover,
.project-link[href*="demo"]:hover,
.project-link[href*="nonexistent-website-404"]:hover {
    background: linear-gradient(135deg, #6d28d9, #0097a7);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.project-link[href*="coffin399.github.io"]:hover::before,
.project-link[href*="website"]:hover::before,
.project-link[href*="demo"]:hover::before,
.project-link[href*="nonexistent-website-404"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 0.6s ease-in-out;
}

.project-link[href*="coffin399.github.io"]:hover::after,
.project-link[href*="website"]:hover::after,
.project-link[href*="demo"]:hover::after,
.project-link[href*="nonexistent-website-404"]:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(142, 36, 170, 0.1), rgba(0, 188, 212, 0.1));
    pointer-events: none;
}

/* 3DCG Section */
.cg-section {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

.cg-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cg-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.cg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.cg-preview {
    position: relative;
    overflow: hidden;
}

.cg-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.cg-overlay {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.8), rgba(0, 151, 167, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    border-radius: 20px;
}

.cg-card:hover .cg-overlay {
    opacity: 1;
}

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

.cg-info {
    text-align: center;
    color: white;
    padding: 1rem;
}

.cg-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.youtube-link-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.youtube-link-hint i {
    font-size: 1.2rem;
    color: #ff0000;
}

.cg-card:hover .youtube-link-hint {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.cg-details {
    padding: 1.5rem;
}

.cg-details h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.cg-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

/* Tech Stack Section */
.tech-stack-section {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

.tech-category {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tech-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.tech-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tech-item:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    transform: translateY(-3px);
}

.tech-item i {
    font-size: 2rem;
    color: var(--accent-primary);
    transition: var(--transition);
}

.tech-item:hover i {
    color: white;
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .portfolios-main {
        padding: 1rem;
        padding-top: 5rem;
    }
    
    .portfolios-container {
        gap: 3rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .project-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .project-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .cg-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-category {
        padding: 1.5rem;
    }
    
    .tech-items {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .tech-item {
        padding: 0.8rem;
    }
    
    .tech-item i {
        font-size: 1.5rem;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
}

/* Ask DeepWikiボタン専用スタイル（薄紫色から水色のグラデーション） */
.project-link[href*="deepwiki.com"] {
    background: linear-gradient(135deg, #A78BFA, #00bcd4);
    position: relative;
    overflow: hidden;
}

.project-link[href*="deepwiki.com"]:hover {
    background: linear-gradient(135deg, #8b5cf6, #0097a7);
    box-shadow: 0 10px 20px rgba(167, 139, 250, 0.4);
    transform: translateY(-2px);
}

.project-link[href*="deepwiki.com"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
    animation: shimmer 0.6s ease-in-out;
}

.project-link[href*="deepwiki.com"]:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(139, 195, 74, 0.15));
    pointer-events: none;
}
