:root {
    --primary: #00d4ff;
    --secondary: #ff6f61;
    --bg-dark: #1a1f33;
    --text-light: #d4d4d4;
    --shadow: rgb(0 212 255 / 20%);
    --border: rgb(255 111 97 / 50%);

    color-scheme: light dark;
}

.dark-mode {
    --primary: #00d4ff;
    --secondary: #ff6f61;
    --bg-dark: #1a1f33;
    --text-light: #d4d4d4;
    --shadow: rgb(0 212 255 / 20%);
    --border: rgb(255 111 97 / 50%);
    --container-bg: #23263a;
    --container-shadow: 0 2px 16px rgb(0 0 0 / 24%);

    background: var(--bg-dark);
    color: var(--text-light);
}

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

html {
    background: #fff;
}

body {
    background: #fff;
    color: #222;
    font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.dark-mode body {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* merged dark-mode color/background into the variables block above */

/* removed unused .background-particles and drift animation */

.dark-mode body::before,
.dark-mode body::after {
    content: '';
    position: fixed;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--secondary), var(--primary), transparent);
    animation: glow 3s infinite alternate;
    pointer-events: none; /* avoid intercepting taps at screen edges on mobile */
}

.dark-mode body::before {
    left: 20px;
}

.dark-mode body::after {
    right: 20px;
}

@keyframes glow {
    from {
        opacity: 0.5;
        transform: scaleY(0.8);
    }

    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce){
    * {
        animation: none !important;
        transition: none !important;
    }
}

.container {
    max-width: 540px;
    margin: 48px auto;
    padding: 32px 20px;
    background: #fff;
    box-shadow: 0 2px 16px rgb(0 0 0 / 4%);
    border-radius: 12px;
}

.dark-mode .container {
    background: var(--container-bg);
    box-shadow: var(--container-shadow);
}

header {
    margin-bottom: 32px;
    text-align: left;
}

h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.dark-mode h1 {
    color: var(--text-light);
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 8px;
}

.dark-mode .subtitle {
    color: var(--text-light);
}

.intro {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0;
}

.dark-mode .intro {
    color: var(--text-light);
}

h2 {
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #222;
}

.dark-mode h2 {
    color: var(--text-light);
}

.list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.list li {
    margin-bottom: 8px;
    font-size: 1rem;
}

a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: color 0.2s;
}

a:hover {
    color: #0070f3;
}

a:focus-visible{
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.dark-mode a {
    color: var(--text-light);
}

.dark-mode a:hover {
    color: var(--primary);
}

svg {
    flex-shrink: 0;
}

.avatar {
    display: block;
    margin: 0 auto 16px;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

#theme-toggle {
    margin: 0 auto 16px;
    display: block;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(0 0 0 / 10%);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

@supports (backdrop-filter: blur(0)) {
    #theme-toggle {
        backdrop-filter: blur(10px);
    }
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgb(255 255 255 / 20%);
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
}

#theme-toggle:focus-visible{
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.dark-mode #theme-toggle {
    background: rgb(255 255 255 / 5%);
    border-color: rgb(255 255 255 / 10%);
}

.dark-mode #theme-toggle:hover {
    background: rgb(255 255 255 / 10%);
    box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
}

@media (width <= 600px) {
    .container {
        padding: 16px 6px;
        margin: 16px 0;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1rem;
    }

    /* Hide decorative edge lines on small screens to prevent visual obstruction */
    .dark-mode body::before,
    .dark-mode body::after {
        content: none;
    }
}

/* Defensive image sizing on very small screens */
img {
    max-width: 100%;
    height: auto;
}
