/* =====================================================
   Aswin Kumar — Portfolio
   ===================================================== */

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

:root {
    --bg:        #0b0b0f;
    --bg-alt:    #101016;
    --surface:   #15151d;
    --surface-2: #1b1b25;
    --border:    #23232e;
    --text:      #e6e6ea;
    --muted:     #8a8a97;
    --accent:    #ff6b6b;
    --accent-2:  #ffb199;
    --accent-3:  #7c5cff;
    --radius:    14px;
    --max:       1080px;
    --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(255,107,107,0.1); color: var(--accent); padding: 1px 6px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }

/* ---------- NAV + ak. logo ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background: rgba(11, 11, 15, 0.72);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.ak-logo {
    width: 64px;
    height: 32px;
    overflow: visible;
    transform-origin: 50% 60%;
    transition: filter .3s ease;
}
.ak-text {
    fill: transparent;
    stroke: var(--text);
    stroke-width: 1.2;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 280;
    stroke-dashoffset: 280;
    animation: ak-draw 4.5s cubic-bezier(.4,0,.2,1) .2s forwards;
    transition: stroke .3s ease, fill .3s ease;
    paint-order: stroke fill;
}
.ak-underline {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: ak-draw 1.8s cubic-bezier(.4,0,.2,1) 1.4s forwards;
}
@keyframes ak-draw {
    to { stroke-dashoffset: 0; }
}
.ak-dot {
    fill: var(--accent);
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: ak-pulse 1.8s ease-in-out 1.2s infinite;
}
.ak-ring {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: 50% 50%;
    opacity: 0;
}
.nav__brand:hover .ak-text { stroke: var(--accent); }
.nav__brand:hover .ak-logo {
    filter: drop-shadow(0 0 10px rgba(255,107,107,0.45));
}
.nav__brand:hover .ak-text {
    animation: ak-redraw-text 3s cubic-bezier(.4,0,.2,1) forwards;
}
.nav__brand:hover .ak-dot {
    animation: ak-pop .9s cubic-bezier(.4,0,.2,1);
}
.nav__brand:hover .ak-ring {
    animation: ak-ring-out .9s ease-out;
}
.nav__brand:hover .ak-underline {
    animation: ak-redraw 1.6s cubic-bezier(.4,0,.2,1) forwards;
    stroke: var(--accent-2);
}
@keyframes ak-redraw {
    0%   { stroke-dashoffset: 60; }
    100% { stroke-dashoffset: 0;  }
}
@keyframes ak-redraw-text {
    0%   { stroke-dashoffset: 280; }
    100% { stroke-dashoffset: 0;  }
}

@keyframes ak-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.25); opacity: 0.75; }
}
@keyframes ak-wave {
    0%   { transform: translateY(0)    rotate(0deg); }
    25%  { transform: translateY(-2px) rotate(-6deg); }
    55%  { transform: translateY(0)    rotate(4deg); }
    80%  { transform: translateY(-1px) rotate(-2deg); }
    100% { transform: translateY(0)    rotate(0deg); }
}
@keyframes ak-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.6); }
    70%  { transform: scale(0.85); }
    100% { transform: scale(1); }
}
@keyframes ak-ring-out {
    0%   { transform: scale(1);   opacity: 0.9; stroke-width: 2; }
    100% { transform: scale(3.2); opacity: 0;   stroke-width: 0.5; }
}

/* Removed: legacy stroke-draw + jump/bounce */

.nav__links {
    display: flex;
    gap: 26px;
    font-size: 14px;
    color: var(--muted);
}
.nav__links a {
    transition: color .2s ease;
    position: relative;
    padding: 8px 4px;
    display: inline-block;
}
.nav__links a:not(.nav__gh)::after {
    content: "";
    position: absolute;
    left: 4px; right: 4px; bottom: 2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
}
.nav__links a:not(.nav__gh):hover::after { transform: scaleX(1); }
.nav__links a:hover { color: var(--text); }
.nav__gh { color: var(--accent) !important; }

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .ak-text, .ak-dot, .ak-ring, .ak-underline { animation: none !important; opacity: 1; stroke-dashoffset: 0 !important; }
}

/* ---------- HERO ---------- */
.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 120px 32px 80px;
    position: relative;
}
.hero::before {
    content: "";
    position: absolute;
    top: 40px; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.14), transparent 60%);
    filter: blur(40px);
    pointer-events: none;
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -20px); }
}

.eyebrow {
    font-family: var(--mono);
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 20px;
}

.hero__title {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 24px;
}
.accent {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__sub {
    max-width: 580px;
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 36px;
}

.hero__cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
    cursor: pointer;
}
.btn--primary { background: var(--accent); color: #1a0a0a; }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-2); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 13px; }

.hero__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}
.hero__stack span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: all .3s ease;
}
.hero__stack span:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- SECTION ---------- */
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 80px 32px;
}
.section--alt {
    background: var(--bg-alt);
    max-width: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section--alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.section__head p { color: var(--muted); margin: 0; font-size: 14px; max-width: 440px; }
.section__head a { color: var(--accent); }
.section__head a:hover { text-decoration: underline; }

/* ---------- FEATURED CARD (AutoDOM) ---------- */
.featured {
    --rx: 0deg;
    --ry: 0deg;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .3s ease, border-color .3s ease;
    cursor: pointer;
}
.featured:hover { border-color: var(--accent); }
.featured__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,107,107,0.15), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(124,92,255,0.18), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(255,107,107,0.12), transparent 40%);
    pointer-events: none;
    transition: opacity .3s ease;
}
.featured__content {
    position: relative;
    z-index: 1;
}
.featured__content h3 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 14px;
}
.featured__content p {
    color: var(--muted);
    margin: 0 0 22px;
    max-width: 520px;
}
.featured__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}
.featured__meta span {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(11,11,15,0.4);
}
.featured__cta .card__link { font-size: 15px; }

/* Animated browser art */
.featured__art {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}
.browser {
    width: 280px;
    height: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,107,107,0.1);
    animation: browser-float 5s ease-in-out infinite;
}
@keyframes browser-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.browser__bar {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.browser__bar span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.browser__bar span:nth-child(1) { background: #ff5f56; }
.browser__bar span:nth-child(2) { background: #ffbd2e; }
.browser__bar span:nth-child(3) { background: #27c93f; }
.browser__body {
    position: relative;
    padding: 18px;
    height: calc(100% - 32px);
}
.browser__body .line {
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--border) 0%, var(--border) 50%, transparent 50%);
    background-size: 200% 100%;
    margin-bottom: 12px;
    animation: typing 2s ease-in-out infinite;
}
.browser__body .l1 { width: 75%; animation-delay: 0s; }
.browser__body .l2 { width: 50%; animation-delay: 0.3s; }
.browser__body .l3 { width: 60%; animation-delay: 0.6s; }
@keyframes typing {
    0%   { background-position: 100% 0; }
    50%  { background-position: 0 0; }
    100% { background-position: -100% 0; }
}
.cursor {
    position: absolute;
    right: 30px; bottom: 30px;
    width: 16px; height: 16px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: cursor-move 3s ease-in-out infinite;
}
.cursor::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: cursor-ring 1.5s ease-out infinite;
}
@keyframes cursor-move {
    0%   { right: 30px;  bottom: 30px; }
    33%  { right: 120px; bottom: 60px; }
    66%  { right: 70px;  bottom: 90px; }
    100% { right: 30px;  bottom: 30px; }
}
@keyframes cursor-ring {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ---------- GRID / CARDS ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.grid--plugins {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--mx, -100px) var(--my, -100px), rgba(255,107,107,0.10), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card__tag {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 14px;
}
.card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}
.card p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 16px;
    flex: 1;
}
.card__link {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.card--plugin ul.plugin-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.card--plugin ul.plugin-features li {
    position: relative;
    padding-left: 18px;
}
.card--plugin ul.plugin-features li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chips {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chips a {
    display: inline-block;
    padding: 5px 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all .2s ease;
}
.chips a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- ABOUT ---------- */
.about {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}
.about h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 20px; }
.about__text p { color: var(--muted); margin: 0 0 16px; }
.about__text strong { color: var(--text); font-weight: 500; }
.about .quote {
    margin-top: 24px;
    padding-left: 16px;
    border-left: 2px solid var(--accent);
    font-style: italic;
    font-size: 14px;
}
.about .quote span { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 12px; }
.about__meta { display: grid; gap: 18px; font-size: 14px; }
.about__meta > div {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all .25s ease;
}
.about__meta > div:hover { border-color: var(--accent); transform: translateX(4px); }
.about__meta span {
    display: block;
    font-family: var(--mono);
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.about__meta p { margin: 0; }

/* ---------- CONTACT ---------- */
.contact { text-align: center; padding-top: 120px; padding-bottom: 120px; }
.contact h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.contact__sub { color: var(--muted); max-width: 480px; margin: 0 auto 36px; }

.socials {
    list-style: none;
    padding: 0;
    margin: 48px 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-size: 14px;
    color: var(--muted);
}
.socials a { transition: color .2s ease; position: relative; }
.socials a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    height: 1px; width: 0;
    background: var(--accent);
    transition: width .25s ease;
}
.socials a:hover { color: var(--accent); }
.socials a:hover::after { width: 100%; }

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 28px 32px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-family: var(--mono);
}
.footer a { color: var(--accent); }

/* =====================================================
   Case study pages
   ===================================================== */

.cs-header {
    position: relative;
    padding: 40px 32px 30px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    overflow: hidden;
}
.cs-header::before {
    content: "";
    position: absolute;
    top: -40%; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 500px;
    background: radial-gradient(circle, rgba(255,107,107,0.1), transparent 60%);
    filter: blur(40px);
    pointer-events: none;
}
.cs-header__row {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}
.cs-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(21,21,29,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.cs-back__icon {
    width: 16px;
    height: 16px;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cs-back:hover {
    color: var(--accent);
    border-color: rgba(255,107,107,0.5);
    background: rgba(255,107,107,0.08);
    transform: translateX(-2px);
}
.cs-back:hover .cs-back__icon {
    transform: translateX(-4px);
}

.cs-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 60px 32px 40px;
    position: relative;
}
.cs-hero__eyebrow {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 13px;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.cs-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.1;
    margin: 0 0 18px;
}
.cs-hero__sub {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 680px;
    margin: 0 0 28px;
}
.cs-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
}
.cs-hero__meta > div span {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    color: var(--muted);
}
.cs-hero__meta > div p { margin: 0; color: var(--text); }
.cs-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.cs-body {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 32px 100px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.cs-body h2 {
    font-size: 1.5rem;
    margin: 20px 0 12px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.cs-body h2::before {
    content: "";
    display: inline-block;
    width: 24px; height: 2px;
    background: var(--accent);
    flex-shrink: 0;
    transform: translateY(-6px);
}
.cs-body p { color: var(--muted); margin: 0 0 14px; }
.cs-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: grid;
    gap: 8px;
}
.cs-body ul li {
    position: relative;
    padding-left: 22px;
    color: var(--muted);
    font-size: 15px;
}
.cs-body ul li::before {
    content: "▹";
    position: absolute;
    left: 0; top: 0;
    color: var(--accent);
}
.cs-body strong { color: var(--text); font-weight: 500; }
.cs-body a { color: var(--accent); }
.cs-body a:hover { text-decoration: underline; }

.cs-figure {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: transform .3s ease, box-shadow .3s ease;
}
.cs-figure:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.cs-figure img { display: block; width: 100%; height: auto; }
.cs-figure figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.cs-callout {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(124,92,255,0.08));
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
}
.cs-callout strong { color: var(--accent); }

.cs-spotlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 28px 0 8px;
}
.cs-spotlight {
    position: relative;
    padding: 22px 22px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease;
}
.cs-spotlight:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}
.cs-spotlight::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-3));
    opacity: .9;
}
.cs-spotlight__tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--accent);
    background: rgba(255,107,107,0.10);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.cs-spotlight h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--text);
    font-weight: 600;
}
.cs-spotlight p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}
.cs-spotlight ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
}
.cs-spotlight ul li {
    padding: 3px 0 3px 14px;
    position: relative;
}
.cs-spotlight ul li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.cs-spotlight kbd {
    font-family: var(--mono);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text);
}

.cs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.cs-stats > div {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all .25s ease;
}
.cs-stats > div:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.cs-stats strong {
    display: block;
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 6px;
}
.cs-stats span {
    font-size: 13px;
    color: var(--muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
    .featured { grid-template-columns: 1fr; padding: 32px; }
    .featured__art { order: -1; }
    .browser { width: 100%; max-width: 320px; }
}
@media (max-width: 720px) {
    .nav { padding: 12px 20px; }
    .nav__links { gap: 16px; font-size: 13px; }
    .nav__links a:not(.nav__gh):nth-child(3) { display: none; }
    .hero { padding: 80px 20px 60px; }
    .section { padding: 60px 20px; }
    .about { grid-template-columns: 1fr; gap: 32px; }
    .cs-hero { padding: 40px 20px 30px; }
    .cs-body { padding: 30px 20px 80px; }
    .cs-header { padding: 24px 20px 20px; }
}

/* ---------- Binary scramble on hero name ---------- */
.binary-flip {
    position: relative;
    display: inline-block;
    cursor: default;
    transition: text-shadow .3s ease, letter-spacing .3s ease;
}
.binary-flip.is-scrambling {
    font-family: var(--mono);
    letter-spacing: 0.01em;
    text-shadow:
        0 0 10px rgba(255,107,107,0.45),
        0 0 18px rgba(124,92,255,0.3);
}
.binary-flip::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 6px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(255,107,107,0.55), rgba(124,92,255,0.25) 55%, transparent 75%);
    filter: blur(6px);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .35s ease, transform .35s ease;
    pointer-events: none;
}
.binary-flip:hover::after,
.binary-flip:focus-visible::after,
.binary-flip.is-scrambling::after {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Stronger hover on work + plugin cards ---------- */
.card {
    transition: transform .3s cubic-bezier(.2,.8,.2,1),
                border-color .3s ease,
                box-shadow .3s ease,
                background .3s ease;
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,107,107,0) 0%, rgba(255,107,107,.55) 50%, rgba(124,92,255,0) 100%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
            mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow:
        0 18px 40px -20px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,107,107,0.15),
        0 0 30px -10px rgba(255,107,107,0.35);
    background: var(--surface-2);
}
.card:hover::after { opacity: 1; }
.card:hover .card__tag { color: var(--accent); }
.card:hover h3 { transform: translateY(-1px); }
.card h3 { transition: transform .3s ease; }
.card__link { display: inline-block; transition: transform .25s ease; }
.card:hover .card__link { transform: translateX(4px); }
.card--plugin:hover .plugin-features li::before {
    animation: feature-blink 1.2s ease-in-out infinite;
}
.card--plugin .plugin-features li::before { transition: color .2s ease; }
@keyframes feature-blink {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50%      { opacity: .55; transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
    .ak-logo,
    .nav__brand:hover .ak-text,
    .nav__brand:hover .ak-dot,
    .nav__brand:hover .ak-ring,
    .binary-flip, .card, .card:hover,
    .card--plugin:hover .plugin-features li::before {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* ---------- Hero language code preview ---------- */
.code-preview {
    position: relative;
    margin: 0;
    padding: 0 16px;
    max-height: 0;
    max-width: min(560px, 100%);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: clamp(11px, 1.1vw, 13px);
    line-height: 1.55;
    color: var(--text);
    white-space: pre;
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease,
                transform .3s ease,
                max-height .35s ease,
                padding .3s ease,
                margin .3s ease,
                background .3s ease,
                border-color .3s ease;
}
.code-preview.is-active {
    opacity: 1;
    transform: translateY(0);
    max-height: 260px;
    padding: 14px 16px 14px 18px;
    margin-top: 18px;
    overflow: auto;
    background: var(--surface);
    border-color: rgba(255,107,107,0.35);
}
.code-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at 0% 0%, rgba(255,107,107,0.08), transparent 60%);
    pointer-events: none;
}
.code-preview__lang {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 8px;
    padding: 2px 8px;
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: 999px;
    background: rgba(255,107,107,0.06);
}
.code-preview__lang:empty { display: none; }
.code-preview__code {
    display: block;
    color: var(--text);
    white-space: pre;
}
.code-preview__caret {
    display: inline-block;
    width: 7px;
    height: 14px;
    margin-left: 2px;
    vertical-align: -2px;
    background: var(--accent);
    animation: caret-blink 1s steps(2) infinite;
    opacity: 0;
}
.code-preview.is-active .code-preview__caret { opacity: 1; }
@keyframes caret-blink {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.hero__stack span { cursor: pointer; }

/* On touch / no-hover devices: keep snappy, no fade animation, allow horizontal scroll */
@media (hover: none) {
    .code-preview { transition: opacity .2s ease, max-height .2s ease, padding .2s ease, margin .2s ease; }
}

/* Very small screens — tighter padding so the preview never overflows */
@media (max-width: 480px) {
    .code-preview { font-size: 11px; }
    .code-preview.is-active { padding: 12px 12px 12px 14px; max-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    .code-preview, .code-preview__caret { transition: none; animation: none; }
}
