/* ═══════════════════════════════════════════════════════════
   THE CIRCUIT BREAKER — portfolio theme
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg:        #0f1113;
    --panel:     #171a1e;
    --panel-2:   #1f2328;
    --line:      #2b3036;
    --line-2:    #3a4048;
    --text:      #e9e6dd;
    --muted:     #959ca5;
    --live:      #ffb000;
    --live-soft: rgba(255, 176, 0, .14);
    --copper:    #c9783c;
    --copper-2:  #f0a467;
    --green:     #38d67f;
    --red:       #ff4b3a;
    --tape:      #efe8d3;
    --tape-ink:  #1d1b16;
    --plastic:   #e7e4db;
    --plastic-2: #cfcbc0;

    --f-head: "Barlow Condensed", "Arial Narrow", sans-serif;
    --f-body: "Barlow", system-ui, sans-serif;
    --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --radius: 6px;
    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --bar-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); }

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(255, 176, 0, .07), transparent 60%),
        linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--bg);
    color: var(--text);
    font: 400 17px/1.65 var(--f-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--live); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; border-radius: 3px; }

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--live); color: #000; padding: 8px 14px; border-radius: 4px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ─── Shared bits ─────────────────────────────────────────── */

.tape {
    display: inline-block;
    background: var(--tape);
    color: var(--tape-ink);
    font: 700 12px/1 var(--f-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 7px 10px 6px;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(0,0,0,.4);
    transform: rotate(-.6deg);
}

.led {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 2px #0006, 0 0 10px var(--live), 0 0 22px rgba(255,176,0,.5);
    flex: none;
    transition: background .3s, box-shadow .3s;
}
.led--green { background: var(--green); box-shadow: 0 0 0 2px #0006, 0 0 10px var(--green); }
.led--red   { background: var(--red);   box-shadow: 0 0 0 2px #0006, 0 0 10px var(--red); }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 22px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    color: var(--text);
    font: 600 15px/1 var(--f-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--panel-2);
    transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { text-decoration: none; border-color: var(--live); transform: translateY(-1px); }
.btn--live {
    background: var(--live); color: #111; border-color: var(--live);
    box-shadow: 0 6px 24px rgba(255,176,0,.25);
}
.btn--live:hover { background: #ffc233; }

/* ─── Panel bar / navigation ──────────────────────────────── */

.panel-bar {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    height: var(--bar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 var(--gutter);
    background: rgba(18, 20, 23, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__fuse {
    flex: none;
    display: grid; place-items: center;
    width: 46px; height: 30px;
    font: 700 14px/1 var(--f-mono);
    color: var(--tape-ink);
    background: linear-gradient(90deg, #b9b9b9 0 7px, var(--tape) 7px calc(100% - 7px), #b9b9b9 calc(100% - 7px));
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px #0004;
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__text strong { font: 600 18px/1.1 var(--f-head); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.brand__text small { font: 500 11px/1.4 var(--f-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.din-rail {
    display: flex; gap: 4px;
    padding: 6px 8px;
    background:
        linear-gradient(#0000 44%, #555b63 44% 56%, #0000 56%),
        #0c0e10;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.mcb {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    width: 64px;
    color: var(--muted);
}
.mcb:hover { text-decoration: none; color: var(--text); }
.mcb__num { font: 700 9px/1 var(--f-mono); letter-spacing: .1em; }
.mcb__body {
    position: relative;
    width: 26px; height: 30px;
    background: linear-gradient(var(--plastic), var(--plastic-2));
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px #0003, 0 2px 0 #0007;
}
.mcb__body::before { /* handle slot */
    content: ""; position: absolute; left: 50%; top: 5px; bottom: 5px; width: 10px;
    transform: translateX(-50%);
    background: #2a2a2a; border-radius: 2px;
}
.mcb__handle {
    position: absolute; left: 50%; top: 13px;
    width: 8px; height: 11px;
    transform: translateX(-50%);
    background: #444; border-radius: 1px;
    transition: top .25s cubic-bezier(.5, 1.6, .5, 1), background .25s;
}
.mcb__label { font: 600 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }

.mcb.is-active { color: var(--live); }
.mcb.is-active .mcb__handle { top: 6px; background: var(--live); box-shadow: 0 0 8px var(--live); }

/* ─── Layout ──────────────────────────────────────────────── */

main { transition: filter .7s ease; }

.hero,
.circuit {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(var(--bar-h) + 48px);
    padding-bottom: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
}

.hero__name {
    margin: 22px 0 10px;
    font-size: clamp(56px, 10vw, 128px);
    font-weight: 700;
    line-height: .9;
    text-transform: uppercase;
    letter-spacing: -.005em;
}
.hero__title {
    display: flex; align-items: center; gap: 12px;
    font: 500 clamp(16px, 2vw, 20px)/1.2 var(--f-mono);
    color: var(--live);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 26px;
}
.live-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--live); box-shadow: 0 0 12px var(--live);
    animation: pulse 1.6s ease-in-out infinite;
}
.hero__tagline { max-width: 34ch; font-size: clamp(18px, 2.2vw, 22px); color: #c9c6be; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 26px; }
.avail { display: flex; align-items: center; gap: 10px; font: 500 13px/1 var(--f-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* Enclosure with main breaker */
.enclosure {
    position: relative;
    width: 280px;
    padding: 28px 28px 22px;
    background: linear-gradient(160deg, #3a3f46, #23272c 40%, #1a1d21);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        inset 0 0 0 1px rgba(0,0,0,.6),
        0 30px 60px -20px rgba(0,0,0,.8),
        0 0 0 1px #0008;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.enclosure__screws i {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #9aa0a7, #4a4f55 70%);
    box-shadow: inset 0 0 0 1px #0007;
}
.enclosure__screws i::after { content: ""; position: absolute; inset: 5px 2px; background: #2a2d31; transform: rotate(35deg); }
.enclosure__screws i:nth-child(1) { top: 10px; left: 10px; }
.enclosure__screws i:nth-child(2) { top: 10px; right: 10px; }
.enclosure__screws i:nth-child(3) { bottom: 10px; left: 10px; }
.enclosure__screws i:nth-child(4) { bottom: 10px; right: 10px; }

.meter {
    width: 100%;
    padding: 12px 16px;
    background: #0a120d;
    border-radius: 6px;
    box-shadow: inset 0 2px 8px #000, 0 0 0 3px #111, 0 0 0 4px #4a5058;
    font-family: var(--f-mono);
}
.meter__row { display: flex; justify-content: space-between; align-items: baseline; }
.meter__row span { font-size: 11px; color: #3f6b4f; letter-spacing: .1em; }
.meter__row b {
    font-size: 22px; font-weight: 500; color: #7dffad;
    text-shadow: 0 0 8px rgba(125,255,173,.6);
    letter-spacing: .06em;
    transition: color .4s, text-shadow .4s;
}

.main-breaker {
    position: relative;
    width: 140px;
    padding: 14px 0 18px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(#2b2b2b, #161616);
    box-shadow: inset 0 1px 0 #ffffff1a, 0 0 0 1px #000, 0 10px 20px #0008;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: #cfcfcf;
    font: 700 11px/1 var(--f-mono);
    letter-spacing: .14em;
}
.main-breaker__slot {
    position: relative;
    width: 54px; height: 150px;
    background: linear-gradient(90deg, #070707, #1a1a1a 50%, #070707);
    border-radius: 6px;
    box-shadow: inset 0 3px 8px #000;
}
.main-breaker__handle {
    position: absolute; left: 50%; top: 6px;
    width: 64px; height: 58px;
    transform: translateX(-50%);
    background: linear-gradient(#4a4a4a, #222 60%, #151515);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 #ffffff26, 0 6px 10px #000c;
    transition: top .35s cubic-bezier(.6, 1.7, .5, 1);
}
.main-breaker__handle span {
    position: absolute; inset: 22px 10px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, #0008 0 2px, #ffffff12 2px 4px);
}
.main-breaker__window {
    position: absolute; right: -40px; top: 50%;
    width: 30px; height: 44px;
    transform: translateY(-50%);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 0 2px #333;
    font-size: 9px; letter-spacing: .04em;
}
.main-breaker__window span {
    position: absolute; inset: 3px;
    display: grid; place-items: center;
    border-radius: 2px;
    color: #fff;
    transition: opacity .2s;
}
.w-on  { background: var(--red); }
.w-off { background: #1f8e4f; opacity: 0; }

.enclosure__plate {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    font: 500 10px/1 var(--f-mono); color: #9aa0a7; letter-spacing: .08em;
}
.enclosure__plate span { padding: 5px 6px; border: 1px solid #4a5058; border-radius: 3px; }
.enclosure__hint {
    position: absolute; bottom: -34px; left: 0; right: 0; margin: 0;
    text-align: center;
    font: 500 11px/1 var(--f-mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase;
    opacity: 0; transition: opacity .3s;
}

/* ─── Circuit section headings ────────────────────────────── */

.circuit { padding-top: clamp(72px, 10vw, 128px); padding-bottom: 8px; }

.circuit__head {
    display: flex; align-items: center; gap: 18px;
    margin-bottom: clamp(32px, 5vw, 56px);
}
.circuit__no {
    font: 700 12px/1 var(--f-mono);
    letter-spacing: .14em;
    color: var(--tape-ink);
    background: var(--tape);
    padding: 7px 9px 6px;
    border-radius: 2px;
}
.circuit__head h2 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    text-transform: uppercase;
}
.circuit__wire {
    flex: 1; height: 3px; border-radius: 2px;
    background:
        linear-gradient(90deg, transparent, var(--live) 50%, transparent) -40% 0 / 30% 100% no-repeat,
        linear-gradient(90deg, var(--copper), #7a4a27);
    animation: current 2.6s linear infinite;
}

/* ─── About ───────────────────────────────────────────────── */

.about {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}
.about__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--line-2);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.about__initials {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font: 700 120px/1 var(--f-head);
    color: var(--line-2);
    background:
        repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255,176,0,.05) 18px 36px),
        var(--panel-2);
}
.about__tag {
    position: absolute; left: 12px; bottom: 12px;
    padding: 6px 10px;
    font: 700 11px/1 var(--f-mono); letter-spacing: .1em;
    color: #111;
    background: var(--live);
    border-radius: 2px;
    box-shadow: 0 0 0 2px #111;
}
.about__text p { font-size: 19px; color: #d4d1c9; max-width: 62ch; }

.readouts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 32px;
}
.readout {
    padding: 16px 16px 14px;
    background: #0a120d;
    border-radius: var(--radius);
    box-shadow: inset 0 2px 8px #000, 0 0 0 1px var(--line-2);
}
.readout b {
    display: flex; align-items: baseline; gap: 4px;
    font: 500 36px/1 var(--f-mono);
    color: #7dffad;
    text-shadow: 0 0 10px rgba(125,255,173,.45);
}
.readout b small { font-size: 15px; color: #4fbf7d; }
.readout > span { display: block; margin-top: 8px; font: 500 11px/1.3 var(--f-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ─── Skills board ────────────────────────────────────────── */

.board {
    padding: clamp(16px, 3vw, 32px);
    background: linear-gradient(#1a1d21, #141619);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    display: grid; gap: 28px;
}
.board__row { display: grid; gap: 12px; }
.board__label {
    justify-self: start;
    font: 700 12px/1 var(--f-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tape-ink);
    background: var(--tape);
    padding: 7px 10px 6px;
    border-radius: 2px;
}
.board__rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px;
    padding: 10px;
    background: #0b0c0e;
    border-radius: 8px;
}
.board__rail::before { /* the DIN rail */
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 26px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(90deg, #6b727b 0 26px, #545a62 26px 30px);
    opacity: .5;
}

.module {
    position: relative;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    padding: 12px 14px;
    color: #222;
    background: linear-gradient(var(--plastic), var(--plastic-2));
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px #0002, 0 3px 0 #000a;
    transition: transform .2s;
}
.module:hover { transform: translateY(-2px); }
.module__rating {
    grid-column: 2;
    font: 700 11px/1 var(--f-mono);
    color: #6a665c;
    letter-spacing: .08em;
}
.module__toggle {
    grid-column: 1; grid-row: 1 / 4;
    position: relative;
    width: 26px;
    background: #1f1f1f;
    border-radius: 3px;
    box-shadow: inset 0 2px 4px #000;
}
.module__toggle span {
    position: absolute; left: 4px; right: 4px; height: 40%;
    bottom: 4px;
    background: linear-gradient(#5a5a5a, #2c2c2c);
    border-radius: 2px;
    transition: bottom .4s cubic-bezier(.6, 1.7, .5, 1), background .3s;
}
.module.in .module__toggle span { bottom: calc(60% - 4px); background: linear-gradient(#ffc233, #d68f00); }
.module__name {
    grid-column: 2;
    margin: 4px 0 8px;
    font: 600 18px/1.1 var(--f-head);
    text-transform: uppercase;
    letter-spacing: .02em;
}
.module__load { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.module__bar {
    position: relative; flex: 1; height: 6px;
    border-radius: 3px; background: #0002; overflow: hidden;
}
.module__bar::after {
    content: ""; position: absolute; inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(90deg, #2bb36b, var(--live) 70%, var(--red));
    background-size: calc(100% * 100 / max(var(--load), 1)) 100%;
    border-radius: 3px;
    transition: width 1.1s cubic-bezier(.2, .7, .2, 1) .15s;
}
.module.in .module__bar::after { width: calc(var(--load) * 1%); }
.module__pct { font: 700 11px/1 var(--f-mono); color: #555; min-width: 32px; text-align: right; }

.certs {
    list-style: none; margin: 24px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.certs li {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font: 500 13px/1 var(--f-mono);
    color: #cfcbc2;
}
.certs li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ─── Projects (panel schedules) ──────────────────────────── */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 20px;
}
.schedule {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--copper);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.schedule:hover {
    border-color: var(--line-2);
    border-left-color: var(--live);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -18px rgba(255,176,0,.25);
}
.schedule__head {
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    background: #0d0f11;
    border-bottom: 1px solid var(--line);
    font-family: var(--f-mono);
}
.schedule__head > span { padding: 10px 12px; border-right: 1px solid var(--line); min-width: 0; }
.schedule__head > span:last-child { border-right: 0; }
.schedule__ckt {
    display: flex; align-items: center;
    font-size: 12px; font-weight: 700; letter-spacing: .1em;
    color: var(--live);
}
.schedule__spec { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule__spec small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.schedule__body { padding: 22px 22px 24px; }
.schedule__body h3 { font-size: 28px; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; }
.schedule__body p { color: #c4c1b9; font-size: 16px; }
.schedule__link { display: inline-block; margin-top: 14px; font: 600 13px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
    padding: 5px 9px;
    font: 500 12px/1 var(--f-mono);
    color: var(--copper-2);
    background: rgba(201, 120, 60, .1);
    border: 1px solid rgba(201, 120, 60, .3);
    border-radius: 3px;
}

/* ─── Experience (busbar) ─────────────────────────────────── */

.busbar {
    position: relative;
    list-style: none;
    margin: 0; padding: 0 0 0 56px;
}
.busbar::before {
    content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 10px;
    border-radius: 3px;
    background: linear-gradient(90deg, #8a4f24, var(--copper-2) 40%, var(--copper) 60%, #7a4520);
    box-shadow: 0 0 0 1px #0008, 0 0 24px rgba(201,120,60,.25);
}
.tap { position: relative; padding-bottom: 28px; }
.tap:last-child { padding-bottom: 0; }
.tap__node {
    position: absolute; left: -48px; top: 26px;
    width: 26px; height: 26px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #c7ccd2, #6b7178 70%);
    box-shadow: 0 0 0 3px #0c0d0f, 0 0 0 4px var(--copper);
}
.tap__node::after { /* tap-off cable to the card */
    content: ""; position: absolute; left: 26px; top: 50%; width: 22px; height: 2px;
    background: var(--copper);
}
.tap__card {
    padding: 20px 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.tap__period { margin: 0 0 6px; font: 500 12px/1 var(--f-mono); color: var(--live); letter-spacing: .1em; text-transform: uppercase; }
.tap__card h3 { font-size: 28px; font-weight: 600; text-transform: uppercase; }
.tap__org { margin: 4px 0 12px; color: var(--muted); font-weight: 500; }
.tap__card ul { margin: 0; padding-left: 18px; color: #c4c1b9; }
.tap__card li { margin-bottom: 4px; }
.tap__card li::marker { color: var(--copper); }

/* ─── Contact ─────────────────────────────────────────────── */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}
.contact__lead { font-size: 21px; color: #d4d1c9; max-width: 32ch; }
.contact__list { margin: 28px 0 0; display: grid; gap: 0; }
.contact__list > div {
    display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px;
    padding: 14px 0;
    border-top: 1px dashed var(--line-2);
}
.contact__list dt { font: 500 12px/1.6 var(--f-mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.contact__list dd { margin: 0; overflow-wrap: anywhere; }

.workorder {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    padding: 0 26px 26px;
    color: var(--tape-ink);
    background:
        linear-gradient(transparent 31px, rgba(0,0,0,.05) 32px) 0 0 / 100% 32px,
        var(--tape);
    border-radius: 4px;
    box-shadow: 0 30px 60px -25px #000, 0 0 0 1px #0006;
}
.workorder::before { /* clipboard clip */
    content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 22px;
    transform: translateX(-50%);
    background: linear-gradient(#9ca2a9, #5d636a);
    border-radius: 5px 5px 2px 2px;
    box-shadow: 0 2px 0 #0006;
}
.workorder__head {
    grid-column: 1 / -1;
    display: flex; justify-content: space-between;
    margin: 0 -26px;
    padding: 22px 26px 12px;
    border-bottom: 2px solid var(--tape-ink);
    font: 700 13px/1 var(--f-mono); letter-spacing: .14em;
}
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font: 700 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #5a5446; }
.field input,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    font: 500 16px/1.4 var(--f-body);
    color: var(--tape-ink);
    background: rgba(255,255,255,.55);
    border: 1px solid #b9b19b;
    border-radius: 3px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus { outline: none; background: #fff; border-color: var(--tape-ink); box-shadow: 0 0 0 3px rgba(255,176,0,.45); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #c4301f; box-shadow: 0 0 0 3px rgba(196,48,31,.18); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.workorder__foot {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    margin-top: 4px;
}
.form-status { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 13px/1.4 var(--f-mono); color: #5a5446; }
.form-status .led { background: #8f8a7c; box-shadow: 0 0 0 2px #0002; }
.form-status[data-state="ok"]    .led { background: var(--green); box-shadow: 0 0 0 2px #0003, 0 0 10px var(--green); }
.form-status[data-state="error"] .led { background: var(--red);   box-shadow: 0 0 0 2px #0003, 0 0 10px var(--red); }
.form-status[data-state="busy"]  .led { background: var(--live);  animation: pulse .6s ease-in-out infinite; }
.form-status[data-state="ok"]    { color: #1c6b3e; }
.form-status[data-state="error"] { color: #a8291b; }

.pushbtn {
    flex: none;
    width: 92px; height: 92px;
    padding: 9px;
    border: 0; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d9dde1, #7d848b 60%, #4b5056);
    box-shadow: 0 6px 14px #0007, inset 0 -2px 3px #0005;
    cursor: pointer;
}
.pushbtn__cap {
    display: grid; place-items: center;
    width: 100%; height: 100%;
    border-radius: 50%;
    font: 700 14px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
    color: #fff;
    background: radial-gradient(circle at 40% 30%, #4fe596, #1d9a55 65%, #116a39);
    box-shadow: inset 0 -5px 8px #0006, inset 0 3px 4px #ffffff55, 0 4px 0 #0b4a27;
    transition: transform .08s, box-shadow .08s;
}
.pushbtn:active .pushbtn__cap { transform: translateY(3px); box-shadow: inset 0 -2px 5px #0006, inset 0 3px 4px #ffffff40, 0 1px 0 #0b4a27; }
.pushbtn:disabled { cursor: progress; }
.pushbtn:disabled .pushbtn__cap { background: radial-gradient(circle at 40% 30%, #ffd060, #d08a00 65%, #8c5c00); box-shadow: inset 0 -5px 8px #0006, 0 4px 0 #5e3e00; }

/* ─── Footer ──────────────────────────────────────────────── */

.footer {
    max-width: var(--wrap);
    margin: clamp(80px, 12vw, 140px) auto 0;
    padding: 32px var(--gutter) 48px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
    font: 500 13px/1.4 var(--f-mono);
    color: var(--muted);
}
.footer p { margin: 0; }
.footer__top { color: var(--muted); }
.lockout {
    position: relative;
    display: grid; gap: 2px;
    padding: 10px 16px 10px 38px;
    background: #fff;
    color: #111;
    border-radius: 4px 12px 12px 4px;
    font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
    transform: rotate(-2deg);
}
.lockout strong {
    font: 700 15px/1 var(--f-head); letter-spacing: .14em;
    color: #fff; background: #d0261b;
    padding: 4px 8px 3px; justify-self: start; border-radius: 2px;
}
.lockout__hole {
    position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; border-radius: 50%;
    transform: translateY(-50%);
    background: var(--bg); box-shadow: inset 0 0 0 3px #bbb;
}

/* ─── Trip banner ─────────────────────────────────────────── */

.trip-banner {
    position: fixed; left: 50%; bottom: 20px; z-index: 60;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    max-width: calc(100% - 32px);
    padding: 12px 14px 12px 18px;
    background: #1b0f0e;
    border: 1px solid #5a1d17;
    border-radius: 999px;
    font: 500 13px/1.3 var(--f-mono);
    color: #ffd9d4;
    box-shadow: 0 16px 40px #000a;
}
.trip-banner[hidden] { display: none; }
.trip-banner button {
    padding: 8px 14px;
    border: 0; border-radius: 999px;
    font: 700 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
    color: #111; background: var(--live);
    cursor: pointer;
}

/* ═══════════ POWER STATES (JS only) ═══════════ */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

.js.is-off main { filter: brightness(.42) saturate(.35); }
.js.is-off .main-breaker__handle { top: 86px; }
.js.is-off .w-on  { opacity: 0; }
.js.is-off .w-off { opacity: 1; }
.js.is-off .enclosure__hint { opacity: 1; animation: blink 1.4s steps(2) infinite; }
.js.is-off .meter__row b { color: #1d3324; text-shadow: none; }
.js.is-off .led:not(.led--red),
.js.is-off .live-dot { background: #3a3a3a; box-shadow: 0 0 0 2px #0006; animation: none; }
.js.is-off .circuit__wire { animation-play-state: paused; background: linear-gradient(90deg, #5a3a22, #3a2717); }
.js.is-off .mcb.is-active .mcb__handle { top: 13px; background: #444; box-shadow: none; }
.js.is-off .module .module__toggle span { bottom: 4px; background: linear-gradient(#5a5a5a, #2c2c2c); }
.js.is-off .module .module__bar::after { width: 0; }

.js.powering main { animation: flicker .55s linear; }

/* ─── Keyframes ───────────────────────────────────────────── */

@keyframes pulse   { 50% { opacity: .35; } }
@keyframes blink   { 50% { opacity: .25; } }
@keyframes current { to { background-position: 140% 0, 0 0; } }
@keyframes flicker {
    0%   { filter: brightness(.42) saturate(.35); }
    12%  { filter: brightness(1.15); }
    20%  { filter: brightness(.5) saturate(.4); }
    32%  { filter: brightness(1.05); }
    40%  { filter: brightness(.7); }
    100% { filter: none; }
}

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding-top: calc(var(--bar-h) + 40px); }
    .enclosure { justify-self: center; margin-bottom: 30px; }
    .about, .contact { grid-template-columns: 1fr; }
    .about__photo { max-width: 300px; }
    .mcb { width: 52px; }
    .brand__text small { display: none; }
}

@media (max-width: 720px) {
    :root { --bar-h: 64px; }
    body { font-size: 16px; }
    .brand__text { display: none; }
    .mcb { width: 44px; }
    .mcb__label { display: none; }
    .din-rail { gap: 2px; padding: 5px 6px; }
    .circuit__head { gap: 12px; }
    .circuit__head .led { display: none; }
    .schedule__head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .schedule__ckt { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 1px solid var(--line); }
    .schedule__spec { white-space: normal; overflow-wrap: anywhere; }
    .workorder { grid-template-columns: 1fr; padding: 0 18px 20px; }
    .workorder__head { margin: 0 -18px; padding: 22px 18px 12px; }
    .busbar { padding-left: 44px; }
    .busbar::before { left: 8px; }
    .tap__node { left: -42px; width: 22px; height: 22px; }
    .tap__node::after { left: 22px; width: 20px; }
    .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
    .mcb { width: 40px; }
    .brand__fuse { width: 40px; font-size: 12px; }
    .workorder__foot { flex-direction: column-reverse; align-items: flex-start; }
}

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

@media print {
    .panel-bar, .enclosure, .trip-banner, .workorder { display: none; }
    body { background: #fff; color: #000; }
    .js.is-off main { filter: none; }
}
