/* === Design System — Portfolio (engineering blueprint) === */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root,
:root[data-theme="light"] {
    --bg: #ececec;
    --bg-darker: #e0e0e0;
    --surface: #ffffff;
    --surface-2: #f6f6f6;
    --ink: #0a0a0a;
    --ink-2: #2a2a2a;
    --muted: #8a8a8a;
    --muted-2: #b5b5b5;
    --line: #d4d4d4;
    --line-2: #cfcfcf;
    --accent: #ff6b1a;
    --accent-2: #ff8a3d;

    --grid: 80px;
    --grid-line: rgba(0, 0, 0, 0.045);
    --grid-line-strong: rgba(0, 0, 0, 0.06);
    --on-accent: #ffffff;
    --btn-ink-text: #ffffff;
    --tag-bg: var(--surface);
    --thumb-bg: var(--surface-2);
    --thumb-grid: rgba(0, 0, 0, 0.05);
    --iso-stripe: rgba(0, 0, 0, 0.06);
    --accent-hover-bg: rgba(255, 107, 26, 0.08);

    --font-mono:
        "JetBrains Mono", "Space Mono", ui-monospace, SFMono-Regular, Menlo,
        Consolas, monospace;
    --font-display:
        "Bytesized", "Major Mono Display", "Wallpoet", "JetBrains Mono",
        monospace;
    --font-ui: "JetBrains Mono", ui-monospace, monospace;

    /* legacy aliases used by blog/contact/loader stylesheets */
    --txt: var(--ink);
    --bg2: var(--surface);
    --bg3: var(--surface-2);
    --border: var(--line);
    --acid: var(--accent);
    --cyan: var(--accent-2);
    --card-bg: var(--surface);
    --nav-bg: var(--surface);
}

:root[data-theme="dark"] {
    --bg: rgba(12, 12, 13, .72);
    --bg-darker: #08080a;
    --surface: rgba(19, 19, 21, .76);
    --surface-2: rgba(26, 26, 28, .78);
    --ink: #f2f2f0;
    --ink-2: #c8c8c4;
    --muted: #6e6e72;
    --muted-2: #4a4a4e;
    --line: #232326;
    --line-2: #2c2c30;
    --accent: #ff6b1a;
    --accent-2: #ff8a3d;

    --grid-line: rgba(255, 255, 255, 0.04);
    --grid-line-strong: rgba(255, 255, 255, 0.05);
    --on-accent: #ffffff;
    --btn-ink-text: #0a0a0a;
    --tag-bg: #1a1a1c;
    --thumb-bg: #0f0f10;
    --thumb-grid: rgba(255, 255, 255, 0.045);
    --iso-stripe: rgba(255, 255, 255, 0.05);
    --accent-hover-bg: rgba(255, 107, 26, 0.14);

    color-scheme: dark;

    --txt: var(--ink);
    --bg2: var(--surface);
    --bg3: var(--surface-2);
    --border: var(--line);
    --acid: var(--accent);
    --cyan: var(--accent-2);
    --card-bg: var(--surface);
    --nav-bg: var(--surface);
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: var(--grid) var(--grid);
    background-position: 0 0;
}

.shader-background {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .8;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, .45));
}

:root[data-theme="light"] .shader-background {
    display: none;
}

.portfolio-app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* === Shell — rounded blueprint window === */
.shell {
    max-width: 1480px;
    margin: 40px auto;
    background: var(--bg);
    border: 1.5px solid var(--ink);
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    background-image:
        linear-gradient(to right, var(--grid-line-strong) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line-strong) 1px, transparent 1px);
    background-size: var(--grid) var(--grid);
}

:root[data-theme="dark"] .shell {
    background-color: rgba(12, 12, 13, .56);
}

.shell-inner {
    position: relative;
}

/* === Corner bracket fiducials === */
.bracket {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--ink);
    pointer-events: none;
}

.bracket.tl {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.bracket.tr {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.bracket.bl {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.bracket.br {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.framed {
    position: relative;
}

/* === Square bullet marker === */
.sq {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--ink);
    margin-right: 10px;
    vertical-align: middle;
    transform: translateY(-1px);
}

/* === Pill / chamfered button === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 11px 22px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    clip-path: polygon(10px 0,
            100% 0,
            100% calc(100% - 10px),
            calc(100% - 10px) 100%,
            0 100%,
            0 10px);
    transition:
        background 0.15s ease,
        transform 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    background: var(--accent-2);
}

.btn:active {
    transform: translateY(1px);
}

.btn.ghost {
    background: transparent;
    color: var(--accent);
    outline: 1.5px solid var(--accent);
    outline-offset: -1.5px;
}

.btn.ghost:hover {
    background: var(--accent-hover-bg);
}

.btn.dark {
    background: var(--ink);
    color: var(--btn-ink-text);
}

/* === Display type === */
.display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--ink);
}

/* === Section label / kicker === */
.label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
}

/* === Nav === */
.nav {
    display: grid;
    grid-template-columns: 240px 1fr auto auto;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-right: 1px solid var(--line);
    position: relative;
}

.nav-logo-mark {
    width: 38px;
    height: 38px;
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
    font-family: var(--font-display);
    position: relative;
    flex-shrink: 0;
}

.nav-logo-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.nav-logo-text .sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 0 26px;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.nav-links a {
    position: relative;
    padding: 4px 2px;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.15s ease;
    text-transform: capitalize;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a.active {
    color: var(--ink);
}

.nav-links a.active::before {
    content: "\2308";
    position: absolute;
    left: -10px;
    top: -2px;
    color: var(--ink);
}

.nav-links a.active::after {
    content: "\230B";
    position: absolute;
    right: -10px;
    bottom: -2px;
    color: var(--ink);
}

.nav-eco {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px;
    border-left: 1px solid var(--line);
    font-size: 12px;
}

.nav-eco-dots {
    display: grid;
    grid-template-columns: 4px 4px;
    grid-template-rows: 4px 4px;
    gap: 3px;
}

.nav-eco-dots i {
    background: var(--accent);
    border-radius: 50%;
    display: block;
    width: 4px;
    height: 4px;
}

.nav-cta {
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-left: 1px solid var(--line);
    gap: 10px;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}

.theme-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* === Hero === */
.hero {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    border-bottom: 1px solid var(--line);
}

.hero-title-wrap {
    grid-column: 1 / 3;
    background: var(--surface);
    padding: 42px 56px;
    border-right: 1px solid var(--line);
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-family:
        "Bytesized", "Major Mono Display", "Wallpoet", "JetBrains Mono",
        monospace;
    font-size: clamp(64px, 14vw, 180px);
    line-height: 0.86;
    font-weight: 400;
    letter-spacing: -0.015em;
    margin: 18px 0 0;
    text-transform: uppercase;
}

.hero-marker {
    background: var(--surface);
    border-left: 1px solid var(--line);
    position: relative;
    display: grid;
    place-items: center;
    min-height: 220px;
}

.hero-portrait {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: contain;
    object-position: center bottom;
    mix-blend-mode: multiply;
    filter: contrast(1.05);
    padding: 12px;
}

:root[data-theme="dark"] .hero-portrait {
    mix-blend-mode: screen;
    filter: contrast(1.1) brightness(0.7);
}

.hero-row-2 {
    grid-column: 1 / 4;
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.hero-cell {
    padding: 28px 32px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    position: relative;
}

.hero-cell:last-child {
    border-right: none;
    border-left: 1px solid var(--line);
}

.hero-cell-mid {
    background: transparent;
    display: grid;
    place-items: center;
    padding: 28px 24px;
}

.hero-cell h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hero-cell .sub {
    font-size: 12px;
    color: var(--muted);
}

/* === Iso-stripe placeholder block === */
.iso-block {
    width: 100%;
    height: 100%;
    min-height: 56px;
    background: repeating-linear-gradient(135deg,
            transparent 0,
            transparent 7px,
            var(--iso-stripe) 7px,
            var(--iso-stripe) 8px);
    border: 1px solid var(--line);
    position: relative;
}

.iso-block::before {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--surface);
    padding: 3px 6px;
    white-space: nowrap;
}

/* === System diagram === */
.sysdiag {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sysdiag-cap {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sysdiag-svg {
    width: 100%;
    height: auto;
    flex: 1;
    min-height: 0;
    display: block;
}

.sysdiag-svg .sd-grid line {
    stroke: var(--ink);
    stroke-width: 0.5;
    stroke-dasharray: 1 4;
    opacity: 0.14;
}

.sysdiag-svg .sd-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    fill: var(--ink);
}

.sysdiag-svg .sd-sub {
    font-family: var(--font-mono);
    font-size: 8.5px;
    letter-spacing: 0.08em;
    fill: var(--muted);
    text-transform: uppercase;
}

.sysdiag-svg .sd-sub-acc {
    fill: var(--accent);
    font-weight: 700;
}

.sysdiag-svg .sd-edge {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    fill: var(--muted);
    text-transform: uppercase;
}

.sysdiag-svg .sd-anno {
    font-family: var(--font-mono);
    font-size: 8.5px;
    letter-spacing: 0.1em;
    fill: var(--muted);
    text-transform: uppercase;
}

.sysdiag-svg .sd-anno-acc {
    fill: var(--accent);
}

/* === Featured logos strip === */
.featured {
    padding: 22px 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 28px;
}

.featured-logos {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    align-items: center;
}

.featured-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: var(--ink-2);
    opacity: 0.7;
    transition:
        opacity 0.15s ease,
        color 0.15s ease;
}

.featured-logo:hover {
    opacity: 1;
    color: var(--accent);
}

/* === Stats === */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.stat {
    padding: 26px 28px;
    border-right: 1px solid var(--line);
    position: relative;
}

.stat:last-child {
    border-right: none;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
}

.stat-num .unit {
    font-size: 22px;
    color: var(--accent);
    margin-left: 2px;
}

.stat-label {
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* === Section head === */
.section {
    border-bottom: 1px solid var(--line);
}

.section-head {
    padding: 30px 56px 30px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.section-head .label {
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-mono);
    font-size: clamp(40px, 6vw, 80px);
    line-height: 0.95;
    letter-spacing: -0.015em;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.section-title .accent {
    font-family: var(--font-display);
    color: var(--accent);
}

/* === About === */
.about {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface);
}

.about-body {
    padding: 38px 56px;
    border-right: 1px solid var(--line);
}

.about-body p {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.7;
    max-width: 60ch;
}

.about-side {
    padding: 38px 40px;
    background: var(--surface-2);
}

.about-side h4 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stack-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stack-group-label {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stack-group-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 4px 10px;
    background: var(--tag-bg);
    border: 1px solid var(--line);
    letter-spacing: 0.04em;
    color: var(--ink);
}

.mono-mini {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
}

/* === Skills === */
.skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface);
}

.skill {
    padding: 28px 28px 24px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    position: relative;
    min-height: 200px;
}

.skill-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.skill-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.skill-thumb {
    width: 56px;
    height: 56px;
    position: relative;
}

.skill-name {
    font-size: 17px;
    font-weight: 600;
    margin: 6px 0 8px;
}

.skill-desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink-2);
}

.skill-bar {
    margin-top: 16px;
    height: 4px;
    width: calc(100% - 48px);
    bottom: 14px;
    background: var(--line-2);
    position: absolute;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Experience accordion === */
.accordion {
    background: var(--surface);
}

.acc-item {
    border-bottom: 1px solid var(--line);
}

.acc-item:last-child {
    border-bottom: none;
}

.acc-head {
    padding: 22px 56px;
    display: grid;
    grid-template-columns: 24px 1fr 200px 40px;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.acc-head:hover {
    background: var(--surface-2);
}

.acc-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

.acc-title {
    font-size: 16px;
    font-weight: 600;
}

.acc-title .at {
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
}

.acc-loc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.acc-year {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-align: right;
}

.acc-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--ink);
    display: grid;
    place-items: center;
    transition:
        background 0.15s ease,
        color 0.15s ease;
    font-size: 14px;
    justify-self: end;
    background: transparent;
    color: var(--ink);
}

.acc-item.open .acc-toggle {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.acc-item.open .acc-body {
    max-height: 2400px;
}

.acc-body-inner {
    padding: 18px 56px 26px 98px;
    border-top: 1px dashed var(--line-2);
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 32px;
}

.acc-desc {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-2);
    margin: 0;
}

.acc-bullets {
    margin: 12px 0 0;
    padding-left: 18px;
    list-style: none;
}

.acc-bullets li {
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-2);
    padding: 4px 0 4px 14px;
    position: relative;
}

.acc-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.acc-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.acc-meta {
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.acc-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--line);
    gap: 12px;
}

.acc-meta-row:last-child {
    border-bottom: none;
}

.acc-meta-k {
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* === Projects === */
.proj-feature {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.proj-feature-left {
    padding: 32px 32px;
    border-right: 1px solid var(--line);
}

.proj-feature-left p {
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 10px;
    line-height: 1.6;
}

.proj-feature-count {
    margin-top: 28px;
}

.proj-feature-count .num {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1;
}

.proj-feature-right {
    display: grid;
    grid-template-columns: 180px 1fr;
    position: relative;
}

.proj-feature-iso {
    border-right: 1px solid var(--line);
    padding: 24px 16px;
}

.proj-feature-info {
    padding: 26px 32px;
    position: relative;
}

.proj-feature-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.proj-feature-tag-new {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    letter-spacing: 0.06em;
}

.proj-feature-tag {
    border: 1px solid var(--line);
    font-size: 10px;
    padding: 3px 8px;
    letter-spacing: 0.06em;
}

.proj-feature-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.proj-feature-blurb {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    margin: 0;
    max-width: 52ch;
}

.proj-feature-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 40px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

.proj-feature-stats>div {
    padding: 12px 14px;
    border-right: 1px solid var(--line);
}

.proj-feature-stats .v {
    font-weight: 700;
    font-size: 15px;
}

.proj-controls {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: center;
    padding: 22px 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    gap: 24px;
}

.proj-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.proj-filter {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 7px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    color: var(--ink);
}

.proj-filter.active {
    background: var(--ink);
    color: var(--btn-ink-text);
    border-color: var(--ink);
}

.proj-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    padding: 8px 14px;
    background: var(--surface);
}

.proj-search input {
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 12px;
    flex: 1;
    color: var(--ink);
}

.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface);
    padding: 24px 56px 40px;
    gap: 24px;
}

.proj-card {
    border: 1px solid var(--line);
    background: var(--surface);
    position: relative;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
    display: block;
}

.proj-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 -3px var(--ink);
}

.proj-card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    background: var(--tag-bg);
    border: 1px solid var(--line);
    padding: 3px 8px;
    letter-spacing: 0.06em;
    z-index: 2;
}

.proj-card-stars {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 3px 8px;
    background: var(--ink);
    color: var(--btn-ink-text);
    letter-spacing: 0.04em;
    z-index: 2;
}

.proj-thumb {
    height: 170px;
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--line);
    position: relative;
    background: var(--thumb-bg);
    overflow: hidden;
}

.proj-thumb-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
    z-index: 1;
}

.proj-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--thumb-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--thumb-grid) 1px, transparent 1px);
    background-size: 24px 24px;
}

.proj-card-body {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.55;
}

.proj-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 40px;
    border-top: 1px solid var(--line);
}

.proj-stat {
    padding: 14px 16px;
    border-right: 1px solid var(--line);
}

.proj-stat .v {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
}

.proj-stat .k {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
}

.proj-arrow {
    display: grid;
    place-items: center;
    background: var(--surface);
    transition:
        background 0.15s ease,
        color 0.15s ease;
    font-size: 16px;
}

.proj-arrow:hover {
    background: var(--accent);
    color: var(--on-accent);
}

/* === Testimonials === */
.testi {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--surface);
}

.testi-card {
    padding: 32px 40px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    position: relative;
}

.testi-card:nth-child(2n) {
    border-right: none;
}

.testi-card:nth-last-child(-n + 2) {
    border-bottom: none;
}

.testi-quote {
    font-family: var(--font-display);
    font-size: 60px;
    line-height: 0.5;
    color: var(--accent);
    margin-bottom: 12px;
}

.testi-text {
    font-size: 13.5px;
    line-height: 1.7;
    margin: 0 0 22px;
    max-width: 50ch;
}

.testi-author {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.testi-role {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* === Regions === */
.regions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
}

.region {
    padding: 32px 28px;
    border-right: 1px solid var(--line);
    position: relative;
    min-height: 220px;
}

.region:last-child {
    border-right: none;
}

.region-map {
    width: 100%;
    height: 90px;
    margin-bottom: 18px;
    position: relative;
}

.region-map .sysdiag-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.region-name {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.region-detail {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

.region-num {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    color: var(--muted);
}

/* === Contact === */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--surface);
}

.contact-l {
    padding: 56px;
    border-right: 1px solid var(--line);
    position: relative;
}

.contact-title {
    font-family: var(--font-mono);
    font-size: clamp(56px, 8vw, 120px);
    line-height: 0.9;
    letter-spacing: -0.015em;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-title .outline {
    -webkit-text-stroke: 1.5px var(--ink);
    color: transparent;
}

.contact-title .accent {
    color: var(--accent);
}

.contact-info {
    margin-top: 28px;
    font-size: 13px;
    line-height: 1.8;
    max-width: 36ch;
    color: var(--ink-2);
}

.contact-r {
    padding: 40px;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition:
        color 0.15s ease,
        padding 0.15s ease;
    font-size: 13px;
}

.contact-link:hover {
    color: var(--accent);
    padding-left: 6px;
}

.contact-link:last-child {
    border-bottom: none;
}

.contact-link-l {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-link-k {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-link-v {
    font-weight: 600;
}

.contact-arrow {
    font-size: 16px;
    transition: transform 0.15s ease;
}

.contact-link:hover .contact-arrow {
    transform: translate(2px, -2px);
}

.contact-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-meta {
    margin-top: 32px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.contact-meta-item .mono-mini {
    margin-bottom: 2px;
}

.contact-meta-item .v {
    font-size: 13px;
    font-weight: 600;
}

/* === Footer === */
.foot {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px 32px;
    background: var(--surface);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.foot-resume {
    border-bottom: 1px solid var(--ink);
}

.foot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.foot-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2bb673;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* === Scroll reveal === */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* === Responsive === */
@media (max-width: 1100px) {
    .shell {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .hero,
    .hero-row-2 {
        grid-template-columns: 1fr;
    }

    .hero-title-wrap {
        grid-column: 1;
        border-right: none;
    }

    .hero-marker {
        border-left: none;
        border-top: 1px solid var(--line);
    }

    .hero-cell {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .hero-cell:last-child {
        border-left: none;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2) {
        border-right: none;
    }

    .stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .skills,
    .proj-grid,
    .testi,
    .regions {
        grid-template-columns: 1fr 1fr;
    }

    .skill:nth-child(3n) {
        border-right: 1px solid var(--line);
    }

    .skill:nth-child(2n) {
        border-right: none;
    }

    .skill:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--line);
    }

    .skill:nth-last-child(-n + 2) {
        border-bottom: none;
    }

    .about,
    .contact-grid,
    .proj-feature,
    .proj-feature-right {
        grid-template-columns: 1fr;
    }

    .about-body,
    .proj-feature-left,
    .proj-feature-iso {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .acc-head {
        grid-template-columns: 24px 1fr 90px 40px;
        padding: 18px 24px;
    }

    .acc-body-inner {
        padding: 18px 24px 22px 60px;
        grid-template-columns: 1fr;
    }

    .section-head,
    .featured,
    .proj-controls,
    .proj-grid,
    .contact-l,
    .contact-r,
    .about-body,
    .about-side {
        padding-left: 24px;
        padding-right: 24px;
    }

    .nav {
        grid-template-columns: 1fr auto;
    }

    .nav-links,
    .nav-eco {
        display: none;
    }
}

@media (max-width: 640px) {
    .featured {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .skills,
    .proj-grid,
    .testi,
    .regions {
        grid-template-columns: 1fr;
    }

    .skill,
    .testi-card {
        border-right: none !important;
    }

    .region {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .region:last-child {
        border-bottom: none;
    }
}