@import url('root.css');
@import url('nav.css');
@import url('timeline.css');
@import url('social.css');
@import url('spotify.css');

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-strong) var(--bg-body);
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--text-color);
    background: var(--bg-body);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 8%, var(--accent-a18), transparent 30%),
        radial-gradient(circle at 82% 72%, var(--cyan-a08), transparent 30%),
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: auto, auto, 72px 72px, 72px 72px;
    mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.35) 78%, transparent 100%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

::selection {
    color: var(--white);
    background: var(--accent-a40);
}

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb {
    border: 2px solid var(--bg-body);
    border-radius: 99px;
    background: linear-gradient(var(--accent), var(--accent-indigo));
}

:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 4px;
    border-radius: 6px;
}

img { max-width: 100%; }
button, input, textarea, select { font: inherit; }

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
    padding: 10px 14px;
    color: var(--white);
    border-radius: 8px;
    background: var(--accent-strong);
    transform: translateY(-160%);
    transition: transform 150ms ease;
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
    width: min(calc(100% - 40px), var(--page-width));
    margin-inline: auto;
}

.arcane-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 8px;
    font: 600 11px var(--font-mono);
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn-primary {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: var(--gradient-accent);
    box-shadow: 0 12px 30px var(--accent-a25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px var(--accent-a40);
}

.btn-ghost {
    color: var(--text-color);
    border: 1px solid var(--white-a10);
    background: var(--white-a03);
}

.btn-ghost:hover {
    border-color: var(--border-bright);
    background: var(--accent-a08);
    transform: translateY(-2px);
}

.gradient-text {
    color: transparent;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
}

.title-accent { color: var(--accent-soft); }

.glass-panel,
.glass-card {
    border: 1px solid var(--white-a08);
    background: var(--bg-panel);
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Hero */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
    align-items: center;
    gap: clamp(52px, 7vw, 100px);
    min-height: 100svh;
    padding-top: 128px;
    padding-bottom: 90px;
}

.hero::before {
    content: 'JDS//SYSTEM_PROFILE';
    position: absolute;
    top: 50%;
    left: -90px;
    color: var(--white-a03);
    font: 700 clamp(70px, 10vw, 150px) var(--font-mono);
    letter-spacing: -0.08em;
    white-space: nowrap;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    pointer-events: none;
}

.hero-copy { position: relative; z-index: 2; }

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font: 600 10px var(--font-mono);
    letter-spacing: 0.11em;
}

.kicker-code { color: var(--accent-cyan); }
.kicker-line { width: 42px; height: 1px; background: var(--border-bright); }

.hero-title {
    max-width: 760px;
    margin: 0;
    color: var(--white);
    font: 800 clamp(44px, 5.6vw, 78px)/1.04 var(--font-display);
    letter-spacing: -0.055em;
}

.hero-title span {
    display: block;
    color: transparent;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-role {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-height: 38px;
    margin: 26px 0 20px;
    padding: 0 13px;
    color: #c4b5fd;
    border: 1px solid var(--accent-a18);
    border-radius: 6px;
    background: var(--accent-a08);
    font: 500 12px var(--font-mono);
}

.terminal-prompt { color: var(--accent-emerald); }
.typewriter { position: relative; margin: 0; }
.typewriter::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 1.1em;
    margin-left: 5px;
    vertical-align: -2px;
    background: var(--accent-cyan);
    animation: cursorBlink 900ms step-end infinite;
}

.hero-lead {
    max-width: 660px;
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.character-panel {
    position: relative;
    z-index: 1;
    max-width: 450px;
    justify-self: end;
    padding: 18px;
    border: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent 35%),
        rgba(10, 10, 18, 0.74);
    box-shadow: var(--shadow-panel), inset 0 0 80px rgba(139, 92, 246, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.character-panel::before,
.character-panel::after {
    content: '';
    position: absolute;
    z-index: 3;
    width: 70px;
    height: 70px;
    pointer-events: none;
}

.character-panel::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent-soft);
    border-left: 2px solid var(--accent-soft);
}

.character-panel::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
}

.character-panel-head,
.character-nameplate,
.character-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.character-panel-head {
    padding: 0 2px 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--white-a05);
    font: 600 8px var(--font-mono);
    letter-spacing: 0.11em;
}

.panel-id { color: var(--accent-soft); }

.character-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 360px;
    overflow: hidden;
    background:
        radial-gradient(circle, var(--accent-a18), transparent 55%),
        linear-gradient(var(--white-a03) 1px, transparent 1px),
        linear-gradient(90deg, var(--white-a03) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
}

.character-frame {
    position: relative;
    z-index: 2;
    width: min(72%, 270px);
    aspect-ratio: 1;
    padding: 5px;
    background: linear-gradient(145deg, var(--accent-soft), var(--accent-indigo), var(--accent-cyan));
    clip-path: polygon(50% 0, 91% 21%, 100% 65%, 72% 100%, 28% 100%, 0 65%, 9% 21%);
    filter: drop-shadow(0 0 24px var(--accent-a40));
}

.character-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 28%;
    clip-path: inherit;
    filter: saturate(0.86) contrast(1.04);
}

.orbit {
    position: absolute;
    border: 1px solid var(--accent-a25);
    border-radius: 50%;
    animation: orbitSpin 18s linear infinite;
}

.orbit::before,
.orbit::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 14px var(--accent-cyan);
}

.orbit::before { top: 12%; left: 11%; }
.orbit::after { right: 4%; bottom: 27%; background: var(--accent-soft); }
.orbit-one { width: 318px; height: 318px; }
.orbit-two { width: 276px; height: 276px; animation-direction: reverse; animation-duration: 13s; }

.stack-rune {
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    color: var(--white);
    border: 1px solid var(--border-bright);
    border-radius: 10px 3px 10px 3px;
    background: rgba(13, 13, 25, 0.92);
    box-shadow: 0 8px 24px var(--black-a45), inset 0 0 12px var(--accent-a12);
    font: 700 9px var(--font-mono);
    animation: runeFloat 4s ease-in-out infinite;
}

.rune-php { top: 18%; left: 7%; }
.rune-js { top: 27%; right: 8%; animation-delay: -1s; }
.rune-delphi { bottom: 20%; left: 11%; animation-delay: -2s; }
.rune-api { right: 9%; bottom: 16%; animation-delay: -3s; }

.character-nameplate {
    padding: 16px 2px;
    border-top: 1px solid var(--white-a05);
    border-bottom: 1px solid var(--white-a05);
}

.character-nameplate div { display: grid; gap: 3px; }
.character-nameplate span,
.character-nameplate small,
.character-current small {
    color: var(--text-muted);
    font: 600 8px var(--font-mono);
    letter-spacing: 0.10em;
}
.character-nameplate strong { color: var(--white); font: 600 13px var(--font-display); }
.character-level { color: var(--accent-cyan) !important; font-size: 11px !important; }

.character-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 16px 0;
}

.character-stats div {
    display: grid;
    gap: 2px;
    padding: 0 12px;
    text-align: center;
    border-right: 1px solid var(--white-a05);
}

.character-stats div:last-child { border-right: 0; }
.character-stats strong { color: var(--white); font: 700 19px var(--font-mono); }
.character-stats span { color: var(--text-muted); font: 500 8px var(--font-mono); text-transform: uppercase; }

.character-current {
    justify-content: flex-start;
    padding: 12px;
    border: 1px solid rgba(52, 211, 153, 0.13);
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.05);
}

.character-current div { display: grid; gap: 3px; }
.character-current strong { color: #d1fae5; font-size: 10px; font-weight: 500; }

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font: 500 8px var(--font-mono);
    letter-spacing: 0.12em;
    text-decoration: none;
}

.hero-scroll span:last-child { color: var(--accent-cyan); font-size: 16px; animation: scrollBounce 1.8s ease-in-out infinite; }

/* Jota companion */
.jota-companion {
    position: fixed;
    bottom: 22px;
    left: 18px;
    z-index: 80;
    display: grid;
    grid-template-columns: 112px 0fr;
    align-items: center;
    gap: 0;
    max-width: calc(100vw - 36px);
    padding: 5px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
    background: rgba(10, 10, 19, 0.84);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: left;
    transition: border-color 180ms ease, transform 180ms ease, padding-right 180ms ease;
}

.jota-companion:hover,
.jota-companion:focus-within {
    padding-right: 17px;
    border-color: var(--border-bright);
    transform: translateY(-3px);
}

.jota-sprite {
    width: 112px;
    height: 112px;
    filter: drop-shadow(0 4px 12px rgba(34, 211, 238, 0.30));
}

.jota-message {
    display: grid;
    gap: 2px;
    width: 0;
    overflow: hidden;
    color: var(--white);
    opacity: 0;
    transform: translateX(-8px);
    transition: width 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.jota-companion:hover .jota-message,
.jota-companion:focus-within .jota-message {
    width: 138px;
    opacity: 1;
    transform: translateX(0);
}

.jota-message span {
    font: 600 11px var(--font-display);
}

.jota-message small {
    color: var(--text-muted);
    font: 500 8px var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Shared sections */
.section {
    position: relative;
    padding-top: 130px;
    padding-bottom: 60px;
    scroll-margin-top: 70px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    align-items: end;
    gap: 54px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--white-a08);
}

.section-index {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-cyan);
    font: 600 9px var(--font-mono);
    letter-spacing: 0.13em;
}

.section-heading h2 {
    margin: 0;
    color: var(--white);
    font: 700 clamp(34px, 5vw, 60px)/1.1 var(--font-display);
    letter-spacing: -0.045em;
}

.section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.loading-copy {
    grid-column: 1 / -1;
    margin: 20px 0;
    color: var(--text-muted);
    font: 500 10px var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Legendary case */
.legendary-cases {
    display: grid;
    gap: 20px;
    margin-top: 100px;
}

.legendary-heading {
    margin-bottom: 10px;
}

.legendary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 16px;
}

.case-feature {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 28px;
    margin-top: 0;
    min-height: 390px;
    padding: clamp(26px, 3.2vw, 38px);
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.22);
    background:
        radial-gradient(circle at 90% 30%, rgba(251, 191, 36, 0.10), transparent 36%),
        radial-gradient(circle at 10% 100%, var(--accent-a18), transparent 38%),
        rgba(12, 12, 22, 0.90);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.case-feature::before,
.case-feature::after {
    content: '';
    position: absolute;
    width: 68px;
    height: 68px;
    pointer-events: none;
}

.case-feature::before { top: 0; left: 0; border-top: 2px solid #fbbf24; border-left: 2px solid #fbbf24; }
.case-feature::after { right: 0; bottom: 0; border-right: 2px solid var(--accent-soft); border-bottom: 2px solid var(--accent-soft); }

.loot-label {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 7px 9px;
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.20);
    border-radius: 5px;
    background: rgba(251, 191, 36, 0.06);
    font: 600 8px var(--font-mono);
    letter-spacing: 0.12em;
}

.case-feature h3 {
    margin: 0;
    color: var(--white);
    max-width: 540px;
    font: 700 clamp(24px, 2.4vw, 34px)/1.12 var(--font-display);
    letter-spacing: -0.045em;
}

.qr-feature {
    border-color: rgba(34, 211, 238, 0.24);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent 44%),
        radial-gradient(circle at 90% 30%, var(--accent-a18), transparent 36%),
        rgba(12, 12, 22, 0.90);
}

.qr-feature::before {
    border-top-color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
}

.qr-feature .loot-label,
.qr-feature .case-feature-link,
.qr-feature .case-feature-data strong {
    color: #67e8f9;
}

.case-feature-copy > p {
    max-width: 540px;
    margin: 16px 0 18px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.case-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #fde68a;
    font: 600 10px var(--font-mono);
    text-decoration: none;
    text-transform: uppercase;
}

.case-feature-link:hover { color: var(--white); }

.case-feature-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.case-feature-data div {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid var(--white-a08);
    background: rgba(255, 255, 255, 0.025);
}

.case-feature-data strong { color: #fde68a; font: 700 18px var(--font-mono); }
.case-feature-data span { color: var(--text-muted); font: 500 8px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 46px;
}

.skill-card {
    position: relative;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--white-a08);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(18, 18, 32, 0.86), rgba(10, 10, 18, 0.72));
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.skill-card:hover,
.skill-card:focus-within {
    z-index: 4;
    border-color: var(--tier-color, var(--border-bright));
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.30), 0 0 30px var(--tier-glow, var(--accent-a12));
    transform: translateY(-4px);
}

.skill-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
}

.skill-rune {
    display: grid;
    place-items: center;
    width: 48px;
    height: 54px;
    background: linear-gradient(145deg, var(--white-a08), var(--white-a03));
    clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
    box-shadow: inset 0 0 18px var(--tier-glow, var(--accent-a12));
}

.skill-rune img { width: 24px; height: 24px; object-fit: contain; }
.skill-title { min-width: 0; }
.skill-title strong { display: block; color: var(--white); font: 600 14px var(--font-display); }
.skill-title span { display: block; margin-top: 3px; color: var(--text-muted); font: 500 8px var(--font-mono); text-transform: uppercase; }
.skill-level { color: var(--tier-color, var(--accent-soft)); font: 700 10px var(--font-mono); }

.skill-track {
    position: relative;
    height: 4px;
    margin-top: 19px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--white-a05);
}

.skill-progress {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tier-color, var(--accent)), var(--accent-cyan));
    box-shadow: 0 0 12px var(--tier-glow, var(--accent-a25));
    transition: width 1s cubic-bezier(.2,.8,.2,1);
}

.skill-xp {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--text-muted);
    font: 500 8px var(--font-mono);
}

.skill-tooltip {
    position: absolute;
    right: 10px;
    bottom: calc(100% - 4px);
    left: 10px;
    z-index: 10;
    padding: 15px;
    color: var(--text-muted);
    border: 1px solid var(--tier-color, var(--border-bright));
    border-radius: 8px;
    background: rgba(7, 7, 14, 0.97);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.skill-card:hover .skill-tooltip,
.skill-card:focus .skill-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.skill-tooltip strong { display: block; margin-bottom: 7px; color: var(--tier-color, var(--white)); font: 600 12px var(--font-display); }
.skill-tooltip p { margin: 0 0 8px; font-size: 10px; }
.skill-tooltip ul { margin: 0; padding: 8px 0 0 16px; border-top: 1px solid var(--white-a08); font-size: 9px; line-height: 1.7; }

.tier-1 { --tier-color: #9ca3af; --tier-glow: rgba(156, 163, 175, 0.14); }
.tier-2 { --tier-color: #34d399; --tier-glow: rgba(52, 211, 153, 0.16); }
.tier-3 { --tier-color: #60a5fa; --tier-glow: rgba(96, 165, 250, 0.18); }
.tier-4 { --tier-color: #a78bfa; --tier-glow: rgba(167, 139, 250, 0.20); }
.tier-5 { --tier-color: #fbbf24; --tier-glow: rgba(251, 191, 36, 0.20); }

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    margin-top: 46px;
}

.project-card {
    position: relative;
    grid-column: span 4;
    display: flex;
    min-height: 360px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--white-a08);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(19, 19, 34, 0.88), rgba(9, 9, 17, 0.80));
    transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.project-card:nth-child(1),
.project-card:nth-child(2) { grid-column: span 6; }

.project-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.project-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 100%, var(--accent-a18), transparent 62%),
        linear-gradient(var(--white-a03) 1px, transparent 1px),
        linear-gradient(90deg, var(--white-a03) 1px, transparent 1px);
    background-size: auto, 30px 30px, 30px 30px;
}

.project-visual::after {
    content: attr(data-code);
    position: absolute;
    top: 12px;
    right: 14px;
    color: var(--text-muted);
    font: 600 8px var(--font-mono);
}

.project-visual img {
    position: relative;
    z-index: 1;
    width: min(190px, 70%);
    max-height: 72px;
    object-fit: contain;
    filter: saturate(0.92) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
    transition: transform 260ms ease;
}

.project-card:hover .project-visual img { transform: scale(1.05); }
.project-visual.logo-fallback img { display: none; }
.project-visual.logo-fallback::before { content: attr(data-name); color: var(--white); font: 700 22px var(--font-display); }

.project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 23px;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--accent-cyan);
    font: 600 8px var(--font-mono);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.project-content h3 { margin: 16px 0 9px; color: var(--white); font: 600 19px var(--font-display); }
.project-content p { flex: 1; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.75; }
.project-link { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 16px; color: var(--text-color); border-top: 1px solid var(--white-a08); font: 600 9px var(--font-mono); text-decoration: none; text-transform: uppercase; }
.project-link span:last-child { color: var(--accent-soft); font-size: 15px; transition: transform 180ms ease; }
.project-link:hover span:last-child { transform: translate(3px, -3px); }

/* Contact & footer */
.contact-section {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 38px;
    margin-top: 140px;
    margin-bottom: 80px;
    padding: clamp(28px, 5vw, 60px);
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(120deg, var(--accent-a12), rgba(10, 10, 18, 0.88) 45%, var(--cyan-a08));
    box-shadow: var(--shadow-panel);
    scroll-margin-top: 110px;
}

.contact-sigil {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    color: var(--white);
    border: 1px solid var(--border-bright);
    background: var(--gradient-accent);
    clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%);
    font: 700 24px var(--font-mono);
    filter: drop-shadow(0 0 24px var(--accent-a40));
}

.contact-copy h2 { margin: 0; color: var(--white); font: 700 clamp(28px, 4vw, 46px)/1.15 var(--font-display); letter-spacing: -0.04em; }
.contact-copy h2 span { color: var(--accent-soft); }
.contact-copy p { max-width: 650px; margin: 16px 0 0; color: var(--text-muted); font-size: 13px; }
.contact-actions { display: grid; justify-items: center; gap: 10px; }
.contact-actions small { color: var(--text-muted); font: 500 8px var(--font-mono); }

.footer {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 30px;
    padding-top: 28px;
    padding-bottom: 34px;
    color: var(--text-muted);
    border-top: 1px solid var(--white-a08);
    font: 500 9px var(--font-mono);
}

.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text-color); font-weight: 600; text-decoration: none; }
.footer-brand span { color: var(--accent-soft); }
.footer p { margin: 0; }

/* Motion */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes cursorBlink { 50% { opacity: 0; } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes runeFloat { 50% { transform: translateY(-7px); } }
@keyframes scrollBounce { 50% { transform: translateY(5px); } }

/* Responsive */
@media (max-width: 1020px) {
    .hero { grid-template-columns: 1fr; gap: 64px; min-height: auto; padding-top: 150px; }
    .hero-copy { max-width: 820px; }
    .character-panel { width: min(100%, 520px); max-width: none; justify-self: center; }
    .character-visual { min-height: 400px; }
    .hero-scroll { display: none; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-card, .project-card:nth-child(1), .project-card:nth-child(2) { grid-column: span 6; }
    .contact-section { grid-template-columns: auto 1fr; }
    .contact-actions { grid-column: 1 / -1; justify-items: stretch; }
    .contact-actions .btn-primary { width: 100%; }
}

@media (max-width: 760px) {
    .page-shell { width: min(calc(100% - 28px), var(--page-width)); }
    .hero { padding-top: 125px; padding-bottom: 40px; }
    .hero-kicker { flex-wrap: wrap; }
    .hero-title { font-size: clamp(40px, 12vw, 58px); }
    .section { padding-top: 100px; }
    .section-heading { grid-template-columns: 1fr; gap: 18px; }
    .legendary-cases { margin-top: 80px; }
    .case-feature { min-height: 0; gap: 28px; }
    .skills-grid { grid-template-columns: 1fr; }
    .project-card, .project-card:nth-child(1), .project-card:nth-child(2) { grid-column: 1 / -1; min-height: 330px; }
    .contact-section { grid-template-columns: 1fr; gap: 24px; margin-top: 100px; }
    .contact-sigil { width: 70px; height: 70px; }
    .footer { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 480px) {
    .hero-actions { display: grid; }
    .hero-actions a { width: 100%; }
    .hero-role { width: 100%; font-size: 10px; }
    .character-panel { padding: 12px; }
    .character-visual { min-height: 310px; }
    .character-frame { width: 68%; }
    .orbit-one { width: 260px; height: 260px; }
    .orbit-two { width: 224px; height: 224px; }
    .character-stats div { padding: 0 5px; }
    .character-stats strong { font-size: 16px; }
    .case-feature-data div { min-height: 62px; padding-inline: 9px; }
    .contact-section { padding: 25px 20px; }
    .contact-actions .btn-primary { font-size: 9px; }
    .jota-companion { bottom: 76px; left: 10px; }
    .jota-sprite { width: 88px; height: 88px; }
    .jota-companion { grid-template-columns: 88px 0fr; }
    .jota-companion:hover .jota-message,
    .jota-companion:focus-within .jota-message { width: 118px; }
}

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