/* General layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    /* Dark theme colors */
    --dark-primary-color: #abb8c3;
    --dark-background-color: #1a1a1a;
    --dark-accent-color: #00e5ff;
    /* Light theme colors (cloudy rainy afternoon) */
    --light-primary-color: #3a506b;
    --light-background-color: #e6f1ff;
    --light-accent-color: #4d96ff;
    --light-rain-color: rgba(58, 80, 107, 0.35);
    /* Common variables */
    --font-family: 'Courier New', Courier, monospace;
    --primary-color: var(--dark-primary-color);
    --background-color: var(--dark-background-color);
    --accent-color: #5ecbfa; /* Softer blue for UI elements */
    --rain-color: rgba(174,194,224,0.2);
    --menu-bg-color: rgba(26, 26, 26, 0.85);
    --rain-controls-bg: rgba(26, 26, 26, 0.7);
    --rain-controls-border: rgba(171, 184, 195, 0.2);
    --param-btn-bg: rgba(171, 184, 195, 0.1);
    --param-btn-border: rgba(171, 184, 195, 0.3);
    --section-border-color: rgba(171, 184, 195, 0.15); /* New variable */
}
body {
    background-color: var(--background-color);
    color: var(--primary-color);
    font-family: var(--font-family);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    min-height: 100vh;
}
body.light-theme {
    --primary-color: var(--light-primary-color);
    --background-color: var(--light-background-color);
    --accent-color: var(--light-accent-color);
    --rain-color: var(--light-rain-color);
    --menu-bg-color: rgba(230, 241, 255, 0.85);
    --rain-controls-bg: rgba(230, 241, 255, 0.7);
    --rain-controls-border: rgba(58, 80, 107, 0.2);
    --param-btn-bg: rgba(58, 80, 107, 0.1);
    --param-btn-border: rgba(58, 80, 107, 0.3);
    --section-border-color: rgba(58, 80, 107, 0.15); /* New variable for light theme */
}

/* Layout and section styles */
.landing-screen {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.content-wrapper {
    z-index: 2;
    padding: 20px;
    transition: opacity 0.3s ease-out;
}
.typing-container {
    font-size: 2.5em;
    margin-bottom: 20px;
    height: 4rem;
}
.typing-cursor {
    animation: blink 1s step-end infinite;
}
#typing-text .highlight {
    color: var(--accent-color);
    text-shadow: 0 0 3px var(--accent-color);
}
@keyframes blink {
    from, to { color: transparent; }
    50% { color: var(--accent-color); }
}
.about-me {
    max-width: 600px;
    margin: 40px auto 40px;
    font-size: 1.25em;
    line-height: 1.7;
    background: rgba(171, 184, 195, 0.08);
    padding: 32px 32px 28px 32px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    text-align: center;
    position: relative;
    transition: background 0.3s, box-shadow 0.3s;
}
.about-me .highlight {
    color: var(--accent-color);
    font-weight: bold;
    text-shadow: none;
}
.social-media {
    margin: 30px 0;
}
.social-media a {
    margin: 0 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}
.social-media a:hover {
    transform: scale(1.2);
}
.social-media a:hover svg {
    fill: var(--accent-color);
}
.social-media svg {
    width: 30px;
    height: 30px;
    fill: var(--primary-color);
    transition: fill 0.3s ease;
}
.menu {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.menu-button {
    font-family: var(--font-family);
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--primary-color);
    padding: 16px 20px;
    margin: 8px;
    cursor: pointer;
    font-size: 1.25em;
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 160px; /* Centering fix */
    text-align: center; /* Centering fix */
}
.menu-button:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.scroll-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease-out;
}
.scroll-arrow span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    transform: rotate(45deg);
    margin-top: -10px;
}
.scroll-arrow span:nth-child(1) { opacity: 0.4; }
.scroll-arrow span:nth-child(2) { margin-top: -15px; opacity: 0.7; }
.scroll-arrow span:nth-child(3) { margin-top: -15px; opacity: 1; }
.main-content { padding: 100px 20px; }
section { 
    padding: 60px 0; 
    border-top: 1px solid var(--section-border-color); /* Corrected: Using variable */
}

/* Reduce spacing below the last section (Contact) before the footer */
.main-content section:last-of-type {
    padding-bottom: 1px;
    margin-bottom: 0;
}

h2 {
    position: relative;
    text-align: center;
    font-size: 2em;
    margin-bottom: 60px;
    padding-bottom: 20px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.no-underline::after {
    display: none !important;
}

.fixed-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 56px;
    position: relative;
}
.fixed-menu {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--menu-bg-color);
    backdrop-filter: blur(8px); /* Modern glass effect */
    padding: 0;
    z-index: 1000;
    text-align: center;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Softer shadow */
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    min-height: 0;
    box-sizing: border-box;
}
.fixed-menu.visible {
    opacity: 1;
    transform: translateY(0);
}
.fixed-menu .fixed-left {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 32px;
    flex: 0 0 auto;
    height: 100%;
    margin-bottom: 0;
}
.fixed-menu .nickname {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.25em;
    letter-spacing: 0.03em;
    margin-right: 8px;
    text-shadow: 0 0 3px var(--accent-color, #00e5ff);
    line-height: 1;
    text-decoration: none;
}
.fixed-menu .separator {
    width: 2px;
    height: 24px;
    background: var(--accent-color);
    opacity: 0.25;
    margin: 0 4px;
    border-radius: 2px;
}
.fixed-menu .fixed-socials {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    margin-left: 4px;
    position: relative;
    top: 1px;
}
.fixed-menu .fixed-socials a svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    transition: fill 0.3s;
}
.fixed-menu .fixed-socials a:hover svg {
    fill: var(--accent-color);
}
.fixed-menu .fixed-center {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 12px;
    margin: 0;
    z-index: 1;
}
.fixed-menu .menu-button {
    margin: 0 8px;
    font-size: 1.08em;
    padding: 8px 18px;
    height: 38px;
    line-height: 1;
    min-width: 120px;
}
canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Theme and rain controls */
.panel-toggle-btn {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 1100;
    background: var(--menu-bg-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    cursor: pointer;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border 0.3s, transform 0.3s cubic-bezier(.4,0,.2,1);
    outline: none;
}
.panel-toggle-btn.open {
    background: var(--accent-color);
    color: var(--background-color);
    border-color: var(--background-color);
    transform: rotate(90deg);
}
.panel-toggle-btn:not(.open) {
    background: var(--menu-bg-color) !important;
    color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    transform: none;
}
.panel-toggle-btn:not(.open):hover, .panel-toggle-btn:not(.open):focus {
    background: var(--accent-color);
    color: var(--background-color);
    border-color: var(--background-color);
}
.theme-controls {
    position: fixed;
    top: 80px;
    right: 22px;
    z-index: 1099;
    min-width: 180px;
    max-width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    background: var(--rain-controls-bg);
    border-radius: 16px;
    border: 1.5px solid var(--rain-controls-border);
    padding: 18px 14px 12px 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-32px) scale(0.97);
    transition: opacity 0.55s cubic-bezier(.4,2,.6,1), transform 0.55s cubic-bezier(.4,2,.6,1);
    gap: 10px;
}
.theme-controls.open {
    display: flex !important;
    flex-direction: column;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.theme-controls.hidden {
    display: none !important;
}
.theme-controls .control-group,
.theme-controls .rain-param {
    margin-bottom: 8px;
}
.theme-controls .control-group:last-child,
.theme-controls .rain-param:last-child {
    margin-bottom: 0;
}
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #ccc;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-color);
}
input:checked + .slider:before {
    transform: translateX(24px);
}
.slider-label {
    font-size: 0.9em;
    color: var(--primary-color);
    white-space: nowrap;
}
.rain-param {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.param-label {
    font-size: 0.8em;
    opacity: 0.8;
}
.param-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}
.param-btn {
    background: var(--param-btn-bg);
    border: 1px solid var(--param-btn-border);
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9em;
    transition: all 0.2s;
}
.param-btn:hover {
    background: rgba(58, 80, 107, 0.2);
    border-color: var(--accent-color);
}
.param-value {
    min-width: 30px;
    text-align: center;
    font-size: 0.9em;
}
.theme-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.theme-icon {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}
.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.theme-toggle-container i.active {
    color: var(--accent-color);
}
.nickname-tip {
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-bottom: 6px;
    transform: translateX(-50%);
    background: var(--menu-bg-color);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1002;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.nickname-highlight {
    color: var(--accent-color);
    font-weight: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    position: relative;
}
.theme-controls.faded {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-40px) scale(0.98);
}

html {
    scroll-behavior: smooth;
}

/* Placeholder card styles */
.placeholder-card {
    width: 100%;
    padding: 30px;
    background: var(--param-btn-bg);
    border: 1px solid var(--rain-controls-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1em;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.placeholder-card:hover {
    opacity: 1;
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.social-media a svg,
.fixed-menu .fixed-socials a svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
    transition: fill 0.3s;
    display: inline-block;
    vertical-align: middle;
}
.social-media a:hover svg,
.fixed-menu .fixed-socials a:hover svg {
    fill: var(--accent-color);
}
.social-media a[aria-label="Telegram"] svg,
.fixed-menu .fixed-socials a[aria-label="Telegram"] svg {
    width: 32px;
    height: 32px;
}

.learn-more-flex {
    display: flex;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}
.learn-more-snapshot {
    background: rgba(171, 184, 195, 0.10);
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 32px 28px 28px 28px;
    min-width: 260px;
    max-width: 320px;
    flex: 1 1 260px;
    margin-bottom: 24px;
}
.learn-more-snapshot h3 {
    font-size: 1.25em;
    margin-bottom: 18px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.learn-more-snapshot ul {
    list-style: none;
    padding: 0;
}
.learn-more-snapshot li {
    font-size: 1.08em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}
.learn-more-snapshot li:last-child {
    margin-bottom: 0;
}
.learn-more-main {
    flex: 2 1 340px;
    font-size: 1.15em;
    line-height: 1.8;
    background: rgba(171, 184, 195, 0.06);
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    color: var(--primary-color);
    min-width: 280px;
    max-width: 540px;
}
#learn-more h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 60px;
    padding-bottom: 20px;
    color: var(--primary-color); /* Match Contact heading gray */
    position: relative;
    display: block;
    letter-spacing: 0.5px;
}
#learn-more h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}
.learn-more-timeline.minimalistic {
    display: flex;
    flex-direction: column;
    gap: 36px;
    max-width: 950px; /* wider */
    margin: 0 auto;
    position: relative;
}
.timeline-card.minimalistic {
    background: rgba(171, 184, 195, 0.08);
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 28px 48px 24px 48px; /* wider */
    min-height: 60px;
    display: flex;
    align-items: flex-start;
    position: relative;
    max-width: 100%;
}
.timeline-card.minimalistic .timeline-dot {
    display: block;
    position: absolute;
    left: 18px;
    top: 24px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    z-index: 2;
}
.timeline-card.minimalistic .timeline-pipe {
    display: block;
    position: absolute;
    left: 22px;
    top: 34px;
    width: 2px;
    height: calc(100% - 38px);
    background: var(--accent-color);
    opacity: 0.18;
    border-radius: 1px;
    z-index: 1;
}
.timeline-card.minimalistic .timeline-content {
    flex: 1;
    color: var(--primary-color);
    font-size: 1.13em;
    line-height: 1.8;
    margin-left: 36px;
    max-width: 100%;
}
.timeline-card.minimalistic.compact {
    padding: 16px 32px 14px 32px;
}
.timeline-card.minimalistic.compact .timeline-content {
    font-size: 1em;
    line-height: 1.5;
    margin-left: 23px;
}
.timeline-label {
    font-weight: normal;
    color: var(--accent-color);
    margin-bottom: 2px;
    font-size: 1.05em;
    letter-spacing: 0.5px;
}
.timeline-card.minimalistic.compact .timeline-label {
    margin-left: -28px;
}
.snapshot-list {
    list-style: disc inside;
    padding-left: 0;
    margin: 0 0 2px 0;
    color: var(--primary-color);
    font-size: 0.98em;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.snapshot-list li {
    margin-left: 0;
    padding-left: 0;
    line-height: 1.4;
}
.breakcore-link {
    color: inherit;
    text-decoration: underline;
    font-weight: normal;
    transition: none;
}
@media (max-width: 900px) {
    .learn-more-timeline.minimalistic {
        max-width: 98vw;
        gap: 22px;
    }
    .timeline-card.minimalistic {
        padding: 20px 12px 16px 12px;
    }
    .timeline-card.minimalistic .timeline-content {
        margin-left: 24px;
    }
    .timeline-card.minimalistic.compact {
        padding: 12px 8px 10px 8px;
    }
    .timeline-card.minimalistic.compact .timeline-content {
        margin-left: 18px;
    }
}

@media (max-width: 900px) {
    .learn-more-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .learn-more-main, .learn-more-snapshot {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .landing-screen {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .content-wrapper {
        padding: 10px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .typing-container {
        font-size: 1.1em;
        margin-bottom: 36px;
        min-height: unset;
        height: auto;
        position: static;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.15;
    }
    .about-me {
        padding: 18px 10px 16px 10px;
        font-size: 1em;
        margin: 0 0 24px 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .main-content {
        padding: 60px 10px;
    }
    .theme-controls {
        top: 10px;
        right: 10px;
        padding: 8px;
        gap: 8px;
    }
    .menu {
        flex-direction: column;
        margin-top: 20px;
    }
    .menu-button {
        width: 100%;
        margin: 8px 0;
        font-size: 1.15em;
        padding: 14px 0;
        min-width: unset; /* Remove min-width on mobile */
    }
    .scroll-arrow {
        bottom: 10px;
    }
    .fixed-menu .fixed-center {
        display: none; /* Hide center menu on mobile */
    }
    .fixed-menu .fixed-left {
        margin-left: 16px;
    }
    .fixed-menu {
        justify-content: flex-start;
    }
}
.theme-toggle-container, .rain-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
}
.theme-icon, .rain-icon {
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: color 0.3s;
    width: 1.6em;
    height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-icon.active, .rain-icon.active {
    color: var(--accent-color);
}
.theme-icon.inactive, .rain-icon.inactive {
    color: #888;
    opacity: 0.7;
}
.rain-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
}
#moon-icon {
    margin-left: -4px;
    margin-top: 3px;
}
#rain-on-icon {
    margin-top: 3px;
}
#rain-off-icon {
    margin-top: 3px;
}
.timeline-card.accent-border {
    border-left: 4px solid var(--accent-color);
    background-clip: padding-box;
    /* Optionally, add a little left padding for text separation */
    padding-left: 36px;
}
.timeline-card.accent-border .timeline-content {
    margin-left: 0;
}
/* Remove dot/pipe visuals if any remain */
.timeline-dot, .timeline-pipe {
    display: none !important;
}