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


:root {
      /* default theme */
    --bg: #0f0b0c;
    --bg-raised: #171213;
    --bg-hover: #1f1a1b;
    --border: #2c2224;
    --text: #e8e0e1;
    --text-secondary: #9a8e90;
    --accent: #b83a3a;
    --accent-hover: #a03232;
    --radius: 8px;
    --max-w: 1140px;
    --header-bg: rgba(15, 11, 12, 0.8);
    --header-social-bg: rgba(23, 18, 19, 0.75);
    --header-social-hover-bg: rgba(31, 26, 27, 0.75);
    --tooltip-bg: #222;
    --tooltip-text: var(--text);
}

body.theme-dark {
    --tooltip-bg: #23232a;
    --tooltip-text: var(--text);
    --bg: #101010;
    --bg-raised: #181818;
    --bg-hover: #232323;
    --border: #232323;
    --text: #e3e3e3;
    --text-secondary: #a0a0a0;
    --accent: #b83a3a;
    --accent-hover: #a03232;
    --header-bg: rgba(16, 16, 16, 0.75);
    --header-social-bg: rgba(24, 24, 24, 0.75);
    --header-social-hover-bg: rgba(35, 35, 35, 0.75);
    --tooltip-bg: #232323;
    --tooltip-text: var(--text);
}

body.theme-light {
    --tooltip-bg: #fff;
    --tooltip-text: var(--text);
    --header-bg: rgba(247, 246, 250, 0.8);
    --header-social-bg: rgba(255, 255, 255, 0.75);
    --header-social-hover-bg: rgba(240, 240, 245, 0.75);
    --bg: #f7f6fa;
    --bg-raised: #fff;
    --bg-hover: #f0f0f5;
    --border: #e0dbe2;
    --text: #23232a;
    --text-secondary: #6a6a7a;
    --accent: #b83a3a;
    --accent-hover: #a03232;
}

body.theme-red {
    --tooltip-bg: #222;
    --tooltip-text: var(--text);
    --header-bg: rgba(15, 11, 12, 0.8);
    --header-social-bg: rgba(23, 18, 19, 0.75);
    --header-social-hover-bg: rgba(31, 26, 27, 0.75);
    --bg: #0f0b0c;
    --bg-raised: #171213;
    --bg-hover: #1f1a1b;
    --border: #2c2224;
    --text: #e8e0e1;
    --text-secondary: #9a8e90;
    --accent: #b83a3a;
    --accent-hover: #a03232;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* header */
header {
    border-bottom: 1px solid var(--border);
    padding: 3rem 2rem 2.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    transition: padding 0.3s, background 0.3s;
}

header.scrolled {
    padding: 0.75rem 2rem;
}

.glass-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: url(#liquid-glass) blur(2px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

body.theme-light .glass-backdrop {
    backdrop-filter: url(#liquid-glass) blur(2px) saturate(3) !important;
    -webkit-backdrop-filter: blur(16px) saturate(3) !important;
}

body.theme-dark .glass-backdrop {
    backdrop-filter: url(#liquid-glass) blur(2px) saturate(2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(2) !important;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    transition: padding 0.3s;
    position: relative;
    z-index: 1;
}

header.scrolled .header-inner {
    padding: 0.5rem 2rem;
    align-items: center;
}

.header-intro {
    position: relative;
}

.header-intro h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    transition: font-size 0.3s, margin 0.3s;
}

.last-name {
    display: inline;
    transition: opacity 0.3s, font-size 0.3s;
}

header.scrolled .header-intro h1 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.header-intro p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 480px;
    line-height: 1.6;
}

header.scrolled .header-intro p {
    display: none;
}

.header-socials {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--header-social-bg);
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.header-socials a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--header-social-hover-bg);
}

.header-socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* main content */
main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    flex: 1;
    width: 100%;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* project cards */
#projects,
#youtube {
    display: flex;
    flex-direction: column;
}

.project-card {
    display: block;
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-raised);
    margin-bottom: 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.project-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

/* project status */
.status-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: default;
}

.status-dot.released { background: #3a9e4a; }
.status-dot.prerelease { background: #f0a500; }
.status-dot.unreleased { background: #b83a3a; }

/* tooltip */
.status-dot::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.project-card:hover .status-dot::after {
    opacity: 1;
}

.view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 0;
    transition: color 0.2s;
}

.view-more-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.view-more:hover {
    color: var(--accent);
}

.project-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

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

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* youtube */
.yt-card {
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-raised);
    overflow: hidden;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.yt-card:hover {
    border-color: var(--accent);
}

.yt-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg-hover);
    overflow: hidden;
}

.yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.03);
}

.yt-info {
    padding: 1rem 1.25rem;
}

.yt-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.yt-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.yt-meta svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}

.yt-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.yt-stats {
    display: flex;
    gap: 0.75rem;
}

.yt-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

/* mobile */
@media (max-width: 720px) {
    header { padding: 1.5rem 1.25rem 1.25rem; }

    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem 0.5rem;
        gap: 1rem;
    }

    header.scrolled { padding: 0.5rem 1.25rem; }

    header.scrolled .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0.5rem;
        text-align: left;
        gap: 0.75rem;
    }

    .header-intro h1 { font-size: 1.4rem; }
    .header-intro p { font-size: 0.85rem; }

    header.scrolled .last-name {
        display: none;
    }

    main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 1.25rem;
    }
}
