/* ============================================================
   LINGDEV PORTFOLIO — cozy lo-fi pixel theme
   ============================================================ */

:root {
    --bg: #15100c;
    --bg-alt: #1b140e;
    --card: rgba(26, 18, 13, .88);
    --card-solid: #211811;
    --border: rgba(240, 228, 208, .14);
    --cream: #f0e4d0;
    --cream-dim: #b9a888;
    --accent: #a8c97f;
    --accent-deep: #8fb763;
    --green: #a8c97f;
    --shadow: 4px 4px 0 rgba(0, 0, 0, .45);
    --hero-blur: 9px;

    --px: 'Press Start 2P', monospace;
    --sk: 'Silkscreen', monospace;
    --vt: 'VT323', monospace;
    --mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; touch-action: manipulation; }

body {
    touch-action: manipulation;
    background: var(--bg);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--accent); color: #2b1d14; }

/* hand-drawn pixel icons */
.px {
    width: 1em; height: 1em;
    display: inline-block;
    vertical-align: -0.12em;
    fill: currentColor;
    shape-rendering: crispEdges;
}
.px-green { color: var(--accent); }
.px-wavey { color: #e3c47e; animation: wavey 1.9s ease-in-out infinite; transform-origin: 70% 95%; }
@keyframes wavey { 0%, 100% { transform: rotate(0deg); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-7deg); } 60% { transform: rotate(10deg); } }
.hc-ico .px { width: 17px; height: 17px; }
.stat-ico .px { width: 1.05em; height: 1.05em; }
.game-hud .px { width: .8em; height: .8em; margin-right: .1em; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--sk);
    font-size: .8rem;
    letter-spacing: .05em;
    padding: .85em 1.5em;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #2b1d14;
    box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0,0,0,.45); background: #bcd894; }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,.45); }
.btn-ghost {
    background: rgba(26, 18, 13, .6);
    color: var(--cream);
    border-color: var(--border);
    box-shadow: var(--shadow);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translate(-2px, -2px); }
.btn-big { font-size: 1rem; padding: 1em 2.2em; }

/* ============ HEADER ============ */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: .9rem 2.2rem;
    transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
    background: rgba(18, 12, 9, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 0 var(--border);
}

.logo { display: flex; align-items: center; gap: .8rem; }
.logo-badge {
    width: 44px; height: 44px;
    background: var(--cream);
    border-radius: 9px;
    display: grid; place-items: center;
    box-shadow: 3px 3px 0 rgba(0,0,0,.4);
    flex-shrink: 0;
}
.logo-badge img { width: 34px; height: 34px; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.35; }
.logo-text strong { font-family: var(--px); font-size: .72rem; color: var(--cream); }
.logo-text em { font-family: var(--sk); font-style: normal; font-size: .62rem; letter-spacing: .08em; color: var(--cream-dim); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 1.9rem; }
.nav-link {
    font-family: var(--sk);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cream);
    position: relative;
    padding-bottom: 4px;
}
.nav-link:hover { color: var(--accent); }
.nav-link.is-current { color: var(--accent); }
.nav-link.is-current::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 9px);
}

.btn-resume { padding: .7em 1.2em; font-size: .72rem; background: var(--accent); color: #2b1d14; box-shadow: 3px 3px 0 rgba(0,0,0,.4); }
.btn-resume svg { width: 15px; height: 15px; }
.btn-resume:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(0,0,0,.4); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 3px; background: var(--cream); }

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
}
.hero-bg {
    position: absolute;
    inset: -2.5%;
    background: url("../assets/hero-bg.jpg") right center / cover no-repeat;
    filter: blur(var(--hero-blur)) brightness(.82) saturate(1.08);
    transform: scale(1.04);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(16, 10, 7, .95) 0%, rgba(16, 10, 7, .82) 34%, rgba(16, 10, 7, .35) 62%, rgba(16, 10, 7, .55) 100%),
        linear-gradient(180deg, rgba(16, 10, 7, .55) 0%, rgba(16, 10, 7, 0) 22%, rgba(16, 10, 7, 0) 70%, var(--bg) 100%);
}
.hero-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.09) 0 1px, transparent 1px 4px);
    opacity: .35;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 9.5rem 3rem 5rem;
    display: flex;
}
.hero-left { max-width: 620px; }

.hero-greet { font-family: var(--vt); font-size: 1.7rem; color: var(--green); margin-bottom: 1rem; }
.hero-greet .greet-green { color: var(--green); }

.hero-title .nowrap { white-space: nowrap; }
.hero-title {
    font-family: var(--px);
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    color: #faf3e3;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, .5);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.hero-heart {
    display: inline-block;
    color: var(--accent);
    font-size: .45em;
    vertical-align: middle;
    margin-left: .35em;
    animation: heartbeat 1.6s infinite;
}
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.25); } 24% { transform: scale(1); } }

.hero-role {
    font-family: var(--vt);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    color: var(--accent);
    margin-bottom: 1.4rem;
    display: flex; align-items: center; gap: .8rem;
}
.role-line { flex: 0 0 70px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 13px); }

.hero-desc { font-size: 1.05rem; color: #ded0b8; max-width: 30rem; margin-bottom: 1.6rem; }

.hero-chips { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.8rem; }
.hero-chips li {
    font-family: var(--sk);
    font-size: .72rem;
    padding: .55em 1em;
    background: rgba(26, 18, 13, .72);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }
.hero-cta .arrow { transition: transform .2s; }
.hero-cta .btn-primary:hover .arrow { transform: translateX(4px); }

.hero-stats {
    display: inline-flex;
    background: rgba(26, 18, 13, .78);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.hero-stats li {
    display: flex; flex-direction: column; align-items: center;
    padding: 1rem 1.5rem;
    min-width: 104px;
}
.hero-stats li + li { border-left: 1px solid var(--border); }
.stat-ico { color: var(--accent); font-size: 1.05rem; margin-bottom: .25rem; }
.hero-stats strong { font-family: var(--px); font-size: 1.05rem; color: #faf3e3; margin-bottom: .35rem; }
.hero-stats em { font-style: normal; font-family: var(--sk); font-size: .6rem; letter-spacing: .06em; color: var(--cream-dim); text-transform: uppercase; }

.hero-connect {
    display: inline-flex;
    flex-direction: column;
    gap: .6rem;
    background: rgba(26, 18, 13, .78);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .9rem 1.2rem;
}
.connect-label { font-family: var(--sk); font-size: .62rem; letter-spacing: .1em; color: var(--cream-dim); }
.connect-icons { display: flex; gap: 1rem; }
.connect-icons a {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(240, 228, 208, .07);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--cream);
    transition: all .15s;
}
.connect-icons a:hover { color: #2b1d14; background: var(--accent); transform: translateY(-3px); }
.connect-icons svg { width: 17px; height: 17px; }

/* floating hero cards */
.hero-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .8rem;
    background: rgba(22, 15, 11, .9);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: .8rem 1.1rem;
    color: var(--cream);
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
    transition: transform .2s, border-color .2s;
}
.hero-card:hover { border-color: var(--accent); transform: translateY(-4px) scale(1.03); }
.hc-ico {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(168, 201, 127, .16);
    border-radius: 8px;
    font-family: var(--sk);
    font-size: 1rem;
    color: var(--accent);
}
.hc-text { font-size: .72rem; line-height: 1.45; color: var(--cream-dim); }
.hc-text strong { display: block; font-family: var(--sk); font-size: .7rem; letter-spacing: .08em; color: var(--cream); margin-bottom: .15rem; }

.card-about      { left: 46%; top: 15%; }
.card-projects   { left: 53%; top: 33%; }
.card-tech       { right: 3%;  top: 28%; }
.card-playground { right: 2.5%; top: 70%; }

/* fake terminal sitting on the laptop screen */
.hero-terminal {
    left: 57%; top: 49%;
    width: 340px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    cursor: default;
}
.term-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(240, 228, 208, .06);
    border-bottom: 1px solid var(--border);
    font-family: var(--sk);
    font-size: .6rem;
    letter-spacing: .08em;
    color: var(--cream-dim);
}
.term-bar span { width: 9px; height: 9px; border-radius: 50%; background: #de8a7e; }
.term-bar span:nth-child(2) { background: #e3c47e; }
.term-bar span:nth-child(3) { background: var(--accent); }
.term-bar span:last-of-type { margin-right: 4px; }
.term-body {
    margin: 0;
    padding: 12px 14px 14px;
    font-family: var(--mono);
    font-size: .72rem;
    line-height: 1.7;
    color: var(--green);
    min-height: 96px;
    white-space: pre-wrap;
}
.term-cursor {
    display: inline-block;
    width: 7px; height: 12px;
    background: var(--green);
    vertical-align: -1px;
    animation: blink 1.1s steps(2) infinite;
}

.float-a { animation: floaty 5s ease-in-out infinite; }
.float-b { animation: floaty 6s ease-in-out .8s infinite; }
.float-c { animation: floaty 5.5s ease-in-out 1.6s infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

.scroll-hint {
    position: absolute;
    left: 50%; bottom: 2rem;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: .7rem;
    font-family: var(--sk);
    font-size: .66rem;
    letter-spacing: .12em;
    color: var(--cream-dim);
}
.scroll-hint:hover { color: var(--accent); }
.mouse {
    width: 18px; height: 28px;
    border: 2px solid currentColor;
    border-radius: 10px;
    position: relative;
}
.wheel {
    position: absolute;
    left: 50%; top: 5px;
    width: 3px; height: 6px;
    margin-left: -1.5px;
    background: currentColor;
    border-radius: 2px;
    animation: wheel 1.6s infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
.scroll-dots { color: var(--accent); letter-spacing: .3em; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ============ SECTIONS ============ */
.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5.5rem 2.4rem;
}
.section-alt {
    max-width: none;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: 3rem; }
.section-tag { font-family: var(--vt); font-size: 1.3rem; color: var(--green); }
.section-title {
    font-family: var(--px);
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    color: #faf3e3;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, .45);
    margin: .6rem 0 .9rem;
}
.title-deco { color: var(--accent); }
.section-sub { color: var(--cream-dim); max-width: 38rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ PROJECTS ============ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
}
.project-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    cursor: pointer;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.project-card:not([data-video]) { cursor: default; }
.project-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #000; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.play-badge {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    font-size: 2.4rem;
    color: #fff;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .2s;
    text-shadow: 3px 3px 0 rgba(0,0,0,.6);
}
.project-card:hover .play-badge { opacity: 1; }
.project-body { padding: 1.4rem 1.5rem 1.6rem; }
.project-cat { font-family: var(--sk); font-size: .62rem; letter-spacing: .12em; color: var(--green); }
.project-body h3 { font-family: var(--px); font-size: .95rem; color: #faf3e3; margin: .7rem 0 .8rem; }
.project-body p { font-size: .88rem; color: var(--cream-dim); margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.project-tags li {
    font-family: var(--sk);
    font-size: .6rem;
    padding: .35em .8em;
    background: rgba(168, 201, 127, .12);
    color: var(--accent);
    border-radius: 6px;
}

/* ============ ABOUT ============ */
.about-grid {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 3.5rem;
    align-items: start;
}
.about-photo { position: relative; transform: rotate(-2deg); }
.about-photo img {
    border: 4px solid var(--cream);
    border-radius: 6px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .4);
}
.photo-tape {
    position: absolute;
    top: -14px; left: 50%;
    width: 110px; height: 28px;
    transform: translateX(-50%) rotate(2deg);
    background: rgba(168, 201, 127, .65);
}
.about-lead { font-size: 1.15rem; margin-bottom: 1rem; }
.about-lead strong { color: var(--accent); }
.about-text > p { color: var(--cream-dim); margin-bottom: 1.6rem; }
.about-subhead { font-family: var(--sk); font-size: .78rem; letter-spacing: .12em; color: var(--green); margin-bottom: 1rem; }
.expertise-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 2rem; }
.expertise-list li { font-size: .9rem; }
.expertise-list li::before { content: "▸ "; color: var(--accent); }

/* ============ TECH ============ */
.tech-groups { display: grid; gap: 2.2rem; }
.tech-group h4 { font-family: var(--sk); font-size: .8rem; letter-spacing: .1em; color: var(--green); margin-bottom: 1rem; }
.tech-chips { display: flex; flex-wrap: wrap; gap: .8rem; }
.tech-chips li {
    font-family: var(--sk);
    font-size: .76rem;
    padding: .7em 1.3em;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 9px;
    transition: all .15s;
}
.tech-chips li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.tech-chips .chip-hot { background: rgba(168, 201, 127, .14); border-color: rgba(168, 201, 127, .4); color: var(--accent); }

/* ============ EXPERIENCE ============ */
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.timeline-head { font-family: var(--sk); font-size: .85rem; letter-spacing: .1em; color: var(--green); margin-bottom: 1.6rem; }
.tl-block {
    position: relative;
    padding: 0 0 2rem 1.7rem;
    border-left: 2px solid var(--border);
}
.tl-block:last-child { padding-bottom: 0; }
.tl-block::before {
    content: "";
    position: absolute;
    left: -7px; top: 4px;
    width: 12px; height: 12px;
    background: var(--accent);
    box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.tl-block h5 { font-family: var(--px); font-size: .82rem; color: #faf3e3; margin-bottom: .5rem; line-height: 1.6; }
.tl-meta { font-family: var(--vt); font-size: 1.2rem; color: var(--accent); font-weight: 400; }
.tl-time { display: block; font-family: var(--sk); font-size: .62rem; letter-spacing: .08em; color: var(--green); margin-bottom: .6rem; }
.tl-block p { font-size: .88rem; color: var(--cream-dim); }

/* ============ PLAYGROUND ============ */
.game-wrap { max-width: 720px; margin: 0 auto; }
.game-hud {
    display: flex;
    justify-content: space-between;
    font-family: var(--sk);
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--cream-dim);
    padding: 0 .3rem .7rem;
}
.game-hud strong { font-family: var(--px); font-size: .85rem; color: var(--accent); margin-left: .5em; }
.game-stage {
    position: relative;
    border: 3px solid var(--cream);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .4);
    background: #1d130c;
}
#game-canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; touch-action: manipulation; }
.game-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; }
.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(.6rem, 2.4vw, 1.4rem);
    padding: .6rem;
    align-items: center;
    justify-content: center;
    background: rgba(16, 10, 7, .78);
    backdrop-filter: blur(2px);
}
.game-overlay[hidden] { display: none; }
#game-msg { font-family: var(--vt); font-size: clamp(1rem, 4.2vw, 1.6rem); line-height: 1.35; color: var(--cream); text-align: center; padding: 0 .8rem; }
.game-overlay .btn { font-size: clamp(.6rem, 2.6vw, .8rem); padding: .8em 1.4em; }
.game-help { text-align: center; font-family: var(--sk); font-size: .64rem; letter-spacing: .08em; color: var(--cream-dim); margin-top: .9rem; }

/* ============ CONTACT ============ */
.contact-wrap { text-align: center; max-width: 760px; margin: 0 auto; }
.contact-big { font-family: var(--vt); font-size: 1.8rem; line-height: 1.4; margin-bottom: 2.4rem; }
.contact-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-bottom: 2.6rem; }
.contact-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.7rem;
    color: var(--cream);
    font-size: .92rem;
    transition: all .15s;
}
.contact-card span { display: block; font-family: var(--sk); font-size: .62rem; letter-spacing: .1em; color: var(--green); margin-bottom: .4rem; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }

/* ============ FOOTER ============ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.2rem 2.4rem 6.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    font-family: var(--sk);
    font-size: .64rem;
    letter-spacing: .1em;
    color: var(--cream-dim);
}
.back-top { color: var(--cream-dim); }
.back-top:hover { color: var(--accent); }

/* ============ LO-FI PLAYER ============ */
.lofi-player {
    position: fixed;
    right: 1.4rem; bottom: 1.4rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: .9rem;
    background: rgba(22, 15, 11, .94);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .7rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    backdrop-filter: blur(6px);
}
.vinyl {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #31402a, #1a2315);
    border: 2px solid rgba(168, 201, 127, .4);
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.vinyl .px { width: 16px; height: 16px; color: var(--accent); }
.lofi-player.playing .vinyl { animation: sway 2.8s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.lofi-text { display: flex; flex-direction: column; line-height: 1.4; min-width: 128px; }
.lofi-text strong { font-family: var(--sk); font-size: .68rem; letter-spacing: .04em; color: var(--cream); }
.lofi-text em { font-style: normal; font-family: var(--vt); font-size: .95rem; color: var(--cream-dim); }
.lofi-controls { display: flex; gap: .35rem; }
.lofi-controls button {
    width: 30px; height: 30px;
    display: grid;
    place-items: center;
    background: rgba(240, 228, 208, .08);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--cream);
    cursor: pointer;
    transition: all .15s;
}
.lofi-controls svg { width: 11px; height: 11px; display: block; }
#lofi-play .ic-pause { display: none; }
.lofi-player.playing #lofi-play .ic-play { display: none; }
.lofi-player.playing #lofi-play .ic-pause { display: block; }
.lofi-controls button:hover { background: var(--accent); color: #2b1d14; }
.lofi-player:not(.playing) #lofi-play {
    background: var(--accent);
    color: #2b1d14;
    animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(168, 201, 127, .55); }
    70%, 100% { box-shadow: 0 0 0 9px rgba(168, 201, 127, 0); }
}

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 4, .85); }
.modal-box {
    position: relative;
    width: min(880px, 92vw);
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.modal-box video { width: 100%; max-height: 74vh; border-radius: 8px; background: #000; }
.modal-close {
    position: absolute;
    top: -14px; right: -14px;
    width: 36px; height: 36px;
    background: var(--accent);
    color: #2b1d14;
    border: 0;
    border-radius: 9px;
    font-family: var(--sk);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0,0,0,.4);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
    .card-about { left: auto; right: 26%; top: 13%; }
    .card-projects { left: auto; right: 3%; top: 13.5%; }
}
@media (max-width: 1100px) {
    .hero-card { display: none; }
    .hero-bg { background-position: 68% center; }
}
@media (max-width: 920px) {
    .main-nav {
        position: fixed;
        top: 64px; right: 1rem;
        background: rgba(18, 12, 9, .97);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.2rem 1.8rem;
        display: none;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 1.1rem; }
    .nav-toggle { display: flex; margin-left: auto; }
    .main-nav { margin-left: 0; }
    .btn-resume { margin-left: 0; order: 1; }
    .site-header { gap: 1rem; padding: .8rem 1.2rem; }
    .logo-text strong { font-size: .62rem; }
    .timeline-grid, .about-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 340px; }
}
@media (max-width: 640px) {
    .hero-bg { background-image: url("../assets/hero-bg-mobile.jpg"); filter: blur(6px) brightness(.82) saturate(1.08); }
    .hero-inner { padding: 7.5rem 1.4rem 6rem; }
    .hero-left { max-width: 100%; min-width: 0; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; white-space: normal; text-align: center; }
    .hero-connect { width: 100%; }
    .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .hero-stats li { min-width: 0; padding: 1rem .5rem; }
    .section { padding: 4rem 1.4rem; }
    .scroll-hint { display: none; }
    .lofi-player { right: .8rem; bottom: .8rem; padding: .55rem .7rem; }
    .lofi-text { min-width: 0; }
    .lofi-text em { display: none; }
    .btn-resume { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
