* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inconsolata", monospace;
}

html,
body {
    overflow-x: hidden;
}

body {
    background: #000;
    color: #9a9a9a;
    padding: 28px 16px;
    --bg-color: #000;
}

.container {
    max-width: 740px;
    margin: 0 auto;
}

/* HEADER */
.header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 56px;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Avatar and menu button on same row */
.avatar-section>div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image {
    width: 86px;
    flex-shrink: 0;
    border-radius: 3px;
    cursor: pointer;
}

/* Show menu button next to avatar with left margin */
.avatar-section .menu-button {
    display: flex;
    margin-left: 12px;
}

/* Name below avatar */
.avatar-section h1 {
    font-size: 35px;
    font-weight: 700;
    color: orange;
    line-height: 1.1;
    margin: 0;
}

/* Nav links below name */
.avatar-section nav {
    display: flex;
    gap: 18px;
    font-size: 15px;
}

.avatar-section nav a {
    color: #9a9a9a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.avatar-section nav a:hover {
    color: #fff;
}

/* HEADER CONTENT - Hide everything */
.header-content {
    display: none;
}

/* NAV */
nav {
    display: flex;
    gap: 18px;
    font-size: 15px;
}

nav a {
    color: #9a9a9a;
    text-decoration: none;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #fff;
}

/* AVATAR LIGHTBOX */
.avatar-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    z-index: 2000;
    padding: 20px;
}

.avatar-lightbox.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.avatar-lightbox.show .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 36px;
    width: 35px;
    height: 35px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* MENU BUTTON - OPTIMIZED */
.menu-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4d4d4;
    padding: 6px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.menu-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.menu-line {
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: width 0.2s ease;
}

.menu-line:nth-child(1) {
    width: 100%;
}

.menu-line:nth-child(2) {
    width: 75%;
}

.menu-line:nth-child(3) {
    width: 100%;
}

.menu-button:hover .menu-line:nth-child(2) {
    width: 100%;
}

/* MUSIC BUTTON - OPTIMIZED */
.music-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    width: 100%;
}

.music-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.music-timer {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: orange;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.light .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.song-title {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-align: center;
    font-style: italic;
    opacity: 0.8;
}

.light .song-title {
    color: #666;
}

.light .music-timer {
    color: #888;
}

.play-icon,
.pause-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.music-label {
    font-size: 15px;
}

/* SLIDE MENU - MAXIMUM PERFORMANCE */
.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    /* Use only transform for animation - GPU accelerated */
    transform: translate3d(280px, 0, 0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Force GPU acceleration */
    will-change: transform;
    -webkit-transform: translate3d(280px, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slide-menu.open {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-title {
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

.close-button {
    background: transparent;
    border: none;
    color: #9a9a9a;
    cursor: pointer;
    font-size: 24px;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #fff;
}

.menu-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-section-title {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.menu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-link.active {
    background: rgba(255, 165, 0, 0.15);
    border-color: rgba(255, 165, 0, 0.3);
    color: orange;
}

.menu-link-text {
    font-size: 15px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.theme-label {
    font-size: 15px;
}

.moon-icon {
    width: 24px;
    height: 24px;
}

.moon-body {
    transition: all 0.3s ease;
}

.moon-crater {
    transition: opacity 0.3s ease;
}

.moon-shadow {
    transition: transform 0.3s ease;
    transform: translateX(10px);
}

.light .moon-shadow {
    transform: translateX(0px);
}

.light .moon-crater {
    opacity: 0;
}

.light body {
    --bg-color: #fff;
}

/* OVERLAY - OPTIMIZED */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.25s;
    z-index: 999;
    /* Force GPU layer */
    will-change: opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

/* SECTIONS */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* ABOUT SECTION */
.about-content {
    line-height: 1.8;
    font-size: 16px;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content img {
    max-width: 50%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 3px;
}

.about-content h3 {
    color: #6aa9ff;
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 16px;
}

.about-content .highlight {
    color: orange;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 14px;
    color: #d4d4d4;
}

/* POSTS */
ul {
    list-style: none;
}

li {
    margin-bottom: 48px;
}

h2 a {
    font-size: 26px;
    font-weight: 700;
    color: #6aa9ff;
    text-decoration: none;
    line-height: 1.3;
    transition: text-decoration 0.2s ease;
}

h2 a:hover {
    text-decoration: underline;
}

.date {
    margin-top: 4px;
    font-size: 14px;
    color: #8a8a8a;
}

/* LIGHT MODE */
.light body {
    background: #fff;
    color: #444;
}

.light h1 {
    color: orange;
}

.light nav a {
    color: #555;
}

.light h2 a {
    color: #0066cc;
}

.light .date {
    color: #666;
}

.light .about-content h3 {
    color: #0066cc;
}

.light .about-content .highlight {
    color: orange;
}

.light .skill-tag {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.light .menu-button {
    color: #666;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.light .menu-button:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.light .music-button {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.light .music-button:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.light .slide-menu {
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.light .menu-title {
    color: #000;
}

.light .menu-link {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.light .menu-link:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.light .menu-link.active {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    color: orange;
}

.light .theme-toggle {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.light .theme-toggle:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.light .close-button {
    color: #666;
}

.light .close-button:hover {
    color: #000;
}

.closing {
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: start;
    font-size: 1.1rem;
}

.closing a {
    text-decoration: underline;
    color: inherit;
}

/* MOBILE - MAXIMUM PERFORMANCE */
@media (max-width: 600px) {
    * {
        cursor: default;
        /* Remove tap highlight on mobile */
        /*       -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none; */
    }

    /* Allow text selection for content */
    /*  p, h1, h2, h3, .about-content, .date, .menu-link-text {
       -webkit-user-select: text;
       user-select: text;
   } */

    body {
        padding: 22px 14px;
    }

    .header {
        gap: 16px;
        margin-bottom: 44px;
    }

    .profile-image {
        width: 80px;
    }

    h1 {
        font-size: 25px;
    }

    nav {
        font-size: 13px;
        gap: 14px;
    }

    li {
        margin-bottom: 36px;
    }

    h2 a {
        font-size: 22px;
    }

    .date {
        font-size: 13px;
    }

    .about-content {
        font-size: 15px;
    }

    .about-content h3 {
        font-size: 20px;
        margin-top: 32px;
    }

    .about-content img {
        max-width: 90%;
    }

    /* CRITICAL: Mobile menu optimizations for 60fps+ */
    .slide-menu {
        width: 100%;
        /* Use translate3d for full-width mobile menu */
        transform: translate3d(100%, 0, 0);
        -webkit-transform: translate3d(100%, 0, 0);
        /* Solid background on mobile - no transparency overhead */
        background: rgb(20, 20, 20);
    }

    .slide-menu.open {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }

    .light .slide-menu {
        background: rgb(255, 255, 255);
        border-left: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* Disable hover effects on mobile for better performance */
    .menu-button:hover {
        color: #d4d4d4;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .light .menu-button:hover {
        color: #666;
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }
}