/* ========================================
   RESET & VARIABLES
   ======================================== */
:root {
    --color-bg: #000000;
    --color-text: #FFFFFF;
    --color-line: #333333;
    --color-accent: #FFFFFF;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --spacing-unit: 1.5rem;
    --border-width: 1px;
}

/* Light mode for users with light system preference */
@media (prefers-color-scheme: light) {
    :root {
        --color-bg: #FFFFFF;
        --color-text: #111111;
        --color-line: #DDDDDD;
        --color-accent: #000000;
    }



    .gallery-module {
        background-color: #EAEAEA !important;
    }

    .tech-player {
        background-color: #ffffff !important;
        color: #000000 !important;
        border-color: #000000 !important;
    }

    .tech-header {
        border-bottom-color: #000000 !important;
        background-color: #ffffff !important;
    }

    .tech-control-panel {
        border-right-color: #000000 !important;
        background-color: #ffffff !important;
    }

    .tech-controls-row {
        border-top-color: #000000 !important;
    }

    .tech-knob {
        border-color: #000000 !important;
    }

    .tech-knob::after {
        background-color: #000000 !important;
    }

    .tech-knob-arc {
        border-left-color: #000000 !important;
        border-top-color: #000000 !important;
    }

    .tech-switch {
        border-color: #000000 !important;
    }

    .tech-switch:hover .tech-switch-indicator {
        background-color: #ffffff !important;
    }

    .tech-bar {
        background-color: #000000 !important;
    }

    .essay-item {
        border-bottom-color: #CCC !important;
    }

    .list-item {
        border-bottom-color: #CCC !important;
    }

    .list-item:hover {
        color: #555 !important;
    }

    .action-link-large:hover {
        color: #555 !important;
    }

    .music-module .action-link-large:hover {
        color: #555 !important;
        border-color: #555 !important;
    }

    .full-width-module {
        background-color: #FFFFFF !important;
    }

    @media (max-width: 768px) {
        .tech-control-panel {
            border-bottom-color: #000000 !important;
        }
    }
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-mono);
    /* Monospace for whole site */
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    /* For grain overlay */
    padding-top: max(env(safe-area-inset-top), 0px);
}

/* Grain Animation */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(15%, 0%);
    }

    70% {
        transform: translate(0%, 15%);
    }

    80% {
        transform: translate(3%, 35%);
    }

    90% {
        transform: translate(-10%, 10%);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.6;
}

ul {
    list-style: none;
}

/* ========================================
   FULL WIDTH MODULE (MUSIC PAGE)
   ======================================== */
.full-width-module {
    grid-column: 1 / -1;
    min-height: 80vh;
}

.music-content-full {
    padding: 2rem 0;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-decoration: none;
    opacity: 0.6;
}

.back-link:hover {
    opacity: 1;
}

/* ========================================
   LINK CONTENT (INDEX)
   ======================================== */
.link-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 1rem 0;
}

.module-desc {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.action-link-large {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
    letter-spacing: -0.02em;
}

.action-link-large:hover {
    color: #AAA;
}

/* ========================================
   ESSAY LIST (ESSAYS PAGE)
   ======================================== */
.essay-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 800px;
}

.essay-item {
    display: block;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #444;
    transition: opacity 0.2s ease;
}

.essay-item:hover {
    opacity: 0.6;
}

.essay-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.5;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}

.essay-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.essay-excerpt {
    font-family: var(--font-main);
    font-size: 1rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* ========================================
   MAGAZINE GRID STYLES
   ======================================== */

.layout-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    /* Remove gap for tight grid */
    border: var(--border-width) solid var(--color-text);
    /* background-color: var(--color-text); */
    /* Removed to eliminate black section at bottom */
    /* Lines color */
    max-width: 100%;
    margin: 0;
}

.module {
    background-color: var(--color-bg);
    padding: 2rem;
    border: none;
    /* Handled by grid gap/background */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

/* ========================================
   GLOBAL SITE HEADER (reusable component)
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: var(--border-width) solid var(--color-line);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.header-title-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.header-link {
    color: inherit;
}

.logo-title-container {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--color-line);
}

.header-title-block h1 {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.nav-link,
.theme-toggle {
    padding: 0.45rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border: var(--border-width) solid var(--color-line);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text);
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.theme-toggle:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}

.nav-link.active {
    border-color: var(--color-text);
    opacity: 1;
}

.theme-toggle {
    cursor: pointer;
    background: var(--color-text);
    color: var(--color-bg);
}

/* Header Module */
.header-module {
    grid-column: 1 / 4;
    grid-row: 1;
    border-bottom: var(--border-width) solid var(--color-text);
    margin-bottom: 0;
    padding-bottom: 0;
    padding-top: calc(1.25rem + env(safe-area-inset-top));
    min-height: auto;
    /* Override global module min-height */
    gap: 0.75rem;
}

.brand h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0;
    line-height: 0.75;
    text-transform: uppercase;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.6;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    min-height: 1.2em;
    border-right: 2px solid var(--color-text);
    animation: blink-caret 0.75s step-end infinite;
    padding-right: 5px;
}

/* Stop blinking when typing is done (optional, or keep it blinking) */
/* Actually, user asked for blinking cursor, so let's keep it blinking forever */

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--color-text)
    }
}

@media (max-width: 768px) {
    .header-module {
        padding-top: calc(1.5rem + env(safe-area-inset-top));
        gap: 1rem;
    }
    .brand h1 {
        font-size: 2.6rem;
        line-height: 0.95;
    }
    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.04em;
        white-space: normal;
        min-height: 0;
    }
    .header-module .brand,
    .header-module .meta {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .header-module {
        grid-column: 1 / -1;
        padding-top: calc(1.5rem + env(safe-area-inset-top));
    }
}

.header-nav {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-top: 0;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--color-text);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.header-nav a:hover {
    opacity: 1;
}

@media (max-width: 900px) {
    .header-nav {
        width: 100%;
        justify-content: flex-start;
        row-gap: 0.5rem;
    }
    .header-nav a {
        padding: 0.35rem 0.75rem;
        border: var(--border-width) solid var(--color-text);
        border-radius: 0;
    }
}

/* Stack magazine grid on small screens */
@media (max-width: 900px) {
    .layout-grid {
        display: flex;
        flex-direction: column;
        border-width: var(--border-width);
    }

    .module {
        min-height: auto;
        padding: 1.5rem;
        border-bottom: var(--border-width) solid var(--color-line);
    }

    .module:last-child {
        border-bottom: none;
    }

    .header-module {
        grid-column: 1 / -1;
        padding-top: calc(1.5rem + env(safe-area-inset-top));
        gap: 0.65rem;
    }

    .header-module .brand,
    .header-module .meta {
        width: 100%;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.95rem;
        letter-spacing: 0.04em;
    }
}

/* Tech Player Header (for modules) */
.tech-player {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Meta Strip (Location + Time) */
.meta-module {
    grid-column: 4 / -1;
    border-bottom: var(--border-width) solid var(--color-text);
    padding: 1.25rem 1.5rem;
    min-height: auto;
    display: flex;
    align-items: center;
}

.meta-line {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border: var(--border-width) solid var(--color-text);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.6;
    }
}

.meta-clock {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    opacity: 0.85;
}

.meta-colon {
    opacity: 0.6;
}

.meta-tz {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    opacity: 0.6;
    margin-left: 0.35rem;
}

@media (max-width: 1100px) {
    .meta-module {
        grid-column: 1 / -1;
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 768px) {
    .meta-module {
        border-top: var(--border-width) solid var(--color-text);
    }
    .meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .meta-clock {
        font-size: 1.2rem;
        gap: 0.15rem;
    }
    .meta-colon-seconds,
    .meta-seconds {
        display: none;
    }
}

.meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Hero Module */
.hero-module {
    grid-column: 1 / 7;
    border-right: var(--border-width) solid var(--color-text);
    border-bottom: var(--border-width) solid var(--color-text);
    min-height: 400px;
    justify-content: center;
}

/* Focus Module (Halfway) */
.focus-module {
    grid-column: 7 / -1;
    border-bottom: var(--border-width) solid var(--color-text);
    background-color: transparent;
    padding: 1.5rem;
}

.focus-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.focus-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.focus-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    filter: grayscale(100%);
    /* Keep it consistent with B&W theme */
    transition: filter 0.3s ease;
}

.focus-module:hover .focus-icon {
    filter: grayscale(0%);
    /* Reveal color on hover */
}

.focus-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    /* Reset margin since it's in a flex row */
}

.focus-desc {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.action-link {
    font-size: 1rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Essays Module - Typographic List Style */
.essays-module {
    grid-column: 1 / 5;
    border-right: var(--border-width) solid var(--color-text);
    border-bottom: var(--border-width) solid var(--color-text);
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #444;
}

.list-item:hover {
    opacity: 1;
    color: #AAA;
}

.item-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.item-date,
.item-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Music Module - Bold Black Block */
.music-module {
    grid-column: 5 / 9;
    border-right: var(--border-width) solid var(--color-text);
    padding: 1.5rem;
}

.books-module {
    grid-column: 5 / -1;
    border-bottom: var(--border-width) solid var(--color-text);
    padding: 0;
}

.books-module .module-label,
.music-module .module-label {
    color: var(--color-text);
    opacity: 0.5;
}

.books-module .big-type,
.music-module .big-type {
    color: var(--color-text);
}

.books-module .music-sub,
.music-module .music-sub {
    color: var(--color-text);
    opacity: 0.7;
}

.books-module .action-link,
.music-module .spotify-link {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
}

@media (max-width: 900px) {

    .hero-module,
    .essays-module,
    .music-module,
    .books-module,
    .works-module,
    .focus-module {
        grid-column: 1 / -1 !important;
    }

    .header-module {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .brand h1 {
        font-size: 2.5rem;
    }

    .meta-location {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.8rem;
    }

    .location-info {
        align-items: flex-start;
    }

    .digital-clock {
        font-size: 1.4rem;
    }

    .journey-map {
        width: 140px;
        height: 45px;
    }
}

@media (max-width: 720px) {
    .header-module {
        position: sticky;
        top: 0;
        z-index: 30;
        background: var(--color-bg);
        border-bottom: var(--border-width) solid var(--color-text);
        padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem;
    }

    .header-module .brand h1 {
        font-size: 2rem;
        line-height: 1;
    }

    .header-module .subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.03em;
        white-space: normal;
        border: none;
        padding-right: 0;
        animation: none;
    }

    .header-module .meta {
        width: 100%;
        justify-content: flex-start;
    }

    .header-nav {
        width: 100%;
        gap: 0.65rem;
        row-gap: 0.35rem;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.9rem;
    }
}

.music-module .module-desc {
    opacity: 0.8;
    color: var(--color-text);
}

.music-module .action-link-large {
    color: var(--color-text);
    border-color: var(--color-text);
}

.music-module .action-link-large:hover {
    color: #AAA;
    border-color: #AAA;
}

.music-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.big-type {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    opacity: 0.05;
    /* Very subtle watermark */
    color: var(--color-text);
    /* Black watermark */
}

.spotify-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-decoration: underline;
    opacity: 0.6;
}

.music-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.track {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.play-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--color-text);
    border-bottom-color: var(--accent);
    transform: translateY(-1px);
}

/* Archive/Works Module */
.works-module {
    grid-column: 1 / -1;
    border-bottom: var(--border-width) solid var(--color-text);
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* Apps Grid - Horizontal Layout */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--border-width);
    margin-top: 2rem;
}

.app-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background-color: var(--color-bg);
    border: var(--border-width) solid var(--color-text);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 150px;
    gap: 1.25rem;
}

.app-card:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-bg);
}

.app-card:hover .app-card-tag {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed currentColor;
}

.app-card-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.app-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: var(--border-width) solid currentColor;
    background: var(--color-bg);
    flex-shrink: 0;
}

.app-card-title {
    font-weight: 700;
    font-size: 1.25rem;
    font-family: var(--font-main);
    letter-spacing: -0.02em;
}

.app-card-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    background-color: transparent;
    color: currentColor;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: var(--border-width) solid currentColor;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.app-card-desc {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.5;
    margin: 0;
    max-width: 38ch;
}

.app-card:hover .app-card-desc {
    opacity: 0.9;
}

/* Responsive layout for apps grid */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: var(--border-width);
    }
}

/* Footer */
.footer-module {
    grid-column: 1 / -1;
    margin-top: 0;
    border-top: none;
}

.connect-links {
    display: flex;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.connect-links a {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.connect-links a:hover {
    border-bottom-color: var(--color-text);
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 2rem;
}

/* ========================================
   APP PAGES
   ======================================== */
.app-hero-module {
    grid-column: 1 / 6;
    border-right: var(--border-width) solid var(--color-text);
    border-bottom: var(--border-width) solid var(--color-text);
    justify-content: center;
    min-height: 80vh;
}

.app-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.app-tagline {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 2rem;
    font-weight: 700;
}

.app-desc {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 400px;
}

.app-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--color-text);
    transition: all 0.2s ease;
}

.download-btn:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.privacy-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-decoration: underline;
    opacity: 0.6;
}

/* Gallery Module */
.gallery-module {
    grid-column: 6 / -1;
    border-bottom: var(--border-width) solid var(--color-text);
    padding: 0;
    overflow: hidden;
    background-color: #111111;
}

.gallery-module .module-label {
    padding: 2rem 2rem 0 2rem;
}

.gallery-scroll {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    overflow-x: auto;
    height: 100%;
    align-items: center;
}

.gallery-scroll img {
    height: 60vh;
    /* Tall screenshots */
    width: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

@media (max-width: 900px) {
    .app-hero-module {
        grid-column: 1 / -1;
        border-right: none;
        min-height: auto;
        padding: 1.75rem 1.5rem;
    }

    .gallery-module {
        grid-column: 1 / -1;
        border-top: var(--border-width) solid var(--color-text);
        padding: 1rem 0 1.5rem;
    }

    .gallery-module .module-label {
        padding: 0 1.5rem 0.5rem;
    }

    .gallery-scroll {
        gap: 1rem;
        padding: 0 1.25rem 0.5rem;
        scroll-snap-type: x mandatory;
    }

    .gallery-scroll img {
        width: min(82vw, 420px);
        height: auto;
        max-height: 70vh;
        object-fit: contain;
        scroll-snap-align: start;
    }
}

/* Typography Overrides */
.statement {
    font-size: 3.5rem;
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.focus-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.action-link-large {
    font-size: 1.2rem;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
    align-self: flex-start;
}

.module-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.6;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

iframe {
    background-color: transparent;
    /* Remove white background */
    border: none;
    /* Remove border for cleaner look */
    border-radius: 12px;
    opacity: 1;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Add shadow for depth instead of border */
}

iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.track {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.play-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--color-text);
    border-bottom-color: var(--accent);
    transform: translateY(-1px);
}

/* ============================================
   APP VISUAL CONTAINER - IMPROVED LAYOUT
   ============================================ */

.app-visual-container {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    height: 100%;
    justify-content: center;
}

.app-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Wrapper to anchor controls/indicators consistently beneath device */
.gallery-wrap {
    position: relative;
    padding-bottom: 110px;
}

.css-iphone {
    width: 200px;
    height: 400px;
    background: var(--bg);
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid var(--border);
}

.css-iphone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Remove the iPhone notch - commenting out
.css-iphone::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: rgba(0,0,0,0.8);
    border-radius: 10px;
    z-index: 2;
}
*/

.css-iphone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px var(--border);
}

.css-macbook {
    width: 350px;
    height: 220px;
    background: var(--bg);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.css-macbook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.css-macbook-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .css-iphone,
[data-theme="dark"] .css-macbook {
    background: var(--bg);
}

[data-theme="dark"] .css-iphone-screen {
    background: var(--bg);
}

/* ============================================
   GALLERY CONTROLS - FIXED POSITIONING
   ============================================ */

.gallery-controls {
    display: none !important;
}

.gallery-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    /* hide raw < > text */
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    user-select: none;
}

.gallery-btn.prev::before,
.gallery-btn.next::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 1;
    color: currentColor;
}

/* Use balanced chevrons instead of raw < > */
.gallery-btn.prev::before {
    content: '‹';
    font-size: 18px;
    font-weight: 700;
}

.gallery-btn.next::before {
    content: '›';
    font-size: 18px;
    font-weight: 700;
}

.gallery-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.gallery-btn:active {
    transform: scale(0.95);
}

.gallery-btn.prev,
.gallery-btn.next {
    flex-shrink: 0;
}

.gallery-btn:hover {
    transform: translateY(-1px);
    background: var(--bg-secondary);
}

.gallery-btn:active {
    transform: scale(0.95);
}

/* MacBook and iPhone use same navigation styling */

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-controls {
        display: none !important;
    }
}

.gallery-indicators {
    display: none !important;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
    border: 1px solid var(--border);
}

.indicator-dot::before {
    content: '';
    display: none;
}

.indicator-dot:hover {
    opacity: 1;
    transform: scale(1.15);
}

.indicator-dot.active {
    opacity: 1;
    background: var(--accent);
    transform: scale(1.2);
    border-color: var(--accent);
    box-shadow: none;
}

.indicator-dot.active::before {
    transform: scale(1);
}

/* Alternative: Line-style indicators */
.gallery-indicators.line-style {
    gap: 0.25rem;
    padding: 0.5rem 1rem;
}

.gallery-indicators.line-style .indicator-dot {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--text-secondary);
    opacity: 0.3;
}

.gallery-indicators.line-style .indicator-dot:hover {
    opacity: 0.6;
    transform: scaleY(1.5);
}

.gallery-indicators.line-style .indicator-dot.active {
    background: var(--accent-color);
    opacity: 1;
    transform: scaleX(1.2) scaleY(1.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-indicators {
        display: none !important;
    }

    .indicator-dot {
        width: 6px;
        height: 6px;
    }

    .gallery-indicators.line-style .indicator-dot {
        width: 20px;
        height: 2px;
    }
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-16) 0;
    margin-top: var(--space-20);
    text-align: center;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
}

.built-by {
    font-weight: 500;
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--accent-hover);
}

/* ========================================
   DETAIL PAGES
   ======================================== */

.app-detail-page {
    background: var(--bg);
}

/* ========================================
   APP HERO SECTION
   ======================================== */

.app-hero {
    padding: var(--space-16) 0 var(--space-12) 0;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><circle cx="30" cy="30" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.achievement-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.achievement {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-2) var(--space-4);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.app-hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: var(--space-4);
    letter-spacing: -0.05em;
    line-height: 0.9;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-bottom: var(--space-6);
    opacity: 0.95;
    line-height: 1.4;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #FF5252;
    padding: var(--space-4) var(--space-8);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    margin-top: var(--space-4);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ========================================
   FEATURES GRID
   ======================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    margin: var(--space-16) 0;
}

.feature-card {
    background: var(--bg-secondary);
    padding: var(--space-8);
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
}

.feature-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   STATS SECTION
   ======================================== */

.stats-section {
    background: var(--bg-secondary);
    padding: var(--space-8);
    border-radius: 16px;
    margin-bottom: var(--space-8);
    border: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   TESTIMONIAL
   ======================================== */

.testimonial {
    background: var(--accent);
    color: white;
    padding: var(--space-6);
    border-radius: 12px;
    margin: var(--space-6) 0;
    position: relative;
}

.testimonial blockquote {
    font-size: 1.125rem;
    font-style: italic;
    margin: 0 0 var(--space-3) 0;
    line-height: 1.5;
}

.testimonial cite {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ========================================
   ACHIEVEMENT STATS
   ======================================== */

.achievement-stats {
    display: flex;
    gap: var(--space-6);
    margin: var(--space-4) 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-item .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   FEATURE HIGHLIGHTS
   ======================================== */

.feature-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    width: 100%;
    height: 100%;
    align-content: center;
}

.feature-highlight {
    text-align: center;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-highlight .feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

.feature-highlight h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-1);
    line-height: 1.2;
}

.feature-highlight p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    margin: 0;
}

/* ========================================
   INLINE APP ICON
   ======================================== */

.app-icon-inline {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--space-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.detail-layout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
    padding: var(--space-16) 0;
}

.detail-text-column h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-4);
}

.app-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-6);
}

.app-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.app-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.app-content ul {
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.app-content li {
    color: var(--text-secondary);
    line-height: 1.6;
}

.app-store-link {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition);
    margin-top: var(--space-4);
    width: fit-content;
}

.app-store-link:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.privacy-link {
    margin-top: var(--space-4);
}

.privacy-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.privacy-link a:hover {
    color: var(--accent);
}

/* ========================================
   LEGAL PAGES
   ======================================== */

.legal-page main.container {
    max-width: 800px;
    padding: var(--space-16) var(--space-6);
}

.legal-page h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-8);
}

.legal-page h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: var(--space-8) 0 var(--space-4) 0;
}

.legal-page p,
.legal-page li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.legal-page ul {
    padding-left: var(--space-6);
    margin-bottom: var(--space-6);
}

.last-updated {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--space-8);
}

/* ========================================
   REALISTIC VINYL PLAYER (COMPACT)
   ======================================== */
.vinyl-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 100%;
}

.vinyl-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
}

.vinyl-row:last-child {
    border-bottom: none;
}

/* Wrapper for Sleeve + Disc */
.vinyl-assembly {
    position: relative;
    width: 280px;
    /* Width to accommodate peeking disc */
    height: 200px;
    flex-shrink: 0;
}

/* The Album Sleeve */
.album-sleeve {
    width: 200px;
    height: 200px;
    background: #1a1a1a;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sleeve-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 0.9;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.sleeve-artist {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* The Spinning Vinyl */
.vinyl-disc {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: #111;
    position: absolute;
    left: 5px;
    /* Hidden behind sleeve initially */
    top: 5px;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: spin 4s linear infinite;
    /* Faster spin */
    transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vinyl-row:hover .vinyl-disc {
    left: 100px;
    /* Slide out */
}

/* Vinyl Texture (Grooves & Shine) */
.vinyl-disc::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background:
        repeating-radial-gradient(#111 0,
            #111 2px,
            #222 3px,
            #111 4px);
}

/* Vinyl Shine */
.vinyl-disc::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* Vinyl Label (Center) */
.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: var(--color-accent);
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vinyl-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* Unique Vinyl Styles */
.vinyl-splatter .vinyl-disc {
    background: radial-gradient(circle at 30% 30%, #FF5733, transparent 20%),
        radial-gradient(circle at 70% 70%, #C70039, transparent 20%),
        #111;
}

.vinyl-swirl .vinyl-disc {
    background: conic-gradient(from 0deg, #3357FF, #33FF57, #3357FF);
    filter: blur(1px);
}

.vinyl-swirl .vinyl-disc::before {
    opacity: 0.7;
}

.vinyl-gold .vinyl-disc {
    background: radial-gradient(#FFC300, #FF5733);
}

.vinyl-red .vinyl-disc {
    background: #900C3F;
}

/* ========================================
   DIGITAL BOOKSHELF
   ======================================== */
.books-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.books-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.book-count {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.6;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.book-item {
    position: relative;
    aspect-ratio: 2 / 3;
    perspective: 1000px;
}

.book-cover {
    width: 100%;
    height: 100%;
    background: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* Slight dim for digital feel */
    transition: opacity 0.3s ease, filter 0.3s ease;
    z-index: 0;
    /* High-res black and white effect */
    filter: grayscale(100%) contrast(1.2) brightness(1.1) !important;
}

.book-item:hover .book-cover img {
    opacity: 1;
    filter: grayscale(100%) contrast(1.3) brightness(1.15) !important;
}

/* Ensure text is visible over image if needed, or hide text if image exists */
.book-cover.has-image .book-info {
    display: none;
    /* Hide text if image is present, or maybe show on hover? */
}

/* Let's show text on hover for image ones? */
.book-cover.has-image:hover .book-info {
    display: flex;
    background: rgba(0, 0, 0, 0.8);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
}

.book-item:hover .book-cover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #fff;
}

/* Digital Spine Effect */
.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    opacity: 0.2;
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.b-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    word-break: break-word;
}

.b-author {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Random "Digital" Accents for variety */
.book-item:nth-child(3n) .book-cover {
    background: #1a1a1a;
}

.book-item:nth-child(5n) .book-cover {
    background: #222;
}

.book-item:nth-child(7n) .book-spine {
    background: var(--color-text);
    opacity: 0.5;
}

/* Glitch hover effect */
.book-item:hover .b-title {
    text-shadow: 1px 0 0 red, -1px 0 0 blue;
}

/* ========================================
   UTILITIES
   ======================================== */

.app-icon-inline {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    margin-left: var(--space-2);
    vertical-align: middle;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.lightbox-content video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Image lightbox shares same container styles */
.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 78vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.lightbox-nav.prev {
    left: 8px;
}

.lightbox-nav.next {
    right: 8px;
}

@media (max-width: 640px) {
    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .lightbox-nav.prev {
        left: 6px;
    }

    .lightbox-nav.next {
        right: 6px;
    }
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    opacity: 0.7;
}

/* ============================================
   MOBILE IMPROVEMENTS - LARGER IMAGES & COOL DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .app-showcase {
        padding: var(--space-4) 0;
        display: grid;
        gap: var(--space-8);
    }

    .app-section {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        text-align: center;
        margin-bottom: var(--space-8);
        padding: var(--space-8);
        border-radius: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        background: linear-gradient(145deg, var(--bg) 0%, var(--bg-secondary) 100%);
        border: 1px solid var(--border);
        position: relative;
        overflow: hidden;
    }

    .app-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent));
        background-size: 200% 100%;
        animation: shimmer 3s ease-in-out infinite;
    }

    .app-section:nth-child(even) .app-info {
        order: 1;
    }

    .app-section:nth-child(even) .app-visual-container {
        order: 2;
    }

    .app-info h2 {
        font-size: clamp(2rem, 6vw, 2.5rem);
        margin-bottom: var(--space-3);
        background: linear-gradient(135deg, var(--text), var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 800;
    }

    .tagline-special {
        font-size: clamp(1rem, 3.5vw, 1.25rem);
        margin-bottom: var(--space-4);
        color: var(--text-secondary);
        font-weight: 500;
    }

    .app-visual-container {
        flex: none;
        padding: var(--space-4);
        min-height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
    }

    /* MUCH LARGER MOBILE IPHONES - COOL DESIGN */
    .css-iphone {
        width: 220px !important;
        height: 440px !important;
        margin: 0 auto;
        border-radius: 32px;
        padding: 8px;
        background: linear-gradient(145deg,
                rgba(255, 255, 255, 0.25),
                rgba(255, 255, 255, 0.1));
        backdrop-filter: blur(20px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
        position: relative;
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .css-iphone:hover {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-8px);
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
    }

    .css-iphone-screen {
        border-radius: 24px;
        box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }

    /* Cool reflection effect */
    .css-iphone::after {
        content: '';
        position: absolute;
        top: 12px;
        left: 12px;
        right: 12px;
        height: 40%;
        background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0.2) 0%,
                rgba(255, 255, 255, 0.1) 50%,
                transparent 100%);
        border-radius: 20px 20px 60px 60px;
        pointer-events: none;
        z-index: 1;
    }

    .css-macbook {
        width: 300px;
        height: 185px;
        margin: 0 auto;
        border-radius: 8px;
        background: linear-gradient(145deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.1));
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        transform: perspective(800px) rotateX(10deg);
        transition: all 0.3s ease;
    }

    .css-macbook:hover {
        transform: perspective(800px) rotateX(5deg) translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    }

    .detail-layout-container {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .detail-text-column h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    /* Gallery controls with improved mobile design */
    .gallery-controls {
        padding: 0 16px;
    }

    .gallery-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }

    .gallery-btn:hover {
        transform: scale(1.15);
        background: white;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    }
}

/* ENHANCED MOBILE EXPERIENCE FOR SMALLEST SCREENS */
@media (max-width: 480px) {
    .site-header {
        padding: 0.75rem 0;
        backdrop-filter: blur(25px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }

    .header-container {
        padding: 0 1rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-container.header-minimal {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo-title-container {
        gap: 0.5rem;
    }

    .site-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .header-title-block h1 {
        font-size: clamp(1rem, 3vw, 1.25rem);
        font-weight: 700;
    }

    .site-nav {
        gap: 0.5rem;
        margin-top: 0;
        margin-left: 0 !important;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-link,
    .theme-toggle,
    .theme-toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 8px;
        background: var(--color-bg);
        border: 1px solid var(--color-line);
        color: var(--color-text) !important;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        display: inline-block;
        position: relative;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 140px;
    }

    /* Remove the problematic ::after content */
    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .theme-toggle:hover,
    .theme-toggle-btn:hover {
        background: var(--color-text) !important;
        color: var(--color-bg) !important;
        border-color: var(--color-text) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .theme-toggle,
    .theme-toggle-btn {
        min-width: 60px;
        margin-top: 0;
        border-radius: 8px;
        margin-left: 0 !important;
        order: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .theme-toggle-btn::before {
        width: 12px;
        height: 12px;
    }

    .theme-toggle-btn::after {
        width: 16px;
        height: 16px;
    }

    .theme-toggle-btn:hover {
        background: var(--accent) !important;
        color: white !important;
        border-color: var(--accent) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .hero-section {
        padding: var(--space-3) 0 var(--space-2) 0;
        background: linear-gradient(135deg, var(--bg-secondary), var(--bg));
    }

    .hero-slogan {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
        font-weight: 500;
    }

    .app-section {
        padding: var(--space-6) !important;
        margin-bottom: var(--space-6) !important;
        border-radius: 20px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
        text-align: center !important;
        background: linear-gradient(145deg, var(--bg) 0%, var(--bg-secondary) 100%);
        border: 1px solid var(--border);
        position: relative;
        overflow: hidden;
    }

    .app-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent));
        background-size: 200% 100%;
        animation: shimmer 3s ease-in-out infinite;
    }

    .app-info h2 {
        font-size: clamp(1.5rem, 5vw, 1.875rem) !important;
        margin-bottom: var(--space-2) !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em !important;
        background: linear-gradient(135deg, var(--text), var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .tagline-special {
        font-size: clamp(0.875rem, 3vw, 1rem) !important;
        margin-bottom: var(--space-3) !important;
        opacity: 0.8;
        font-weight: 500;
    }

    .app-badges {
        margin-bottom: var(--space-3) !important;
    }

    .platform {
        font-size: 0.625rem !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 6px !important;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        background: var(--accent) !important;
        color: white !important;
        border: 1px solid var(--accent) !important;
    }

    .app-info p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: var(--space-4) !important;
        opacity: 0.9;
    }

    .app-link {
        font-size: 0.75rem !important;
        margin-right: var(--space-2) !important;
        margin-bottom: var(--space-2) !important;
        font-weight: 600 !important;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        background: var(--bg-secondary) !important;
        border: 2px solid var(--border) !important;
        color: var(--text) !important;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .app-link:hover {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* BIGGER MOBILE IPHONES ON SMALL SCREENS */
    .css-iphone {
        width: 180px !important;
        height: 360px !important;
        border-radius: 28px !important;
        padding: 6px !important;
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.25),
            inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
        background: linear-gradient(145deg,
                rgba(255, 255, 255, 0.25),
                rgba(255, 255, 255, 0.1));
        backdrop-filter: blur(20px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        transform: perspective(1000px) rotateY(-3deg) rotateX(3deg);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .css-iphone:hover {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-6px);
        box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
    }

    .css-iphone-screen {
        border-radius: 22px !important;
        box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
    }

    /* Cool reflection effect for mobile */
    .css-iphone::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 8px;
        right: 8px;
        height: 35%;
        background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0.25) 0%,
                rgba(255, 255, 255, 0.1) 50%,
                transparent 100%);
        border-radius: 18px 18px 50px 50px;
        pointer-events: none;
        z-index: 1;
    }

    .css-macbook {
        width: 260px !important;
        height: 160px !important;
        border-radius: 6px !important;
        background: linear-gradient(145deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.1));
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        transform: perspective(800px) rotateX(8deg);
        transition: all 0.3s ease;
    }

    .css-macbook:hover {
        transform: perspective(800px) rotateX(4deg) translateY(-3px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    }
}

/* COOL ANIMATION FOR TOP BORDER */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   GALLERY IMAGES
   ============================================ */

.screenshot-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
    transform: scale(1.05);
}

.gallery-image.active {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   RESPONSIVE TWEAKS – CAROUSELS & INDICATORS
   ============================================ */

/* Tablet range: improve home stack carousel card width */
@media (min-width: 641px) and (max-width: 900px) {
    .stack-carousel {
        grid-auto-columns: clamp(280px, 60vw, 340px);
    }
}

/* Ensure simple, centered dots appear on more mobile/tablet sizes */
@media (max-width: 900px) {
    .gallery-wrap {
        padding-bottom: 90px;
    }

    .gallery-indicators {
        display: flex !important;
        position: absolute;
        left: 50%;
        bottom: 12px;
        transform: translateX(-50%);
        gap: 8px;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 999px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    [data-theme="dark"] .gallery-indicators {
        background: rgba(15, 23, 42, 0.3);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .indicator-dot {
        width: 8px;
        height: 8px;
        background: var(--text-muted);
        opacity: 0.9;
    }

    .indicator-dot.active {
        background: var(--accent);
        opacity: 1;
        transform: scale(1.15);
    }
}

/* Mid tablets: scale up device preview slightly */
@media (min-width: 769px) and (max-width: 900px) {
    .css-iphone {
        width: 240px;
        height: 480px;
    }
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8);
}

.developer-intro,
.projects-highlight,
.tech-stack,
.background {
    margin-bottom: var(--space-12);
}

.developer-intro h2 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

.developer-intro h3 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.developer-intro p,
.tech-stack p,
.background p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.projects-highlight h3,
.tech-stack h3,
.background h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--accent);
    padding-bottom: var(--space-2);
}

.project-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.project-item h4 {
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text);
}

.project-item h4 a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-item h4 a:hover {
    color: var(--text);
}

.project-item .stars {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.tech-stack strong {
    color: var(--accent);
}

/* Developer visual card */
.developer-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: var(--space-6);
}

.developer-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    max-width: 300px;
    transition: var(--transition);
}

.developer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.developer-card h4 {
    color: var(--text);
    margin-bottom: var(--space-4);
    font-size: 1.25rem;
}

.github-stats {
    margin-bottom: var(--space-6);
}

.github-stats p {
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-size: 0.9rem;
}

.github-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    transition: var(--transition);
}

.github-link:hover {
    background: var(--accent);
    color: var(--bg);
}

@media (max-width: 768px) {
    .developer-visual {
        padding: var(--space-4);
    }

    .developer-card {
        max-width: 100%;
        padding: var(--space-6);
    }
}

/* ========================================
   DEVELOPER PAGE SPECIFIC STYLES
   ======================================== */

/* Developer main card styling */
.app-section[data-app="developer"] {
    background: var(--bg-secondary);
    color: var(--text);
}

.app-section[data-app="projects"] {
    background: var(--bg-secondary);
    color: var(--text);
}

.app-section[data-app="background"] {
    background: var(--bg-secondary);
    color: var(--text);
}

/* Developer stats card */
.developer-stats-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    height: fit-content;
}

.stat-highlight {
    text-align: center;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-highlight .stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: var(--space-1);
}

.stat-highlight .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project list styling */
.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin: var(--space-4) 0;
}

.project-item {
    padding: var(--space-4);
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-item:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.project-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-item h4 a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-item h4 a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.project-item .stars {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Tech stack grid */
.tech-stack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    height: fit-content;
}

.tech-category {
    text-align: center;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tech-category h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-category p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Responsive adjustments for developer page */
@media (max-width: 768px) {
    .developer-stats-card {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .stat-highlight .stat-number {
        font-size: 1.25rem;
    }

    .tech-stack-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .project-item h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
}

/* Dark mode mobile navigation fixes */
[data-theme="dark"] .nav-link {
    background: var(--bg-secondary) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-toggle-btn {
    background: var(--bg-secondary) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .app-link {
    background: var(--bg-secondary) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* Enhanced gallery indicators for mobile */
@media (max-width: 768px) {
    .gallery-indicators {
        padding: var(--space-3);
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        border-radius: 20px;
    }

    .indicator-dot {
        width: 12px;
        height: 12px;
        background: rgba(255, 255, 255, 0.6);
        border: 2px solid rgba(255, 255, 255, 0.4);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .indicator-dot.active {
        background: var(--accent);
        border-color: var(--accent);
        transform: scale(1.2);
    }

    .gallery-indicators.line-style .indicator-dot {
        width: 24px;
        height: 8px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .gallery-indicators.line-style .indicator-dot.active {
        background: var(--accent);
        border-color: var(--accent);
        transform: scale(1.1);
    }
}

/* ========================================
   BLOG PAGE STYLES
   ======================================== */

/* Blog header styling for better contrast */
.blog-page .app-section h2 {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 1.75rem !important;
}

.blog-page .app-section h3.tagline-special {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

.blog-page .app-section p {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

/* blog hero reuse */
.blog-page .projects-intro {
    margin-top: var(--space-6);
}

/* View More button for blog header */
.view-more-btn {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: var(--space-4);
}

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

[data-theme="dark"] .view-more-btn {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .view-more-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.blog-extra-info {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.blog-post {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition: var(--transition);
}

.blog-post:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.blog-post-header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.blog-post-thumbnail {
    flex-shrink: 0;
}

.blog-thumbnail-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-post-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.blog-post-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.blog-post-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-3);
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

[data-theme="dark"] .blog-post-tag {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent);
}

.blog-post-content {
    line-height: 1.7;
}

.blog-post-content p {
    margin-bottom: var(--space-4);
    color: var(--text);
}

.blog-post-content p:last-of-type {
    margin-bottom: var(--space-6);
}

.blog-post-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* Responsive blog layout */
@media (max-width: 768px) {
    .blog-posts {
        gap: var(--space-6);
    }

    .blog-post {
        padding: var(--space-6);
    }

    .blog-post-header h3 {
        font-size: 1.25rem;
    }

    .blog-post-links {
        flex-direction: column;
        gap: var(--space-3);
    }
}


/* ========================================
   PERSONAL PORTFOLIO STYLES
   ======================================== */

.personal-hero .hero-headline {
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 0.95;
    margin-bottom: var(--space-4);
}

.personal-hero .hero-sub {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

/* Current Focus Section */
.current-focus-wrapper {
    margin: var(--space-8) auto;
    max-width: 600px;
    text-align: left;
}

.focus-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.focus-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--space-6);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.focus-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.focus-content {
    position: relative;
    z-index: 1;
}

.focus-title {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.focus-desc {
    display: block;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.focus-link {
    display: inline-block;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Music Section */
.music-section {
    margin: var(--space-16) 0;
    text-align: center;
}

.music-placeholder {
    margin-top: var(--space-6);
    padding: var(--space-12);
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Adjustments for Minimal Header */
.home-btn span {
    font-size: 1.2rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .personal-hero .hero-headline {
        text-align: left;
    }

    .personal-hero .hero-sub {
        text-align: left;
        margin-left: 0;
    }

    .hero-inner {
        text-align: left;
        padding-top: 4rem;
    }

    .hero-ctas {
        justify-content: flex-start;
    }

    .current-focus-wrapper {
        margin-left: 0;
    }
}

/* ========================================
   TECHNICAL MUSIC PLAYER (INDUSTRIAL THEME)
   ======================================== */
.tech-player {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #000000;
    /* Black background for dark mode */
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
}

.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #FFFFFF;
    background-color: #000000;
}

.tech-label {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.tech-status {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #000000;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

.tech-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    justify-content: space-between;
}

.tech-time-display {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.tech-time-labels {
    display: flex;
    gap: 1.5rem;
    font-size: 0.6rem;
    opacity: 0.5;
    margin-bottom: 0.2rem;
}

.tech-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 40px;
    width: 100%;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.tech-bar {
    flex: 1;
    background-color: #FFFFFF;
    animation: visualize 1s ease-in-out infinite alternate;
    min-width: 2px;
}

@keyframes visualize {
    0% {
        height: 20%;
    }

    100% {
        height: 100%;
    }
}

.tech-controls-row {
    display: flex;
    gap: 2rem;
    border-top: 1px solid #FFFFFF;
}

.tech-control-panel {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #FFFFFF;
    background-color: #000000;
}

.tech-control-panel:last-child {
    border-right: none;
}

.tech-knob-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-knob {
    width: 100%;
    height: 100%;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    position: relative;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.tech-knob::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #FFFFFF;
    border-radius: 50%;
    transform: translateX(-50%);
}

.tech-knob-arc {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid transparent;
    border-left-color: #FFFFFF;
    border-top-color: #FFFFFF;
    border-radius: 50%;
    transform: rotate(-45deg);
    opacity: 0.3;
}

.tech-switch-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #FFFFFF;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tech-switch:hover {
    background-color: #000000;
    color: #ffffff;
}

.tech-switch-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.tech-switch-indicator {
    width: 8px;
    height: 8px;
    background-color: #000000;
    /* Or accent color */
    border-radius: 50%;
}

.tech-switch:hover .tech-switch-indicator {
    background-color: #000000;
}

.tech-track-info {
    margin-top: auto;
}

.tech-track-number {
    font-size: 3rem;
    font-weight: 700;
    opacity: 0.1;
    line-height: 1;
}

.tech-track-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.1;
}

.tech-track-artist {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.tech-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.tech-action-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.tech-action-btn:hover {
    opacity: 1;
}

/* Responsive adjustments for Tech Player */
@media (max-width: 600px) {
    .tech-controls-row {
        flex-direction: column;
        gap: 0;
    }

    .tech-control-panel {
        border-right: none;
        border-bottom: 1px solid #FFFFFF;
    }

    .tech-control-panel:last-child {
        border-bottom: none;
    }

    .tech-time-display {
        font-size: 2.5rem;
    }
}
