/* css/about.css */

/* Hero Section Styles (Shared across sub-pages) */
.about-hero {
    padding: 180px 5vw 80px;
    position: relative;
    border-bottom: 1px solid var(--border);
    margin-bottom: 80px;
}

.about-title {
    font-size: clamp(2.5rem, 10vw, 6rem);
    font-weight: 500;
    font-family: 'Outfit', 'Zen Kaku Gothic New', sans-serif;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* Shared Intro Section Styles (Matching Service page) */
.about-intro, .service-intro, .team-intro, .works-intro {
    max-width: 800px;
    margin: 4rem 0;
}

.about-intro-title, .service-intro-title, .team-intro-title, .works-intro-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: var(--text-main);
}

.about-intro-text, .service-intro-text, .team-intro-text, .works-intro-text {
    line-height: 2;
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 2rem;
}

/* Sections */
.about-section {
    margin-bottom: 120px;
}

.section-heading {
    font-family: 'Outfit';
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.section-heading::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--border);
}

/* Layout Grids */
.profile-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    align-items: start;
}

/* History Timeline Styles */
.history-timeline {
    position: relative;
    padding-left: 2.5rem;
    margin-top: 4rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--border) 0%, var(--border) 100%);
    opacity: 0.5;
}

.history-item {
    position: relative;
    margin-bottom: 5rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 8px;
    width: 11px;
    height: 11px;
    background: var(--bg-darker);
    border: 2px solid var(--text-main);
    border-radius: 50%;
    z-index: 2;
    transition: background 0.3s, transform 0.3s;
}

.history-item:hover::before {
    background: var(--text-main);
    transform: scale(1.2);
}

.history-year {
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.history-desc {
    font-size: 15px;
    line-height: 2.2; /* 少し広げて読みやすく */
    color: var(--text-muted);
}

/* Skill Tags */
.history-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.skill-tag {
    font-family: 'Outfit';
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.history-item:hover .skill-tag {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

/* Route C Specific Overrides */
html.route-c .skill-tag {
    background: var(--theme-accent);
    color: #fff;
    border-color: var(--theme-accent);
}

/* Redaction Gimmick Styles */
.redacted {
    display: inline;
    color: transparent !important;
    background-color: var(--text-main);
    padding: 2px 4px;
    border-radius: 2px;
    user-select: none;
    position: relative;
    cursor: default;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Theme-based Redaction Marker Colors */
body {
    --redacted-marker-color: rgba(86, 186, 140, 0.8); /* Top-A Custom Green (高不透明度) */
}
body.top-b {
    --redacted-marker-color: rgba(195, 255, 0, 0.4); /* Black x Green theme (黄緑系) */
}
body.top-c {
    --redacted-marker-color: rgba(255, 32, 64, 0.4); /* Black x Red theme (赤系) */
}

@keyframes decrypt-flash-and-mark {
    0% { background-color: var(--text-main); color: transparent; background-image: none; text-shadow: none; }
    15% { background-color: #fff; color: transparent; background-image: none; text-shadow: none; }
    30% { background-color: transparent; color: #fff; background-image: none; text-shadow: 0 0 15px #fff; }
    40% { background-color: transparent; color: var(--text-main); background-image: linear-gradient(transparent 60%, var(--redacted-marker-color) 60%); background-size: 0% 100%; text-shadow: none; }
    100% { background-color: transparent; color: var(--text-main); background-image: linear-gradient(transparent 60%, var(--redacted-marker-color) 60%); background-size: 100% 100%; text-shadow: none; }
}

body.decrypted .redacted {
    animation: decrypt-flash-and-mark 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: left center;
    color: var(--text-main) !important;
    user-select: text;
}

/* Floating Decrypt Popup */
.decrypt-popup {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 10000;
    width: 380px;
    max-width: calc(100vw - 40px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.decrypt-popup.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.decrypt-form {
    display: flex;
    gap: 0.5rem;
}

.decrypt-input {
    flex-grow: 1;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: 'Outfit', monospace;
    font-size: 16px; /* Avoid iOS Safari auto-zoom (requires 16px+) */
    outline: none;
    transition: border-color 0.3s;
    border-radius: 4px;
}

.decrypt-input:focus {
    border-color: var(--text-main);
}

.decrypt-btn {
    padding: 0.75rem 1.5rem;
    background: var(--text-main);
    color: var(--bg-white);
    border: none;
    font-family: 'Outfit';
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.3s;
    border-radius: 4px;
}

.decrypt-btn:hover {
    opacity: 0.8;
}

/* YouTube Modal Overlay */
.youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.youtube-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.youtube-modal-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    z-index: 2;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.youtube-modal.hidden .youtube-modal-content {
    transform: scale(0.95);
}
.youtube-modal-content .video-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}
.youtube-modal-content iframe {
    width: 100%;
    height: 100%;
}
.close-youtube-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}
.close-youtube-btn:hover {
    transform: scale(1.1);
}
.youtube-popup-trigger:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .about-hero {
        padding: 120px 32px 60px;
    }
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .decrypt-popup {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
    }
    .history-timeline {
        padding-left: 2rem;
    }
    .history-item::before {
        left: -2rem;
    }
    .section-heading {
        font-size: 1.8rem;
        gap: 1rem;
    }
}
