:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #000000;
    --accent-light: rgba(0, 0, 0, 0.03);
    --rect-color-1: rgba(0, 0, 0, 0.02);
    --rect-color-2: rgba(0, 0, 0, 0.04);
    --transition-speed: 0.6s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Geometric Patterns */
.geometric-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.rect {
    position: absolute;
    background-color: var(--rect-color-1);
    transform: rotate(45deg);
}

.rect-1 {
    width: 300px;
    height: 600px;
    top: -100px;
    left: -100px;
}

.rect-2 {
    width: 400px;
    height: 800px;
    top: 20%;
    right: -150px;
    background-color: var(--rect-color-2);
}

.rect-3 {
    width: 200px;
    height: 500px;
    bottom: -100px;
    left: 20%;
}

.rect-4 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 40%;
    border: 1px solid rgba(0,0,0,0.05);
    background: transparent;
}

.rect-5 {
    width: 100vw;
    height: 200px;
    bottom: 30%;
    left: -20%;
    transform: rotate(-10deg);
}

/* Typography & General */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.btn {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 700;
    transition: all 0.3s ease;
}

#edit-mode-btn {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

#edit-mode-btn.active {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
    margin-left: 10px;
}

.btn-outline {
    background-color: transparent;
    border: 1px dashed var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    width: 100%;
    margin-top: 2rem;
}

.btn-danger {
    background-color: #ff4757;
    color: white;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.hero-content {
    max-width: 1000px;
    width: 100%;
    position: relative;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.05);
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    border-top: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

.hero-content::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-bottom: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}

#profile-name {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

#profile-title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
}

#profile-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.hero-text-container {
    flex: 1;
}

.hero-image-container {
    position: relative;
    width: 300px; /* default size */
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 100%; /* controlled by inline style dynamically */
    height: auto;
    object-fit: cover;
    border-radius: 8px; /* default roundness */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.edit-profile-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    z-index: 10;
}

body.edit-mode .edit-profile-overlay {
    display: flex;
}

.edit-profile-overlay label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Slider Section */
#slider-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.slider-track-container {
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide-image {
    width: calc(100% / 3);
    flex: 0 0 calc(100% / 3);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    padding: 0 5px;
}

.slider-btn {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 10;
}

.slider-btn:hover {
    transform: scale(1.1);
    background-color: var(--text-primary);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--accent-color);
}

/* Timeline Section */
.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 2px;
}

.timeline {
    position: relative;
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: rgba(0,0,0,0.1);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6rem;
    position: relative;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    z-index: 10;
}

.timeline-content {
    width: 45%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--accent-light);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.timeline-item:hover .game-image {
    transform: scale(1.05);
}

.game-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 1px;
}

.game-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.game-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.game-reason-box {
    background-color: var(--accent-light);
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.game-reason-box h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.game-reason {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Edit Mode Styles */
body.edit-mode .editable-text {
    outline: 1px dashed rgba(0, 0, 0, 0.3);
    padding: 2px;
    cursor: text;
    transition: outline 0.2s;
}

body.edit-mode .editable-text:hover {
    outline: 1px solid var(--accent-color);
    background-color: rgba(0, 0, 0, 0.02);
}

body.edit-mode .editable-text:focus {
    outline: 2px solid var(--accent-color);
    background-color: var(--bg-color);
}

.edit-image-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

body.edit-mode .edit-image-overlay {
    display: flex;
}

.edit-image-url {
    width: 80%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid var(--accent-color);
    font-family: inherit;
}

/* Scroll Animation Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px;
    }
    .timeline-marker {
        left: 20px;
        top: 0;
        transform: translate(-50%, 0);
    }
    .timeline-content {
        width: 100%;
    }
    .hero-layout {
        flex-direction: column-reverse;
    }
    .hero-image-container {
        width: 100%;
        max-width: 300px;
    }
    #profile-name {
        font-size: 2.5rem;
    }
    .slide-image {
        width: 100%;
        flex: 0 0 100%;
    }
}
