@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Orbitron:wght@400;700;900&family=IM+Fell+English:ital@0;1&family=Cinzel:wght@400;700;900&display=swap');

/* CYBER  V1  — Purple / violet */

[data-theme="cyber"][data-sub="1"] {
    --primary:    #7b6fff;
    --bright:     #c4beff;
    --dim:        #3a3470;
    --bg:         #05040f;
    --grid:       #0d0b1e;
    --scan:       rgba(123,111,255,0.03);
    --glow:       0 0 14px rgba(123,111,255,0.75), 0 0 40px rgba(123,111,255,0.2);
    --glow-sm:    0 0 8px rgba(123,111,255,0.6);
    --ok:         #4dffb8;
    --warn:       #ff6b6b;
    --photo-tint: rgba(100,90,255,0.18);
    --card-bg:    rgba(5,4,15,0.96);
    --link-bg:    rgba(123,111,255,0.08);
    --body-font:  'Share Tech Mono', monospace;
    --title-font: 'Orbitron', sans-serif;
    --field-font: 'VT323', monospace;
}

/* ════════════════════════════════════════════════
CYBER  V2  — Matrix green
════════════════════════════════════════════════ */
[data-theme="cyber"][data-sub="2"] {
    --primary:    #00ff41;
    --bright:     #b8ffcc;
    --dim:        #0a3318;
    --bg:         #000902;
    --grid:       transparent;
    --scan:       transparent;
    --glow:       0 0 10px rgba(0,255,65,0.55), 0 0 30px rgba(0,255,65,0.12);
    --glow-sm:    0 0 6px rgba(0,255,65,0.45);
    --ok:         #00ff41;
    --warn:       #ff3030;
    --photo-tint: rgba(0,180,50,0.2);
    --card-bg:    rgba(0,8,2,0.97);
    --link-bg:    rgba(0,255,65,0.06);
    --body-font:  'Share Tech Mono', monospace;
    --title-font: 'Orbitron', sans-serif;
    --field-font: 'VT323', monospace;
}

/* ════════════════════════════════════════════════
GOTHIC  — Dark Souls / stone & iron (brightened)
════════════════════════════════════════════════ */
[data-theme="gothic"] {
    --primary:    #c8a060;
    --bright:     #e8d8b8;
    --dim:        #6a5840;
    --bg:         #100e0b;
    --grid:       transparent;
    --scan:       transparent;
    --glow:       none;
    --glow-sm:    none;
    --ok:         #a08858;
    --warn:       #a03030;
    --photo-tint: rgba(60,40,20,0.25);
    --card-bg:    rgba(18,14,9,0.99);
    --link-bg:    rgba(200,160,96,0.08);
    --body-font:  'IM Fell English', serif;
    --title-font: 'Cinzel', serif;
    --field-font: 'IM Fell English', serif;
}

/* ════════════════════════════════════════════════
BASE RESET
════════════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
    background: var(--bg);
    color: var(--bright);
    font-family: var(--body-font);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.5s, color 0.4s;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        var(--scan) 2px, var(--scan) 4px
        );
    pointer-events: none;
    z-index: 9999;
}

#grain {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9998;
    opacity: 0; transition: opacity 0.5s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23g)' opacity='0.12'/%3E%3C/svg%3E");
}
[data-theme="gothic"] #grain { opacity: 1; }

#grid-bg {
    position: fixed; inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1; pointer-events: none; transition: opacity 0.5s;
}
[data-theme="cyber"][data-sub="2"] #grid-bg,
[data-theme="gothic"] #grid-bg { opacity: 0; }

/* matrix rain canvas */
#matrix-canvas {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
    opacity: 0; transition: opacity 0.8s;
}
[data-theme="cyber"][data-sub="2"] #matrix-canvas { opacity: 1; }

/* ════════════════════════════════════════════════
BOOT
════════════════════════════════════════════════ */
#boot {
    position: fixed; inset: 0;
    background: var(--bg); z-index: 1000;
    display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    padding: 10vw; overflow: hidden;
}
#boot.fade-out { animation: bootFade 0.8s ease forwards; }
@keyframes bootFade { to { opacity:0; pointer-events:none; } }

.boot-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(11px,1.4vw,13px);
    color: var(--primary); opacity:0; margin-bottom:5px; white-space:nowrap;
}
.boot-line.active { animation: lineIn 0.04s forwards; }
@keyframes lineIn { to { opacity:1; } }
.boot-line.ok::after   { content:' [OK]';  color:var(--ok); }
.boot-line.warn::after { content:' [!!]';  color:var(--warn); }

.boot-bar-wrap { margin-top:18px; width:min(400px,65vw); opacity:0; transition:opacity 0.3s; }
.boot-bar-wrap.show { opacity:1; }
.boot-bar-label { font-size:10px; color:var(--dim); letter-spacing:2px; margin-bottom:6px; font-family:'Share Tech Mono',monospace; }
.boot-bar-track { height:2px; background:var(--dim); position:relative; }
.boot-bar-fill  { height:100%; width:0%; background:var(--primary); box-shadow:var(--glow); transition:width 0.05s linear; }
.boot-bar-pct   { position:absolute; right:0; top:6px; font-size:10px; color:var(--primary); font-family:'Share Tech Mono',monospace; }

/* CONTROLS */
#toggle-wrap {
    position: fixed; top:20px; right:20px;
    z-index: 500; opacity:0; transition:opacity 0.5s;
}
#toggle-wrap.show { opacity:1; }

#controls-row { display:flex; align-items:center; gap:6px; }

#theme-toggle {
    display: flex; align-items: center;
    border: 1px solid var(--primary);
    box-shadow: var(--glow-sm);
    overflow: hidden; cursor: pointer;
    transition: border-color 0.5s, box-shadow 0.5s;
}
[data-theme="gothic"] #theme-toggle { border-color:var(--dim); box-shadow:none; }

.tog-half {
    padding: 8px 14px; font-size:10px; letter-spacing:2px;
    transition: background 0.3s, color 0.3s;
    user-select: none; white-space: nowrap;
}
.tog-half.cyber-half  { font-family:'Orbitron',sans-serif; font-size:9px; }
.tog-half.gothic-half { font-family:'Cinzel',serif; font-size:10px; }

[data-theme="cyber"]  .cyber-half  { background:var(--primary); color:#000; }
[data-theme="cyber"]  .gothic-half { background:transparent; color:var(--dim); }
[data-theme="gothic"] .gothic-half { background:var(--primary); color:#1a1510; }
[data-theme="gothic"] .cyber-half  { background:transparent; color:var(--dim); }

.tog-divider { width:1px; background:var(--dim); align-self:stretch; transition:background 0.5s; }

/* sub buttons — only show on cyber */
#sub-toggle { display:flex; gap:3px; }
[data-theme="gothic"] #sub-toggle { display:none; }

.sub-btn {
    width:26px; height:26px;
    border:1px solid var(--dim); background:transparent; color:var(--dim);
    font-family:'Orbitron',sans-serif; font-size:8px; letter-spacing:1px;
    cursor:pointer; transition:all 0.25s;
    display:flex; align-items:center; justify-content:center;
}
.sub-btn.active { border-color:var(--primary); color:var(--primary); box-shadow:var(--glow-sm); }
.sub-btn:hover:not(.active) { border-color:var(--bright); color:var(--bright); }

/* LAYOUT VISIBILITY */
/* #main       = cyber V1 + gothic */
/* #main-matrix= cyber V2 */
#main {
    opacity:0; min-height:100vh;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:40px 20px 70px; transition:opacity 0.6s ease; position:relative; z-index:1;
}
#main.visible { opacity:1; }

#main-matrix {
    opacity:0; min-height:100vh;
    display:none; flex-direction:column; align-items:center; justify-content:center;
    padding:40px 20px 60px; position:relative; z-index:1;
}
#main-matrix.visible { opacity:1; display:flex; }

/* CARD — shared */
.card {
    max-width:720px; width:100%; position:relative;
    background:var(--card-bg); transition:all 0.5s;
}

[data-theme="cyber"][data-sub="1"] .card {
    border:1px solid var(--primary);
    box-shadow:var(--glow), inset 0 0 80px rgba(0,0,0,0.5);
}
[data-theme="cyber"][data-sub="1"] .card::before,
[data-theme="cyber"][data-sub="1"] .card::after {
    content:''; position:absolute; width:18px; height:18px;
    border-color:var(--bright); border-style:solid;
}
[data-theme="cyber"][data-sub="1"] .card::before { top:-2px; left:-2px; border-width:2px 0 0 2px; }
[data-theme="cyber"][data-sub="1"] .card::after  { bottom:-2px; right:-2px; border-width:0 2px 2px 0; }

.cc1,.cc2 { display:none; }
[data-theme="cyber"][data-sub="1"] .cc1,
[data-theme="cyber"][data-sub="1"] .cc2 {
    display:block; position:absolute; width:18px; height:18px;
    border-color:var(--bright); border-style:solid;
}
[data-theme="cyber"][data-sub="1"] .cc1 { top:-2px; right:-2px; border-width:2px 2px 0 0; }
[data-theme="cyber"][data-sub="1"] .cc2 { bottom:-2px; left:-2px; border-width:0 0 2px 2px; }

/* gothic card — stone slab */
[data-theme="gothic"] .card {
    border:1px solid #5a4a32;
    box-shadow:
        0 0 0 3px #1e1a12, 0 0 0 4px #4a3c28, 0 0 0 7px #0e0c08,
        inset 0 0 120px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(200,160,96,0.08);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(50,38,18,0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(20,15,8,0.6) 0%, transparent 55%),
        repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(30,22,12,0.15) 4px, rgba(30,22,12,0.15) 5px),
        var(--card-bg);
}

.rivet { display:none; }
[data-theme="gothic"] .rivet {
    display:block; position:absolute;
    width:12px; height:12px; border-radius:50%; z-index:4;
    background:radial-gradient(circle at 30% 30%, #9a8060, #221c10);
    box-shadow:0 0 0 1px #0a0806, 0 1px 3px rgba(0,0,0,0.9), inset 0 1px 1px rgba(200,160,90,0.12);
}
.rivet-tl { top:10px;    left:10px; }
.rivet-tr { top:10px;    right:10px; }
.rivet-bl { bottom:10px; left:10px; }
.rivet-br { bottom:10px; right:10px; }

/* CARD HEADER */
.card-header {
    border-bottom:1px solid var(--dim); padding:9px 16px;
    display:flex; align-items:center; justify-content:space-between;
    font-size:10px; color:var(--dim); transition:border-color 0.5s, background 0.5s;
}
[data-theme="gothic"] .card-header {
    background:linear-gradient(180deg,rgba(60,45,20,0.6) 0%,rgba(20,15,8,0.3) 100%);
    border-bottom:1px solid #4a3820; padding:12px 20px;
}

.card-header .subject {
    font-family:var(--title-font); font-weight:900; font-size:13px;
    color:var(--bright); letter-spacing:3px; text-shadow:var(--glow-sm);
    transition:all 0.5s;
}
[data-theme="gothic"] .card-header .subject {
    letter-spacing:6px; font-size:13px; color:#d0b880; text-shadow:none; font-weight:400;
}

.dots { display:flex; gap:5px; }
.dot  { width:8px; height:8px; border-radius:50%; }
.dot:nth-child(1){background:#ff5f57;}
.dot:nth-child(2){background:#febc2e;}
.dot:nth-child(3){background:#28c840;}
[data-theme="gothic"] .dots { display:none; }

.gothic-crest { display:none; font-size:18px; color:#6a5838; }
[data-theme="gothic"] .gothic-crest { display:block; }

/* CARD BODY */
.card-body { display:grid; grid-template-columns:1fr 1.1fr; }

.photo-section {
    border-right:1px solid var(--dim); padding:20px;
    display:flex; flex-direction:column; align-items:center; gap:12px;
    transition:border-color 0.5s;
}
[data-theme="gothic"] .photo-section {
    border-right:1px solid #4a3820;
    background:linear-gradient(135deg,rgba(30,22,10,0.4) 0%,transparent 60%);
}

.photo-frame {
    position:relative; width:100%; max-width:240px; aspect-ratio:3/4;
    overflow:hidden; border:1px solid var(--primary); transition:border-color 0.5s, box-shadow 0.5s;
}
[data-theme="gothic"] .photo-frame {
    border:1px solid #5a4a2a;
    box-shadow:0 0 0 2px #0e0c08, 0 0 0 3px #3a2e1a, inset 0 0 40px rgba(0,0,0,0.65);
}

.photo-frame img {
    width:100%; height:100%; object-fit:cover; object-position:top center;
    filter:grayscale(55%) contrast(1.15) brightness(0.8); display:block; transition:filter 0.5s;
}
[data-theme="gothic"] .photo-frame img {
    filter:grayscale(70%) sepia(25%) contrast(1.15) brightness(0.72);
}

.photo-tint {
    position:absolute; inset:0; background:var(--photo-tint);
    mix-blend-mode:color; pointer-events:none; z-index:1; transition:background 0.5s;
}
[data-theme="gothic"] .photo-tint { mix-blend-mode:multiply; }

.scan-sweep {
    position:absolute; left:0; right:0; height:3px;
    background:linear-gradient(90deg,transparent,var(--primary),transparent);
    top:0; animation:sweep 3.5s linear infinite;
    box-shadow:0 0 10px var(--primary); pointer-events:none; z-index:2;
}
@keyframes sweep {
0%  {top:0%;  opacity:0;} 4%{opacity:1;} 96%{opacity:1;} 100%{top:100%;opacity:0;}
}

.gothic-vignette {
    position:absolute; inset:0; pointer-events:none; z-index:2; opacity:0; transition:opacity 0.5s;
}
[data-theme="gothic"] .gothic-vignette {
    opacity:1;
    background:radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.75) 100%);
}

.fc {
    position:absolute; width:14px; height:14px;
    border-color:var(--bright); border-style:solid; z-index:3; transition:opacity 0.5s;
}
.fc-tl{top:4px;   left:4px;  border-width:2px 0 0 2px;}
.fc-tr{top:4px;   right:4px; border-width:2px 2px 0 0;}
.fc-bl{bottom:4px;left:4px;  border-width:0 0 2px 2px;}
.fc-br{bottom:4px;right:4px; border-width:0 2px 2px 0;}
[data-theme="gothic"] .fc { opacity:0; }

.gothic-ornament {
    position:absolute; width:20px; height:20px; z-index:3; opacity:0; transition:opacity 0.5s;
    background:linear-gradient(135deg, #6a5838, #1e1a10);
    box-shadow:inset 0 1px 1px rgba(200,160,80,0.1), 0 1px 3px rgba(0,0,0,0.9);
}
.go-tl{top:-1px;    left:-1px;  clip-path:polygon(0 0,100% 0,0 100%);}
.go-tr{top:-1px;    right:-1px; clip-path:polygon(0 0,100% 0,100% 100%);}
.go-bl{bottom:-1px; left:-1px;  clip-path:polygon(0 0,0 100%,100% 100%);}
.go-br{bottom:-1px; right:-1px; clip-path:polygon(100% 0,100% 100%,0 100%);}
[data-theme="gothic"] .gothic-ornament { opacity:1; }

.photo-label {
    font-size:9px; color:var(--dim); letter-spacing:2px; text-align:center;
    width:100%; border-top:1px solid var(--dim); padding-top:8px;
    font-family:var(--body-font); transition:color 0.5s, border-color 0.5s;
}
[data-theme="gothic"] .photo-label {
    font-family:'Cinzel',serif; font-size:8px; letter-spacing:4px;
    border-top:1px solid #4a3820; color:#7a6848;
}

/* INFO FIELDS */
.info-section { padding:4px 16px; display:flex; flex-direction:column; }

.field {
    display:grid; grid-template-columns:auto 1fr; gap:6px;
    border-bottom:1px solid var(--dim); padding:9px 0; align-items:baseline;
    transition:border-color 0.5s;
}
.field:last-child { border-bottom:none; }
[data-theme="gothic"] .field { border-bottom:1px solid #302818; }

.fl {
    font-size:8.5px; letter-spacing:1.5px; color:var(--dim);
    text-transform:uppercase; padding-top:3px; white-space:nowrap;
    font-family:var(--body-font); transition:color 0.5s;
}
[data-theme="gothic"] .fl { font-family:'Cinzel',serif; font-size:7.5px; letter-spacing:2.5px; color:#6a5838; }

.fv {
    font-family:var(--field-font); font-size:20px; color:var(--bright);
    text-align:right; line-height:1; text-shadow:var(--glow-sm);
    transition:color 0.5s, text-shadow 0.5s;
}
[data-theme="gothic"] .fv { font-size:17px; line-height:1.25; color:#c8b080; text-shadow:none; }

.fv.name-v {
    font-family:var(--title-font); font-size:13px; font-weight:700;
    letter-spacing:2px; animation:glitch 7s infinite;
}
[data-theme="gothic"] .fv.name-v { font-size:12px; font-weight:400; animation:none; letter-spacing:3px; color:#d8c090; }

.fv.bad { color:var(--warn); text-shadow:0 0 8px var(--warn); animation:flicker 4s ease infinite; }
[data-theme="gothic"] .fv.bad { color:#b04040; text-shadow:none; animation:none; }

.fv.unk { color:var(--dim); }

.stars { color:var(--primary); font-size:18px; text-shadow:var(--glow-sm); transition:all 0.5s; }
[data-theme="gothic"] .stars { text-shadow:none; font-size:16px; color:#8a7248; }

@keyframes glitch {
0%,88%,100%{transform:none;clip-path:none;}
89%{transform:translate(-2px,0);clip-path:inset(15% 0 55% 0);}
90%{transform:translate(2px,0); clip-path:inset(65% 0 5% 0);}
91%{transform:none;clip-path:none;}
}
@keyframes flicker {
0%,94%,100%{opacity:1;} 95%{opacity:0.4;} 97%{opacity:0.7;}
}

/* SECTION DIVIDER (gothic) */
.section-divider {
    display:none; text-align:center; font-size:14px; color:#5a4830;
    padding:5px 0; position:relative; z-index:1; letter-spacing:8px;
}
[data-theme="gothic"] .section-divider { display:block; }
.section-divider::before,
.section-divider::after {
    content:''; display:inline-block; height:1px; width:70px;
    vertical-align:middle; margin:0 12px;
}
.section-divider::before { background:linear-gradient(90deg,transparent,#4a3820); }
.section-divider::after  { background:linear-gradient(90deg,#4a3820,transparent); }

.bio-section {
    border-top:1px solid var(--dim); padding:16px 18px;
    transition:border-color 0.5s, background 0.5s;
}
[data-theme="gothic"] .bio-section {
    border-top:1px solid #302818;
    background:linear-gradient(180deg,rgba(28,20,8,0.4) 0%,transparent 100%);
}

.slabel {
    font-size:9px; letter-spacing:3px; color:var(--primary);
    margin-bottom:10px; text-shadow:var(--glow-sm);
    font-family:var(--body-font); transition:all 0.5s;
}
[data-theme="gothic"] .slabel { font-family:'Cinzel',serif; font-size:9px; letter-spacing:5px; color:#8a7248; text-shadow:none; }

.bio-text {
    font-size:12px; line-height:1.85; color:var(--bright); opacity:0.65;
    border-left:2px solid var(--dim); padding-left:12px;
    font-family:var(--body-font); transition:all 0.5s;
}
[data-theme="gothic"] .bio-text {
    font-family:'IM Fell English',serif; font-size:13.5px; font-style:italic;
    line-height:1.7; border-left:1px solid #4a3820; opacity:1; color:#b8a878;
}

.links-section {
    border-top:1px solid var(--dim); padding:16px 18px; transition:border-color 0.5s;
}
[data-theme="gothic"] .links-section { border-top:1px solid #302818; }

.links-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; }

.link-btn {
    display:flex; align-items:center; gap:8px; border:1px solid var(--dim);
    padding:9px 12px; text-decoration:none; color:var(--bright);
    font-family:var(--body-font); font-size:11px; letter-spacing:1px;
    position:relative; overflow:hidden;
    transition:border-color 0.3s,color 0.3s,box-shadow 0.3s,background 0.5s;
}
[data-theme="gothic"] .link-btn {
    border:1px solid #3a2e18;
    background:linear-gradient(180deg,rgba(45,35,15,0.5) 0%,rgba(18,14,7,0.7) 100%);
    font-family:'Cinzel',serif; font-size:9px; letter-spacing:2px; color:#a08858;
}
.link-btn::before {
    content:''; position:absolute; left:-100%; top:0; bottom:0;
    width:100%; background:var(--link-bg); transition:left 0.35s ease;
}
.link-btn:hover::before { left:0; }
.link-btn:hover { border-color:var(--primary); color:var(--bright); box-shadow:var(--glow-sm); }
[data-theme="gothic"] .link-btn:hover {
    border-color:#8a7248; color:#e0c888; box-shadow:none;
    background:linear-gradient(180deg,rgba(65,50,20,0.5) 0%,rgba(35,25,10,0.7) 100%);
}

.li { color:var(--primary); font-size:12px; transition:color 0.5s; }
[data-theme="gothic"] .li { font-size:13px; color:#7a6240; }

.card-footer {
    border-top:1px solid var(--dim); padding:10px 18px;
    display:flex; align-items:center; justify-content:space-between;
    font-size:9px; color:var(--dim); letter-spacing:2px;
    font-family:var(--body-font); transition:all 0.5s;
}
[data-theme="gothic"] .card-footer {
    border-top:1px solid #302818;
    background:linear-gradient(0deg,rgba(15,10,5,0.6) 0%,transparent 100%);
    font-family:'Cinzel',serif; font-size:8px; letter-spacing:4px; color:#5a4830;
}

.wsvg { height:20px; width:160px; }
.wp   { stroke:var(--dim); transition:stroke 0.5s; }
[data-theme="gothic"] .wsvg { display:none; }

.gothic-footer-ornament { display:none; }
[data-theme="gothic"] .gothic-footer-ornament { display:block; font-size:16px; color:#5a4830; letter-spacing:10px; }

.status-bar {
    margin-top:22px; font-size:10px; color:var(--dim); letter-spacing:2px;
    display:flex; gap:14px; align-items:center;
    font-family:var(--body-font); transition:all 0.5s;
}
[data-theme="gothic"] .status-bar { font-family:'Cinzel',serif; font-size:8px; letter-spacing:4px; color:#5a4830; }

.sdot {
    width:6px; height:6px; border-radius:50%;
    background:var(--ok); box-shadow:0 0 6px var(--ok);
    animation:pulse 2s ease infinite; transition:background 0.5s,box-shadow 0.5s;
}
[data-theme="gothic"] .sdot { box-shadow:none; background:#6a5838; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.visitor-counter {
    display: flex;
    margin-top: 14px;
    align-items: center;
    gap: 12px;
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--dim);
    font-family: var(--body-font);
    transition: all 0.5s;
}

[data-theme="gothic"] .visitor-counter {
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: 4px;
    color: #5a4830;
}

.vc-label {
    color: var(--dim);
    transition: color 0.5s;
}
[data-theme="gothic"] .vc-label { color: #4a3820; }

.vc-count {
    font-family: var(--field-font);
    font-size: 20px;
    color: var(--primary);
    letter-spacing: 3px;
    text-shadow: var(--glow-sm);
    border-bottom: 1px solid var(--dim);
    padding-bottom: 2px;
    min-width: 60px;
    text-align: center;
    transition: all 0.5s;
}
[data-theme="gothic"] .vc-count {
    font-family: 'IM Fell English', serif;
    font-size: 18px;
    color: #c8a060;
    text-shadow: none;
    border-bottom: 1px solid #4a3820;
}

#flash {
    position:fixed; inset:0; pointer-events:none; z-index:9997;
    opacity:0; background:var(--primary); transition:opacity 0.07s;
}
#flash.pop { opacity:0.05; }

/* MATRIX V2 LAYOUT */

#main-matrix {
    font-family:'Share Tech Mono',monospace;
}

.mx-container {
    display:grid;
    grid-template-columns:280px 1fr;
    gap:0;
    max-width:820px; width:100%;
    border:1px solid #00ff41;
    box-shadow:0 0 20px rgba(0,255,65,0.2), 0 0 60px rgba(0,255,65,0.05), inset 0 0 80px rgba(0,0,0,0.7);
    background:rgba(0,6,1,0.97);
    position:relative;
}

/* container corners */
.mx-container::before,
.mx-container::after {
    content:''; position:absolute; width:20px; height:20px;
    border-color:#00ff41; border-style:solid;
}
.mx-container::before { top:-2px; left:-2px; border-width:2px 0 0 2px; }
.mx-container::after  { bottom:-2px; right:-2px; border-width:0 2px 2px 0; }

/* ── LEFT PANEL ── */
.mx-left {
    border-right:1px solid #0a3318;
    display:flex; flex-direction:column; gap:0;
    background:linear-gradient(180deg,rgba(0,20,5,0.5) 0%,rgba(0,8,2,0.8) 100%);
}

.mx-photo-wrap {
    position:relative; width:100%; aspect-ratio:3/5;
    overflow:hidden; border-bottom:1px solid #0a3318;
}

.mx-photo-wrap img {
    width:100%; height:100%; object-fit:cover; object-position:top center;
    filter:grayscale(40%) contrast(1.2) brightness(0.75) hue-rotate(90deg);
    display:block;
}

/* green tint overlay */
.mx-photo-wrap::after {
    content:''; position:absolute; inset:0;
    background:rgba(0,80,20,0.25); mix-blend-mode:color; pointer-events:none;
}

/* animated scan line */
.mx-scan {
    position:absolute; left:0; right:0; height:2px;
    background:linear-gradient(90deg,transparent,#00ff41,transparent);
    top:0; animation:sweep 3s linear infinite;
    box-shadow:0 0 8px #00ff41; pointer-events:none; z-index:2;
}

/* corner marks */
.mx-corner {
    position:absolute; width:12px; height:12px;
    border-color:#00ff41; border-style:solid; z-index:3;
}
.mx-tl { top:6px;    left:6px;   border-width:1px 0 0 1px; }
.mx-tr { top:6px;    right:6px;  border-width:1px 1px 0 0; }
.mx-bl { bottom:6px; left:6px;   border-width:0 0 1px 1px; }
.mx-br { bottom:6px; right:6px;  border-width:0 1px 1px 0; }

/* glitch bar on photo */
.mx-glitch-bar {
    position:absolute; left:0; right:0;
    height:3px; background:#00ff41; opacity:0;
    animation:glitch-bar 6s infinite;
    pointer-events:none; z-index:3;
}
@keyframes glitch-bar {
0%,90%,100%{opacity:0;top:0;}
91%{opacity:0.4;top:30%;}
92%{opacity:0;top:30%;}
94%{opacity:0.2;top:65%;}
95%{opacity:0;}
}

/* terminal bio */
.mx-terminal-bio {
    padding:14px 14px 16px;
    font-size:11px; line-height:1.7;
    color:#4dffb8; flex:1;
    border-top:0;
}
.mx-prompt { color:#00ff41; }
.mx-cmd    { color:#b8ffcc; }
.mx-output { margin-top:8px; color:#4dffb8; font-size:10.5px; line-height:1.8; }
.mx-output div { padding:1px 0; }
.mx-cursor {
    display:inline-block; color:#00ff41;
    animation:cur 1s step-end infinite;
    margin-top:6px;
}
@keyframes cur { 50%{opacity:0;} }

/* ── RIGHT PANEL ── */
.mx-right {
    display:flex; flex-direction:column; gap:0;
}

.mx-header {
    padding:18px 20px 14px;
    border-bottom:1px solid #0a3318;
    background:linear-gradient(180deg,rgba(0,25,8,0.6) 0%,transparent 100%);
}

.mx-tag {
    font-size:9px; color:#0a3318; letter-spacing:3px; margin-bottom:6px;
    color:#1a6630;
}

.mx-name {
    font-family:'Orbitron',sans-serif; font-size:18px; font-weight:900;
    color:#00ff41; letter-spacing:2px;
    text-shadow:0 0 20px rgba(0,255,65,0.4);
    animation:name-glitch 8s infinite;
}
@keyframes name-glitch {
0%,87%,100%{transform:none;clip-path:none;}
88%{transform:translate(-2px,0);clip-path:inset(10% 0 60% 0);}
89%{transform:translate(2px,0); clip-path:inset(70% 0 5% 0);}
90%{transform:none;clip-path:none;}
}

.mx-sub {
    font-size:9px; color:#1a6630; letter-spacing:2px; margin-top:6px;
}

.mx-bio-panel {
    padding:14px 20px;
    border-bottom:1px solid #0a3318;
    flex:1;
}

.mx-panel-label {
    font-size:9px; color:#00ff41; letter-spacing:2px;
    margin-bottom:8px; text-shadow:0 0 6px rgba(0,255,65,0.4);
}

.mx-bio-panel p {
    font-size:11px; line-height:1.8; color:#4dffb8; opacity:0.8;
    border-left:1px solid #0a3318; padding-left:10px;
}

.mx-links-panel {
    padding:14px 20px;
    border-bottom:1px solid #0a3318;
}

.mx-links {
    display:grid; grid-template-columns:1fr 1fr; gap:5px;
}

.mx-link {
    display:flex; align-items:center; gap:8px;
    text-decoration:none; color:#4dffb8;
    font-size:10px; letter-spacing:1px; padding:5px 6px;
    border:1px solid transparent;
    transition:border-color 0.2s, color 0.2s, background 0.2s;
    position:relative; overflow:hidden;
}
.mx-link span { color:#0a4a20; font-size:9px; min-width:16px; }
.mx-link:hover { border-color:#00ff41; color:#00ff41; background:rgba(0,255,65,0.04); }
.mx-link:hover span { color:#00ff41; }

.mx-footer {
    padding:10px 20px;
    display:flex; align-items:center; gap:10px;
    font-size:9px; color:#0a3318; letter-spacing:2px;
}

/* matrix status bar */
.mx-status { margin-top:18px; }

/* RESPONSIVE */

@media (max-width:640px) {
    .card-body { grid-template-columns:1fr; }
    .photo-section { border-right:none; border-bottom:1px solid var(--dim); }
    [data-theme="gothic"] .photo-section { border-bottom:1px solid #4a3820; }
    .photo-frame { max-width:200px; }
    #toggle-wrap { top:auto; bottom:20px; right:50%; transform:translateX(50%); }
    .mx-container { grid-template-columns:1fr; }
    .mx-left { border-right:none; border-bottom:1px solid #0a3318; }
    .mx-photo-wrap { aspect-ratio:4/3; max-height:220px; }
    .mx-links { grid-template-columns:1fr; }
}
