body {
    --bg: #07111f;
    --bg-deep: #03070d;
    --panel: rgba(16, 24, 39, 0.78);
    --panel-strong: rgba(17, 24, 39, 0.94);
    --text: #f8fafc;
    --muted: #a9b4c5;
    --muted-2: #748094;
    --brand: #f97316;
    --brand-2: #fb923c;
    --blue: #60a5fa;
    --green: #4ade80;
    --border: rgba(148, 163, 184, 0.24);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    --radius: 1.5rem;
    --radius-sm: 0.9rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    color-scheme: dark;
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 30rem),
        radial-gradient(circle at 82% 16%, rgba(96, 165, 250, 0.12), transparent 24rem),
        linear-gradient(180deg, #03070d 0%, #07111f 38%, #08111f 100%);
    color: var(--text);
    line-height: 1.55;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 72%);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 1rem;
    z-index: 20;
    background: var(--brand);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    left: 1rem;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.9);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 5vw, 3rem);
    background: rgba(3, 7, 13, 0.74);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand span span {
    color: var(--brand-2);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(251, 146, 60, 0.45));
    color: #03070d;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.22);
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.site-header nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    outline: none;
}

.section-shell {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    position: relative;
}

.hero {
    min-height: min(830px, calc(100vh - 4rem));
    display: grid;
    align-content: center;
    gap: 2rem;
}

.hero-backdrop {
    position: absolute;
    inset: 4rem -1rem 2rem;
    border-radius: 2.4rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 30%, rgba(249, 115, 22, 0.18), transparent 14rem),
        linear-gradient(130deg, transparent 0 18%, rgba(96, 165, 250, 0.1) 36%, transparent 70%),
        radial-gradient(circle at 74% 60%, rgba(249, 115, 22, 0.12), transparent 20rem),
        radial-gradient(circle at 50% 100%, rgba(15, 23, 42, 0.92), transparent 28rem);
    opacity: 0.96;
}

.hero-backdrop::before,
.hero-backdrop::after {
    content: "";
    position: absolute;
    left: -12%;
    right: -12%;
    height: 18rem;
    bottom: 7rem;
    border-top: 1px solid rgba(249, 115, 22, 0.22);
    transform: skewY(-5deg);
    opacity: 0.5;
}

.hero-backdrop::after {
    bottom: 4rem;
    transform: skewY(4deg);
    border-color: rgba(96, 165, 250, 0.22);
}

.orb,
.motion-rail {
    position: absolute;
    pointer-events: none;
}

.orb {
    border-radius: 999px;
    filter: blur(1px) saturate(1.1);
    mix-blend-mode: screen;
}

.orb-one {
    width: 25rem;
    height: 25rem;
    right: 3%;
    top: 8%;
    border: 1px solid rgba(249, 115, 22, 0.52);
    box-shadow:
        inset 0 0 120px rgba(249, 115, 22, 0.18),
        0 0 180px rgba(249, 115, 22, 0.32),
        0 0 0 1.2rem rgba(249, 115, 22, 0.02);
    animation: floatOrb 4.8s var(--ease-out) infinite alternate, orbGlow 5.6s ease-in-out infinite alternate;
}

.orb-two {
    width: 14rem;
    height: 14rem;
    left: 6%;
    bottom: 8%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.34), transparent 68%);
    box-shadow: 0 0 140px rgba(96, 165, 250, 0.28), 0 0 0 0.8rem rgba(96, 165, 250, 0.02);
    animation: floatOrb 5.4s var(--ease-out) infinite alternate-reverse, orbGlow 6.4s ease-in-out infinite alternate-reverse;
}

.motion-rail {
    width: 60%;
    height: 1px;
    right: -8%;
    top: 33%;
    background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.45), transparent);
    transform: rotate(-12deg);
}

.rail-two {
    top: 42%;
    right: -2%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.36), transparent);
    transform: rotate(10deg);
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.74fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--brand-2);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 900;
    font-size: 0.75rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    line-height: 0.98;
    letter-spacing: -0.066em;
}

h1 span {
    color: var(--brand);
}

h2 {
    max-width: 880px;
    margin-bottom: 0.9rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

h3 {
    margin-bottom: 0.7rem;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text);
    max-width: 720px;
    margin-bottom: 0.9rem;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
}

.hero-summary,
.section-heading p,
.contact-panel p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.06rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.1rem;
    padding: 0.85rem 1.2rem;
    border-radius: 0.85rem;
    text-decoration: none;
    font-weight: 900;
    border: 1px solid var(--border);
    transition: transform 220ms var(--ease-out), border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.button:hover {
    transform: translateY(-0.2rem);
}

.button-primary {
    background: linear-gradient(135deg, var(--brand), #fb923c);
    color: #111827;
    box-shadow: 0 20px 42px rgba(249, 115, 22, 0.3);
}

.button-secondary {
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
}

.button-secondary:hover {
    border-color: rgba(251, 146, 60, 0.55);
}

.terminal-info {
    max-width: 100%;
    margin-top: 1.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(3, 7, 13, 0.82);
    border: 1px solid rgba(249, 115, 22, 0.28);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.24);
    color: var(--text);
    font-family: "Courier New", monospace;
    overflow: hidden;
}

.terminal-info::before {
    content: "[robert@platform] $";
    color: var(--brand-2);
    margin-right: 0.55rem;
    white-space: nowrap;
}

.terminal-text {
    position: relative;
    display: inline-block;
    width: 0;
    max-width: 100%;
    padding-right: 0.9rem;
    color: var(--text);
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    animation: typewriter 1.5s steps(50, end) 0.2s both;
}

.terminal-text::after {
    content: "█";
    position: absolute;
    right: 0;
    top: 0;
    animation: blink 1s step-end infinite;
    color: var(--brand-2);
}

.hero-orbit-card {
    position: relative;
    min-height: 27rem;
    display: grid;
    place-items: center;
}

.orbit-shell {
    position: absolute;
    inset: 8%;
    border: 1px solid rgba(249, 115, 22, 0.46);
    border-radius: 50%;
    box-shadow:
        inset 0 0 92px rgba(249, 115, 22, 0.12),
        0 0 96px rgba(249, 115, 22, 0.26);
    animation: orbitPulse 4.2s ease-in-out infinite alternate;
}

.orbit-shell::before,
.orbit-shell::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px dashed rgba(96, 165, 250, 0.42);
    transform: rotate(28deg);
    animation: orbitRingSpin 13s linear infinite;
}

.orbit-shell::after {
    inset: 22%;
    border-color: rgba(74, 222, 128, 0.34);
    transform: rotate(-18deg);
    animation: orbitRingSpinReverse 16s linear infinite;
}

.orbit-dot {
    position: absolute;
    display: block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--brand-2);
    box-shadow: 0 0 28px rgba(251, 146, 60, 0.9);
    animation: orbitDotSpark 2.2s ease-in-out infinite;
}

.dot-one { top: 14%; right: 24%; }
.dot-two { bottom: 18%; left: 20%; background: var(--blue); animation-delay: 260ms; }
.dot-three { top: 48%; left: 5%; background: var(--green); animation-delay: 520ms; }

.terminal-window {
    position: relative;
    z-index: 1;
    width: min(100%, 25rem);
    padding: 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(3, 7, 13, 0.92), rgba(15, 23, 42, 0.82));
    box-shadow: var(--shadow), 0 0 0 1px rgba(249, 115, 22, 0.08);
    font-family: "Courier New", monospace;
}

.terminal-window p {
    margin-bottom: 0.85rem;
    color: var(--muted);
}

.terminal-kicker {
    color: var(--green) !important;
    font-weight: 700;
}

.terminal-window ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terminal-window li {
    margin: 0.3rem 0;
    color: var(--green);
}

.terminal-window li::before {
    content: "> ";
}

.impact-ribbon {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}

.impact-ribbon p {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(10, 17, 29, 0.7);
}

.impact-ribbon strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.impact-ribbon span {
    color: var(--muted);
    font-size: 0.94rem;
}

.section-heading {
    margin-bottom: 1.6rem;
}

.section-heading.centered {
    display: grid;
    justify-items: center;
    text-align: center;
}

.work-grid,
.capability-grid {
    display: grid;
    gap: 1rem;
}

.work-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
}

.work-card,
.capability-card,
.about-panel,
.contact-panel {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.86), rgba(15, 23, 42, 0.62));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.work-card,
.capability-card {
    position: relative;
    min-height: 22rem;
    padding: 1.35rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 220ms var(--ease-out), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.work-card:hover,
.capability-card:hover {
    transform: translateY(-0.35rem);
    border-color: rgba(249, 115, 22, 0.68);
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.11), rgba(15, 23, 42, 0.76));
    box-shadow: var(--shadow), 0 18px 44px rgba(249, 115, 22, 0.12);
}

.work-card::after,
.capability-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% 16%;
    height: 12rem;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.13), transparent 70%);
    pointer-events: none;
}

.work-card-featured {
    min-height: 26rem;
    background:
        radial-gradient(circle at 80% 15%, rgba(249, 115, 22, 0.18), transparent 15rem),
        linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(15, 23, 42, 0.66));
}

.card-kicker {
    margin-bottom: 0.65rem;
    color: var(--brand-2);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.work-card p:not(.card-kicker),
.capability-card p,
.about-copy p {
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chip-row span {
    display: inline-flex;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.09);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.84rem;
    font-weight: 700;
}

.card-link {
    position: relative;
    z-index: 1;
    color: var(--brand-2);
    font-weight: 900;
    text-decoration: none;
}

.work-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    gap: 0.55rem;
    min-height: 7rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    background: rgba(3, 7, 13, 0.42);
}

.mini-bars span {
    display: block;
    width: 100%;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.95), rgba(96, 165, 250, 0.14));
    animation: barLift 1.8s var(--ease-out) infinite alternate;
}

.mini-bars span:nth-child(1) { height: 34%; }
.mini-bars span:nth-child(2) { height: 58%; animation-delay: 120ms; }
.mini-bars span:nth-child(3) { height: 44%; animation-delay: 220ms; }
.mini-bars span:nth-child(4) { height: 72%; animation-delay: 340ms; }
.mini-bars span:nth-child(5) { height: 86%; animation-delay: 460ms; }

.flow-dots {
    align-items: center;
    justify-content: space-between;
}

.flow-dots::before {
    content: "";
    position: absolute;
    left: 2rem;
    right: 2rem;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.36), rgba(96, 165, 250, 0.68), rgba(74, 222, 128, 0.36));
    box-shadow: 0 0 24px rgba(96, 165, 250, 0.28);
    animation: flowLineGlow 2.8s ease-in-out infinite alternate;
}

.flow-dots span {
    --dot-glow: rgba(249, 115, 22, 0.76);
    color: var(--brand-2);
    position: relative;
    z-index: 1;
    width: 1.26rem;
    height: 1.26rem;
    border-radius: 999px;
    background: var(--panel-strong);
    border: 2px solid var(--brand-2);
    box-shadow: 0 0 26px rgba(249, 115, 22, 0.36);
    animation: flowDotPulse 1.75s ease-in-out infinite;
}

.flow-dots span:nth-child(2),
.flow-dots span:nth-child(3) {
    --dot-glow: rgba(96, 165, 250, 0.78);
    color: var(--blue);
    border-color: var(--blue);
    animation-delay: 180ms;
}

.flow-dots span:nth-child(4) {
    --dot-glow: rgba(74, 222, 128, 0.74);
    color: var(--green);
    border-color: var(--green);
    animation-delay: 540ms;
}

.flow-dots span:nth-child(3) {
    animation-delay: 360ms;
}

.capability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card {
    min-height: 17rem;
    justify-content: flex-start;
}

.capability-icon {
    --capability-glow: rgba(249, 115, 22, 0.18);
    display: grid;
    place-items: center;
    width: 3.35rem;
    height: 3.35rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    color: var(--brand-2);
    background: radial-gradient(circle at 35% 30%, rgba(249, 115, 22, 0.28), rgba(249, 115, 22, 0.1) 58%, rgba(15, 23, 42, 0.74));
    border: 1px solid rgba(249, 115, 22, 0.48);
    font-size: 1.24rem;
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    animation: capabilityIconGlow 2.8s ease-in-out infinite;
}

.capability-card:nth-child(2) .capability-icon {
    --capability-glow: rgba(96, 165, 250, 0.2);
    color: var(--blue);
    background: radial-gradient(circle at 35% 30%, rgba(96, 165, 250, 0.32), rgba(96, 165, 250, 0.11) 58%, rgba(15, 23, 42, 0.74));
    border-color: rgba(96, 165, 250, 0.48);
    animation-delay: 220ms;
}

.capability-card:nth-child(3) .capability-icon {
    --capability-glow: rgba(74, 222, 128, 0.18);
    color: var(--green);
    background: radial-gradient(circle at 35% 30%, rgba(74, 222, 128, 0.3), rgba(74, 222, 128, 0.1) 58%, rgba(15, 23, 42, 0.74));
    border-color: rgba(74, 222, 128, 0.42);
    animation-delay: 440ms;
}

.capability-card:nth-child(4) .capability-icon {
    animation-delay: 660ms;
}

.about-panel,
.contact-panel {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.about-panel {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2rem;
    align-items: center;
}

.about-person {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.profile-image {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(249, 115, 22, 0.45);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.about-copy {
    display: grid;
    gap: 1rem;
}

.about-copy p {
    margin-bottom: 0;
}

.contact-section {
    padding-bottom: clamp(4rem, 8vw, 6.5rem);
}

.contact-panel {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    background:
        radial-gradient(circle at 12% 15%, rgba(249, 115, 22, 0.14), transparent 16rem),
        linear-gradient(180deg, rgba(17, 24, 39, 0.86), rgba(15, 23, 42, 0.62));
}

.contact-panel h2 {
    max-width: 780px;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem;
    flex-shrink: 0;
}

/* Reveal motion */
[data-reveal] {
    opacity: 0;
    transform: translateY(1.1rem);
    transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal-group] [data-reveal]:nth-child(2) {
    transition-delay: 90ms;
}

[data-reveal-group] [data-reveal]:nth-child(3) {
    transition-delay: 180ms;
}

[data-reveal-group] [data-reveal]:nth-child(4) {
    transition-delay: 270ms;
}

.terminal-expanded {
    position: fixed;
    width: min(900px, 90%);
    height: 400px;
    top: 12%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #0b1220;
    overflow-y: auto;
    padding: 20px;
    font-family: "Courier New", monospace;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-radius: 1rem;
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 1000;
}

.terminal-expanded.active {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
}

.terminal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    z-index: 999;
}

.terminal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.command-history {
    color: var(--text);
    margin: 0;
    padding: 0;
    list-style: none;
}

.command-history li {
    margin-bottom: 8px;
}

.command-history .prompt {
    color: var(--brand-2);
    margin-right: 8px;
}

.command-history .output {
    color: var(--muted);
    margin-left: 24px;
    font-size: 0.9em;
    white-space: pre-line;
}

#matrix {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

#matrix.active {
    opacity: 1;
    z-index: 0;
}

.matrix-active main,
.matrix-active .site-header {
    opacity: 0;
    pointer-events: none;
}

.clippy-mascot {
    position: relative;
    flex-shrink: 0;
}

.clippy {
    width: 148px;
    height: 152px;
    display: block;
    object-fit: contain;
    cursor: pointer;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
}

.clippy-bubble {
    background: linear-gradient(
        160deg,
        rgba(71, 85, 105, 0.55) 0%,
        rgba(51, 65, 85, 0.92) 38%,
        rgba(36, 49, 66, 0.97) 100%
    );
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 1.15rem;
    padding: 1.1rem 1.9rem 1rem 1.2rem;
    position: relative;
    max-width: min(300px, calc(100vw - 7.5rem));
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
    box-shadow: var(--shadow), 0 0 0 1px rgba(249, 115, 22, 0.07);
}

.clippy-bubble-close {
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.clippy-bubble-close:hover,
.clippy-bubble-close:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: #111827;
    outline: none;
}

.clippy-bubble::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 1.35rem;
    width: 12px;
    height: 12px;
    background: rgb(36, 49, 66);
    border-right: 1px solid rgba(148, 163, 184, 0.45);
    border-bottom: 1px solid rgba(148, 163, 184, 0.45);
    transform: rotate(-45deg);
    z-index: 0;
}

.clippy-bubble a {
    color: var(--brand-2);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(249, 115, 22, 0.35);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.clippy-bubble a:hover {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.clippy-container {
    position: fixed;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    right: -300px;
    bottom: 30px;
    z-index: 1000;
    transition: right 0.5s ease;
    opacity: 0;
    visibility: hidden;
}

.clippy-container.active {
    right: 30px;
    opacity: 1;
    visibility: visible;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes floatOrb {
    from { transform: translate3d(-1.2rem, 0.7rem, 0) scale(0.94) rotate(-2deg); }
    to { transform: translate3d(1.7rem, -1.35rem, 0) scale(1.08) rotate(4deg); }
}

@keyframes orbitPulse {
    from { transform: rotate(-7deg) scale(0.96); opacity: 0.72; }
    to { transform: rotate(9deg) scale(1.05); opacity: 1; }
}

@keyframes orbitRingSpin {
    from { transform: rotate(28deg); }
    to { transform: rotate(388deg); }
}

@keyframes orbitRingSpinReverse {
    from { transform: rotate(-18deg); }
    to { transform: rotate(-378deg); }
}

@keyframes orbitDotSpark {
    0%, 100% {
        transform: scale(1);
        filter: saturate(1);
    }
    50% {
        transform: scale(1.42);
        filter: saturate(1.8);
        box-shadow: 0 0 0 0.38rem rgba(249, 115, 22, 0), 0 0 42px currentColor;
    }
}

@keyframes orbGlow {
    from { opacity: 0.68; filter: blur(1px) saturate(1); }
    to { opacity: 1; filter: blur(1px) saturate(1.45); }
}

@keyframes barLift {
    from { transform: scaleY(0.72); opacity: 0.58; }
    to { transform: scaleY(1); opacity: 1; }
}

@keyframes flowDotPulse {
    0%, 100% {
        transform: scale(1);
        background: var(--panel-strong);
        box-shadow: 0 0 18px rgba(249, 115, 22, 0.2);
    }
    45% {
        transform: scale(1.42);
        background: currentColor;
        box-shadow: 0 0 0 0.55rem rgba(249, 115, 22, 0), 0 0 44px var(--dot-glow);
    }
}

@keyframes capabilityIconGlow {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(249, 115, 22, 0), 0 0 0 0 rgba(249, 115, 22, 0);
    }
    50% {
        transform: translateY(-0.28rem) scale(1.12);
        box-shadow: 0 0 0 0.62rem var(--capability-glow), 0 22px 48px rgba(0, 0, 0, 0.24), 0 0 34px var(--capability-glow);
    }
}

@keyframes flowLineGlow {
    from { opacity: 0.62; filter: saturate(1); }
    to { opacity: 1; filter: saturate(1.6); }
}

@media (max-width: 1100px) {
    .hero-layout,
    .about-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-orbit-card {
        min-height: 23rem;
    }

    .work-grid,
    .capability-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-card-featured {
        grid-column: 1 / -1;
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .site-header nav {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .site-header nav::-webkit-scrollbar {
        display: none;
    }

    .site-header nav a {
        flex: 0 0 auto;
        padding: 0.45rem 0.65rem;
        font-size: 0.84rem;
        white-space: nowrap;
    }

    .hero {
        min-height: auto;
    }

    h1 {
        line-height: 1.02;
        letter-spacing: -0.058em;
    }

    .hero-layout {
        gap: 1.5rem;
    }

    .hero-orbit-card {
        min-height: 14rem;
    }

    .orbit-shell {
        inset: 18%;
        opacity: 0.66;
    }

    .terminal-window {
        width: 100%;
        padding: 1rem;
        font-size: 0.82rem;
    }

    .hero-actions,
    .contact-actions {
        width: 100%;
    }

    .button {
        width: 100%;
    }

    .impact-ribbon,
    .work-grid,
    .capability-grid {
        grid-template-columns: 1fr;
    }

    .work-card,
    .capability-card,
    .work-card-featured {
        min-height: auto;
    }

    .terminal-info {
        width: 100%;
        max-width: 100%;
        font-size: 0.76rem;
        justify-content: flex-start;
    }

    .terminal-info::before {
        display: none;
    }

    .terminal-text {
        text-overflow: ellipsis;
    }

    .about-person {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-image {
        width: 5rem;
        height: 5rem;
    }

    .clippy-container {
        --clippy-mobile-size: clamp(84px, 24vw, 116px);
        --clippy-mobile-gap: 0.5rem;
        gap: var(--clippy-mobile-gap);
        right: -100vw;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        max-width: calc(100vw - 2rem);
    }

    .clippy-container.active {
        right: 1rem;
    }

    .clippy {
        width: var(--clippy-mobile-size);
        height: auto;
    }

    .clippy-bubble {
        max-width: min(240px, calc(100vw - 2rem - var(--clippy-mobile-size) - var(--clippy-mobile-gap)));
        padding: 0.85rem 1.5rem 0.75rem 0.85rem;
        border-radius: 0.9rem;
        font-size: clamp(0.72rem, 2.7vw, 0.82rem);
        line-height: 1.4;
    }

    .clippy-bubble::after {
        bottom: 1rem;
    }

    .clippy-bubble-close {
        top: 0.4rem;
        right: 0.42rem;
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.62rem;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: clamp(3.05rem, 16.5vw, 5.25rem);
        line-height: 1.06;
        letter-spacing: -0.048em;
    }
}

@media (max-width: 400px) {
    .clippy-container {
        --clippy-mobile-size: clamp(70px, 19vw, 102px);
        --clippy-mobile-gap: 0.4rem;
    }

    .clippy-bubble {
        max-width: min(200px, calc(100vw - 2rem - var(--clippy-mobile-size) - var(--clippy-mobile-gap)));
        padding: 0.65rem 0.75rem;
        font-size: clamp(0.68rem, 3.2vw, 0.78rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
