/* ShiftyCow Terminal — black & gold phosphor */

:root {
    --gold: #d4af37;
    --gold-bright: #ffd968;
    --gold-dim: #8a7020;
    --gold-faint: #4a3d14;
    --ink: #050503;
    --panel: #0c0b06;
    --visited: #b668ff;
}

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

html { background: var(--ink); }

body {
    margin: 0;
    background: var(--ink);
    color: var(--gold);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold-faint); border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

a { color: var(--gold-bright); }
a:visited { color: var(--visited); }

.dim { color: var(--gold-dim); }
.bright { color: var(--gold-bright); }
.mt-xl { margin-top: 5rem; }

.wrap { max-width: 56rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.wrap.wide { max-width: 64rem; }

.font-vt, .page-title, .section-title, .hero-title, .brand-text, .menu-list, .marquee-chunk, .t-btn, .dir-name, .project-name, .social-name {
    font-family: 'VT323', 'IBM Plex Mono', monospace;
}

.t-link {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-style: dotted;
}
.t-link:hover { background: var(--gold); color: var(--ink); text-decoration: none; }

.t-btn {
    display: inline-block;
    border: 1px solid var(--gold);
    padding: 0.55rem 1.4rem;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--gold);
    text-decoration: none;
    transition: background-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.t-btn:hover {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}
.t-btn:visited { color: var(--visited); border-color: var(--visited); }
.t-btn:visited:hover { background: var(--visited); color: var(--ink); }

.t-glow, .page-title, .section-title, .hero-title {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 42px rgba(212, 175, 55, 0.18);
}

.cursor-block::after {
    content: '\2588';
    margin-left: 2px;
    animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- CRT overlay ---------- */
.crt-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9990; }
.crt-scanlines {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.18) 3px, rgba(0,0,0,0) 4px);
    animation: crt-flicker 7s infinite;
}
.crt-beam {
    position: absolute; left: 0; right: 0; height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(212,175,55,0.045), transparent);
    animation: beam 9s linear infinite;
}
.crt-vignette {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,0.55) 100%);
}
@keyframes crt-flicker {
    0%, 100% { opacity: 0.92; }
    8% { opacity: 1; } 9% { opacity: 0.85; } 10% { opacity: 1; }
    54% { opacity: 0.95; }
}
@keyframes beam { 0% { top: -15%; } 100% { top: 110%; } }

/* ---------- Boot sequence ---------- */
.boot-sequence {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--ink);
    display: flex; align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: opacity 0.45s ease-in, transform 0.45s ease-in;
}
.boot-sequence.boot-done { opacity: 0; transform: translateY(-60px); pointer-events: none; }
.boot-inner {
    width: 100%; max-width: 42rem; margin: 0 auto;
    font-family: 'VT323', monospace;
    font-size: 1.35rem; line-height: 1.6;
    color: var(--gold);
}
.boot-skip { margin-top: 1.5rem; font-size: 0.9rem; color: var(--gold-faint); }
@media (min-width: 640px) { .boot-inner { font-size: 1.6rem; } }

/* ---------- Nav ---------- */
.term-nav {
    position: sticky; top: 0; z-index: 9000;
    border-bottom: 1px solid rgba(212,175,55,0.25);
    background: rgba(5,5,3,0.85);
    backdrop-filter: blur(10px);
}
body.admin-bar .term-nav { top: 32px; }
.nav-inner {
    max-width: 72rem; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-text { font-size: 1.15rem; color: var(--gold-bright); }
@media (max-width: 480px) { .brand-text { display: none; } }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.75rem; font-size: 1.05rem; }
.menu-list a { color: var(--gold); text-decoration: none; padding: 0 0.15rem; transition: background-color 0.15s, color 0.15s; }
.menu-list a:hover { background: rgba(212,175,55,0.15); color: var(--gold-bright); }
.menu-list .current-menu-item a { background: var(--gold); color: var(--ink); }
@media (min-width: 640px) { .menu-list { gap: 1.25rem; font-size: 1.25rem; } .brand-text { font-size: 1.3rem; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4rem 0 5rem; }
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
    pointer-events: none;
}
.hero-access { font-size: 0.8rem; color: var(--gold-dim); animation: fade-in 0.6s ease 0.1s both; }
.hero-title { margin: 2rem 0 0; user-select: none; }
.hero-line { display: block; overflow: hidden; }
.hero-line-inner {
    display: block;
    font-size: clamp(4rem, 19vw, 10.5rem);
    line-height: 0.82;
    color: var(--gold);
    animation: line-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-line-inner.bright { color: var(--gold-bright); }
.hero-line:nth-child(2) .hero-line-inner { animation-delay: 0.16s; }
@keyframes line-up { from { transform: translateY(112%); } to { transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.hero-whoami { margin-top: 2rem; font-size: 0.95rem; animation: fade-in 0.6s ease 0.7s both; }
.hero-whoami #whoami-typed { color: var(--gold-bright); }
.hero-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; animation: fade-in 0.6s ease 0.95s both; }
.ascii-cow {
    margin-top: 3.5rem;
    color: var(--gold-bright);
    font-size: clamp(0.55rem, 2.2vw, 1rem);
    line-height: 1.15;
    text-shadow: 0 0 14px rgba(255,217,104,0.4);
    user-select: none;
}
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float-slow { animation: float-y 5.5s ease-in-out infinite; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid rgba(212,175,55,0.22); border-bottom: 1px solid rgba(212,175,55,0.22); background: var(--panel); }
.marquee-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-chunk { white-space: nowrap; padding: 0.9rem 0; font-size: 1.6rem; color: rgba(212,175,55,0.8); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (min-width: 640px) { .marquee-chunk { font-size: 1.9rem; } }

/* ---------- Home directory listing ---------- */
.home-dirs { padding-top: 5rem; padding-bottom: 5rem; }
.prompt { font-size: 0.85rem; color: var(--gold-dim); margin: 0 0 1.25rem; }
.dir-list { border: 1px solid rgba(212,175,55,0.25); }
.dir-row {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(212,175,55,0.15);
    transition: background-color 0.15s;
}
.dir-row:last-child { border-bottom: none; }
.dir-row:hover { background: rgba(212,175,55,0.1); }
.dir-perms { display: none; font-size: 0.75rem; color: var(--gold-faint); }
.dir-name { font-size: 1.35rem; color: var(--gold-bright); }
.dir-desc { display: none; font-size: 0.85rem; color: var(--gold-dim); }
.dir-arrow { font-family: 'VT323', monospace; font-size: 1.25rem; color: var(--gold); transition: transform 0.15s; }
.dir-row:hover .dir-arrow { transform: translateX(4px); }
@media (min-width: 640px) {
    .dir-row { grid-template-columns: 9rem 10rem 1fr auto; padding: 1rem 1.5rem; }
    .dir-perms, .dir-desc { display: block; }
    .dir-name { font-size: 1.5rem; }
}
.status-strip {
    margin-top: 4rem;
    display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem;
    border: 1px solid rgba(212,175,55,0.25); background: var(--panel);
    padding: 1.25rem 1.5rem;
    font-size: 0.85rem; color: var(--gold-dim);
}
.status-strip strong { color: var(--gold-bright); font-weight: 500; }
.status-strip em { color: var(--gold); font-style: normal; }

/* ---------- Generic page ---------- */
.page-body { padding-top: 4rem; padding-bottom: 6rem; }
.page-title { font-size: clamp(3rem, 9vw, 4.5rem); line-height: 0.9; color: var(--gold-bright); margin: 1rem 0 2rem; font-weight: 400; }
.section-title { font-size: clamp(2.25rem, 7vw, 3.75rem); line-height: 0.9; color: var(--gold-bright); margin: 1rem 0 2.5rem; font-weight: 400; }
.page-intro { max-width: 36rem; font-size: 0.95rem; color: rgba(212,175,55,0.85); }
.count-line { font-size: 0.85rem; margin-bottom: 2rem; }
.content-area { font-size: 0.95rem; line-height: 1.8; color: rgba(212,175,55,0.9); }
.content-area a { text-decoration: underline; text-underline-offset: 3px; }
.content-area img { max-width: 100%; height: auto; border: 1px solid rgba(212,175,55,0.25); }
.content-area h1, .content-area h2, .content-area h3 { color: var(--gold-bright); font-family: 'VT323', monospace; font-weight: 400; }
.about-frame { border-left: 2px solid rgba(212,175,55,0.4); padding-left: 1.5rem; }

/* ---------- Skills table (about) ---------- */
.skills-table { border: 1px solid rgba(212,175,55,0.25); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.skills-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1rem; }
.skills-name { font-size: 0.9rem; color: var(--gold); }
.skill-bar {
    font-family: 'VT323', monospace;
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: var(--gold-bright);
    text-shadow: 0 0 8px rgba(255,217,104,0.35);
}
.skills-score { display: none; font-size: 0.75rem; text-align: right; }
@media (min-width: 640px) {
    .skills-row { grid-template-columns: 14rem 1fr 3rem; }
    .skills-score { display: block; }
}

/* ---------- Facts table (about) ---------- */
.facts-table { border: 1px solid rgba(212,175,55,0.25); margin-top: 1.25rem; }
.facts-row { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 0.75rem 1.5rem; font-size: 0.9rem; border-bottom: 1px solid rgba(212,175,55,0.15); }
.facts-row:last-child { border-bottom: none; }

/* ---------- Dev log (blog) ---------- */
.log-list { display: flex; flex-direction: column; gap: 1rem; }
.log-entry { border: 1px solid rgba(212,175,55,0.25); background: var(--panel); }
.log-entry summary {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    transition: background-color 0.15s;
}
.log-entry summary::-webkit-details-marker { display: none; }
.log-entry summary:hover { background: rgba(212,175,55,0.1); }
.log-id { font-family: 'VT323', monospace; font-size: 1.15rem; color: var(--gold-faint); }
.log-title { font-size: 0.95rem; color: var(--gold-bright); }
.log-date { font-size: 0.75rem; color: var(--gold-dim); }
.log-entry[open] .log-id { color: var(--gold); }
.log-body { border-top: 1px solid rgba(212,175,55,0.15); padding: 1.25rem 1.5rem; font-size: 0.9rem; line-height: 1.8; color: rgba(212,175,55,0.85); }
.log-body p { margin: 0 0 1rem; }
.log-pagination { margin-top: 2.5rem; font-size: 0.9rem; }
.log-pagination .page-numbers { padding: 0.25rem 0.6rem; border: 1px solid rgba(212,175,55,0.25); margin-right: 0.35rem; text-decoration: none; }
.log-pagination .page-numbers.current { background: var(--gold); color: var(--ink); }

/* ---------- Projects ---------- */
.project-grid { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 640px) { .project-grid { grid-template-columns: 1fr 1fr; } }
.project-card {
    height: 100%;
    border: 1px solid rgba(212,175,55,0.25); background: var(--panel);
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(212,175,55,0.6); box-shadow: 0 0 30px rgba(212,175,55,0.12); }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.project-name { font-size: 1.5rem; color: var(--gold-bright); }
.project-status { border: 1px solid rgba(212,175,55,0.4); padding: 0.15rem 0.5rem; font-size: 0.62rem; letter-spacing: 0.15em; color: var(--gold-dim); white-space: nowrap; }
.project-desc { margin-top: 1rem; font-size: 0.88rem; color: rgba(212,175,55,0.75); }
.project-access { margin-top: 1.5rem; font-family: 'VT323', monospace; font-size: 1.1rem; color: var(--gold-faint); transition: color 0.15s; }
.project-card:hover .project-access { color: var(--gold); }

.social-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .social-grid { grid-template-columns: repeat(3, 1fr); } }
.social-card {
    display: block;
    border: 1px solid rgba(212,175,55,0.25); background: var(--panel);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--gold);
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.social-card:hover { transform: translateY(-4px); border-color: var(--gold); background: rgba(212,175,55,0.1); box-shadow: 0 0 30px rgba(212,175,55,0.15); }
.social-top { display: flex; align-items: center; justify-content: space-between; color: var(--gold); }
.social-arrow { transition: transform 0.2s; }
.social-card:hover .social-arrow { transform: translate(2px, -2px); }
.social-name { margin: 1.5rem 0 0; font-size: 1.3rem; color: var(--gold-bright); }
.social-handle { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--gold); }
.social-desc { margin: 0.75rem 0 0; font-size: 0.75rem; color: var(--gold-dim); }

/* ---------- Footer ---------- */
.term-footer { border-top: 1px solid rgba(212,175,55,0.25); background: var(--panel); }
.footer-inner {
    max-width: 72rem; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
    padding: 2.5rem 1.25rem;
    font-family: 'VT323', monospace; font-size: 1.1rem; color: var(--gold-dim);
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-socials { display: flex; gap: 1.5rem; }
.footer-socials a { color: var(--gold); transition: transform 0.15s, color 0.15s; }
.footer-socials a:hover { transform: translateY(-4px); color: var(--gold-bright); }
.footer-exit { color: var(--gold-faint); }
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; } }

/* ---------- Scroll reveals ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .marquee-track, .float-slow, .crt-beam, .crt-scanlines { animation: none; }
    .hero-line-inner { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
