/* ==========================================================================
   redesign.css — amansinghdev.com July 2026 redesign
   Violet-ink palette derived from the site's existing purple brand.
   Fonts: NTR (display/body) + IBM Plex Mono (labels, numbers, accents).
   ========================================================================== */

:root {
    --navy: #0f0a1f;            /* page background (violet-ink) */
    --light-navy: #191234;      /* raised surfaces, cards */
    --lightest-navy: #261c4d;   /* hovers, tab track, tags */
    --slate: #8e89a8;           /* body text */
    --light-slate: #b5afce;     /* brighter body text */
    --lightest-slate: #ded9f0;  /* headings-adjacent text */
    --white: #f4f1ff;           /* headings */
    --accent: #a88bff;          /* the one signature color */
    --accent-tint: rgba(168, 139, 255, 0.10);
    --shadow: rgba(4, 2, 12, 0.7);

    --font-body: "NTR", -apple-system, sans-serif;
    --font-mono: "IBM Plex Mono", "SF Mono", "Fira Code", monospace;

    --nav-height: 84px;
    --content-width: 1080px;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--navy);
    color: var(--slate);
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--lightest-navy);
    color: var(--lightest-slate);
}

/* Scrollbar in-palette */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb {
    background: var(--lightest-navy);
    border: 3px solid var(--navy);
    border-radius: 10px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus-visible {
    color: var(--accent);
}

a:focus-visible,
button:focus-visible {
    outline: 2px dashed var(--accent);
    outline-offset: 3px;
}

/* Inline link style with animated underline */
.link {
    position: relative;
    display: inline-block;
}

.link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.link:hover::after,
.link:focus-visible::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */

.rd-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(15, 10, 31, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

.rd-nav.is-scrolled {
    height: 66px;
    box-shadow: 0 10px 30px -10px var(--shadow);
}

.rd-nav.is-hidden {
    transform: translateY(-100%);
}

.rd-nav-logo a {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 4px;
    padding: 2px 9px;
    transition: var(--transition);
}

.rd-nav-logo a:hover {
    background: var(--accent-tint);
}

.rd-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.rd-nav-links a {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--lightest-slate);
    padding: 6px 2px;
}

.rd-nav-links a:hover {
    color: var(--accent);
}

.rd-nav-links .nav-num {
    color: var(--accent);
    margin-right: 4px;
}

.rd-resume-btn {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 10px 18px !important;
    line-height: 1;
    transition: var(--transition);
}

.rd-resume-btn:hover {
    background: var(--accent-tint);
}

.rd-nav-toggle {
    display: none;
}

/* --------------------------------------------------------------------------
   Side rails (social left, email right)
   -------------------------------------------------------------------------- */

.rd-rail {
    position: fixed;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rd-rail::after {
    content: "";
    display: block;
    width: 1px;
    height: 92px;
    margin-top: 18px;
    background: var(--light-slate);
    opacity: 0.5;
}

.rd-rail-left { left: 44px; }
.rd-rail-right { right: 44px; }

.rd-rail-left a {
    color: var(--light-slate);
    font-size: 19px;
    padding: 9px;
    transition: var(--transition);
}

.rd-rail-left a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.rd-rail-right a {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.12em;
    color: var(--light-slate);
    writing-mode: vertical-rl;
    padding: 12px 6px;
    transition: var(--transition);
}

.rd-rail-right a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Layout / sections
   -------------------------------------------------------------------------- */

.rd-main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 60px;
}

.rd-section {
    padding: 90px 0;
}

.rd-section-heading {
    display: flex;
    align-items: center;
    font-size: 42px;
    color: var(--white);
    font-weight: 400;
    margin-bottom: 34px;
    white-space: nowrap;
}

.rd-section-heading .slash {
    color: var(--accent);
    margin-right: 10px;
}

.rd-section-heading::after {
    content: "";
    display: block;
    width: 100%;
    max-width: 300px;
    height: 1px;
    background: var(--lightest-navy);
    margin-left: 24px;
}

/* Fade-in on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   Hero / intro
   -------------------------------------------------------------------------- */

.rd-hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-top: var(--nav-height);
}

.rd-hero-text {
    max-width: 560px;
}

.rd-hero-title {
    font-size: clamp(52px, 7.5vw, 82px);
    line-height: 1.05;
    color: var(--white);
    font-weight: 400;
    margin-bottom: 6px;
}

.rd-hero-title .typed-name {
    color: var(--accent);
}

.rd-hero-title .cursor {
    color: var(--accent);
    animation: rd-blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes rd-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.rd-hero-tagline {
    font-size: clamp(28px, 3.4vw, 38px);
    color: var(--slate);
    margin-bottom: 26px;
    line-height: 1.15;
}

.rd-hero-bio {
    font-size: 21px;
    color: var(--slate);
    margin-bottom: 38px;
}

.rd-hero-bio .hl {
    color: var(--accent);
}

.rd-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 16px 26px;
    transition: var(--transition);
}

.rd-cta:hover {
    background: var(--accent-tint);
}

/* --------------------------------------------------------------------------
   Interactive avatar (hero mascot)
   Idle float + breathing; nav hovers set a state class (is-about,
   is-experience, is-projects, is-contact, is-resume) that poses the
   avatar and reveals a contextual UI layer.
   -------------------------------------------------------------------------- */

.rd-avatar-stage {
    position: relative;
    flex-shrink: 0;
    user-select: none;
    /* --mx / --my (-1..1) come from the cursor via redesign.js; the figure
       tilts toward the cursor while blob and shadow shift the other way */
    --mx: 0;
    --my: 0;
    perspective: 900px;
}

/* cursor-tilt layer: plain transform driven by --mx/--my so it updates
   live every frame; the figure's idle keyframes run inside it untouched */
.rd-tilt {
    position: relative;
    z-index: 2;
    transform-origin: 50% 100%;
    transform: rotateY(calc(var(--mx) * 9deg))
               rotateX(calc(var(--my) * -6deg))
               translate3d(calc(var(--mx) * 10px), calc(var(--my) * 6px), 0);
    will-change: transform;
}

.rd-avatar {
    position: relative;
    z-index: 2;
    margin: 0;
    /* character idle: breathing + weight shift anchored at the feet —
       the character moves, not the picture */
    transform-origin: 50% 100%;
    animation: rd-idle 7s ease-in-out infinite;
}

.rd-avatar img {
    display: block;
    width: auto;
    height: min(74vh, 700px);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1);
    transform-origin: 50% 100%;
}

/* squash-and-stretch greeting when the character itself is hovered */
.rd-avatar-stage:hover .rd-avatar img {
    animation: rd-hello 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* soft shadow under the feet */
.rd-avatar-shadow {
    position: absolute;
    left: 50%;
    bottom: -14px;
    width: 55%;
    height: 18px;
    /* slides opposite the tilt for depth; margin so it can't fight the
       keyframe transform */
    margin-left: calc(var(--mx) * -12px);
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    animation: rd-shadow 6s ease-in-out infinite;
    z-index: 1;
}

/* morphing purple blob behind the avatar */
.rd-avatar-blob {
    position: absolute;
    inset: 8% -36% 2% -36%;
    z-index: 0;
    background: radial-gradient(circle at 50% 42%,
        rgba(168, 139, 255, 0.28) 0%,
        rgba(127, 77, 255, 0.14) 48%,
        transparent 74%);
    border-radius: 46% 54% 58% 42% / 48% 44% 56% 52%;
    animation: rd-blob 12s ease-in-out infinite;
    transition: filter 0.5s ease, opacity 0.5s ease;
    filter: saturate(1);
    /* drifts opposite the cursor for depth (rd-blob only animates shape) */
    transform: translate3d(calc(var(--mx) * -14px), calc(var(--my) * -9px), 0);
}

/* projects-state energy ring */
.rd-avatar-ring {
    position: absolute;
    left: 50%;
    top: 52%;
    width: 170%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(0.85);
    border: 1.5px dashed rgba(168, 139, 255, 0.55);
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: rd-ring-spin 14s linear infinite;
    pointer-events: none;
}

@keyframes rd-idle {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    18%      { transform: rotate(0.55deg) scaleY(1.012) scaleX(0.997); }
    38%      { transform: rotate(0.2deg) scaleY(1); }
    58%      { transform: rotate(-0.5deg) scaleY(1.012) scaleX(0.997) translateX(1.5px); }
    80%      { transform: rotate(-0.15deg) scaleY(1); }
}

@keyframes rd-hello {
    0%   { transform: scaleY(1); }
    30%  { transform: scaleY(0.95) scaleX(1.045); }
    62%  { transform: scaleY(1.035) scaleX(0.98) translateY(-7px); }
    100% { transform: none; }
}

@keyframes rd-shadow {
    0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.9; }
    50%      { transform: translateX(-50%) scaleX(0.93); opacity: 0.72; }
}

@keyframes rd-blob {
    0%, 100% { border-radius: 46% 54% 58% 42% / 48% 44% 56% 52%; opacity: 0.85; }
    33%      { border-radius: 56% 44% 46% 54% / 42% 56% 44% 58%; opacity: 1; }
    66%      { border-radius: 44% 56% 52% 48% / 56% 46% 54% 44%; opacity: 0.8; }
}

@keyframes rd-ring-spin {
    to { transform: translate(-50%, -50%) scale(0.85) rotate(360deg); }
}

/* ---- avatar poses per state (subtle image transforms) ---- */

.rd-avatar-stage.is-about .rd-avatar img      { transform: rotate(-2.5deg) translateY(-5px); }
.rd-avatar-stage.is-experience .rd-avatar img { transform: scale(1.02) rotate(1deg); }
.rd-avatar-stage.is-projects .rd-avatar img   { transform: scale(1.03) rotate(1.5deg) translateY(2px); }
.rd-avatar-stage.is-contact .rd-avatar img    { transform: rotate(-4deg) translateX(-6px); }
.rd-avatar-stage.is-resume .rd-avatar img     { transform: scale(1.015); }

.rd-avatar-stage.is-about .rd-avatar-blob {
    filter: saturate(1.5) brightness(1.25);
}

.rd-avatar-stage.is-projects .rd-avatar-ring {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ---- contextual UI layers ---- */

.rd-ax {
    position: absolute;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
    pointer-events: none;
}

.rd-avatar-stage.is-about .rd-ax-about,
.rd-avatar-stage.is-experience .rd-ax-experience,
.rd-avatar-stage.is-projects .rd-ax-projects,
.rd-avatar-stage.is-contact .rd-ax-contact,
.rd-avatar-stage.is-resume .rd-ax-resume {
    opacity: 1;
    transform: none;
}

.rd-ax-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--lightest-slate);
    background: rgba(25, 18, 52, 0.95);
    border: 1px solid var(--lightest-navy);
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px -12px var(--shadow);
    max-width: 240px;
}

.rd-ax-about { top: 2%; right: calc(100% + 18px); left: auto; }

.rd-ax-spark {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: rd-spark 1.6s ease-in-out infinite;
}

.rd-ax-spark.s1 { top: -8px; right: 12px; }
.rd-ax-spark.s2 { bottom: -6px; left: 18px; animation-delay: 0.4s; }
.rd-ax-spark.s3 { top: 40%; right: -8px; animation-delay: 0.8s; width: 3.5px; height: 3.5px; }

@keyframes rd-spark {
    0%, 100% { opacity: 0.2; transform: scale(0.7); }
    50%      { opacity: 1; transform: scale(1.25); }
}

.rd-ax-card {
    background: rgba(25, 18, 52, 0.95);
    border: 1px solid var(--lightest-navy);
    border-left: 2px solid var(--accent);
    border-radius: 6px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px -12px var(--shadow);
    min-width: 220px;
    position: relative;
}

.rd-ax-title {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.rd-ax-sub {
    font-size: 16.5px;
    color: var(--lightest-slate);
    line-height: 1.4;
}

.rd-ax-mono {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--slate);
    margin-top: 4px;
}

.rd-ax-experience { top: 16%; right: calc(100% + 18px); left: auto; }

.rd-ax-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 12px;
}

.rd-ax-timeline span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    position: relative;
}

.rd-ax-timeline span:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 38px;
    height: 1px;
    background: rgba(168, 139, 255, 0.4);
}

.rd-ax-timeline span:not(:first-child) {
    margin-left: 38px;
}

.rd-ax-projects .rd-ax-label {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.rd-ax-projects {
    inset: 0;
}

.rd-ax-chip {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(25, 18, 52, 0.95);
    border: 1px solid var(--lightest-navy);
    color: var(--accent);
    font-size: 17px;
    box-shadow: 0 10px 24px -10px var(--shadow);
    animation: rd-chip-bob 3s ease-in-out infinite;
}

.rd-ax-chip.c1 { top: 14%; left: -34%; }
.rd-ax-chip.c2 { top: 10%; right: -32%; animation-delay: 0.5s; }
.rd-ax-chip.c3 { top: 48%; left: -42%; animation-delay: 1s; }
.rd-ax-chip.c4 { top: 44%; right: -40%; animation-delay: 1.5s; }

@keyframes rd-chip-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.rd-ax-contact { top: 6%; right: calc(100% + 18px); left: auto; }

.rd-ax-bubble {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--lightest-slate);
    background: rgba(25, 18, 52, 0.95);
    border: 1px solid var(--lightest-navy);
    border-radius: 12px 12px 2px 12px;
    padding: 11px 15px;
    box-shadow: 0 10px 30px -12px var(--shadow);
    white-space: nowrap;
}

.rd-ax-bubble i {
    color: var(--accent);
    margin-right: 6px;
    animation: rd-mail-bob 1.4s ease-in-out infinite;
    display: inline-block;
}

@keyframes rd-mail-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.rd-ax-resume { top: 12%; left: calc(100% + 18px); right: auto; }

.rd-ax-doc .rd-ax-dl {
    position: absolute;
    top: 12px;
    right: 14px;
    color: var(--accent);
    font-size: 14px;
    animation: rd-mail-bob 1.4s ease-in-out infinite;
}

/* glow states for CTA + resume nav button */
.rd-cta.is-glow {
    background: var(--accent-tint);
    box-shadow: 0 0 26px rgba(168, 139, 255, 0.45);
    animation: rd-glow-pulse 1.6s ease-in-out infinite;
}

.rd-resume-btn.is-glow {
    background: var(--accent-tint);
    box-shadow: 0 0 18px rgba(168, 139, 255, 0.5);
}

@keyframes rd-glow-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(168, 139, 255, 0.3); }
    50%      { box-shadow: 0 0 30px rgba(168, 139, 255, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .rd-avatar,
    .rd-avatar-shadow,
    .rd-avatar-blob,
    .rd-avatar-ring,
    .rd-ax-spark,
    .rd-ax-chip,
    .rd-ax-bubble i,
    .rd-ax-doc .rd-ax-dl,
    .rd-cta.is-glow,
    .rd-resume-btn.is-glow {
        animation: none;
    }

    .rd-avatar img,
    .rd-avatar-stage:hover .rd-avatar img {
        transition: none;
        animation: none;
    }

    .rd-ax {
        transition: opacity 0.2s ease;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.rd-about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: flex-start;
}

.rd-about-text p {
    margin-bottom: 18px;
}

.rd-about-text .hl {
    color: var(--accent);
}

.rd-tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 220px));
    gap: 4px 14px;
    margin-top: 22px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--light-slate);
}

.rd-tech-list li::before {
    content: "\25B9";
    color: var(--accent);
    margin-right: 8px;
}

.rd-photo {
    position: relative;
    max-width: 300px;
    margin-left: auto;
}

.rd-photo img {
    display: block;
    width: 100%;
    border-radius: 5px;
    filter: grayscale(35%) contrast(1);
    transition: var(--transition);
}

.rd-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent);
    border-radius: 5px;
    transform: translate(14px, 14px);
    z-index: -1;
    transition: var(--transition);
}

.rd-photo:hover img {
    filter: none;
}

.rd-photo:hover::after {
    transform: translate(9px, 9px);
}

/* --------------------------------------------------------------------------
   Experience — tabbed
   -------------------------------------------------------------------------- */

.rd-exp {
    display: flex;
    gap: 36px;
    min-height: 320px;
}

.rd-exp-tabs {
    display: flex;
    flex-direction: column;
    position: relative;
    border-left: 2px solid var(--lightest-navy);
}

.rd-exp-tab {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--slate);
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    margin-left: -2px;
    padding: 12px 22px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.rd-exp-tab:hover {
    color: var(--accent);
    background: var(--accent-tint);
}

.rd-exp-tab.is-active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-tint);
}

.rd-exp-panel {
    display: none;
}

.rd-exp-panel.is-active {
    display: block;
    animation: rd-panel-in 0.3s ease;
}

@keyframes rd-panel-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.rd-exp-panel h3 {
    font-size: 26px;
    color: var(--lightest-slate);
    font-weight: 400;
}

.rd-exp-panel h3 .at {
    color: var(--accent);
}

.rd-exp-panel .rd-exp-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--slate);
    margin: 6px 0 18px;
}

.rd-exp-panel ul {
    list-style: none;
}

.rd-exp-panel li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    font-size: 19px;
}

.rd-exp-panel li::before {
    content: "\25B9";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Projects — grid cards */

.rd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.rd-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--light-navy);
    border-radius: 5px;
    padding: 28px 26px;
    box-shadow: 0 10px 30px -15px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.rd-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -15px var(--shadow);
}

.rd-card:hover .rd-card-title {
    color: var(--accent);
}

.rd-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.rd-card-top .folder {
    color: var(--accent);
    font-size: 34px;
}

.rd-card-top .out {
    color: var(--light-slate);
    font-size: 18px;
}

.rd-card-title {
    font-size: 24px;
    color: var(--lightest-slate);
    font-weight: 400;
    margin-bottom: 8px;
    transition: var(--transition);
}

.rd-card-title a {
    color: inherit;
}

.rd-card-title a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.rd-card-desc {
    font-size: 17.5px;
    color: var(--light-slate);
    flex-grow: 1;
    margin-bottom: 20px;
}

.rd-card-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--slate);
}

/* Projects — featured slider */

.rd-slider-wrap {
    margin-bottom: 64px;
}

.rd-slider {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 8.5;
    min-height: 340px;
    background: var(--light-navy);
    box-shadow: 0 20px 40px -18px var(--shadow);
}

.rd-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.rd-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.rd-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55);
}

.rd-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(15, 10, 31, 0.92) 0%,
        rgba(15, 10, 31, 0.35) 48%,
        rgba(15, 10, 31, 0.12) 100%);
}

.rd-slide-content {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: min(660px, 88%);
    text-align: center;
    z-index: 2;
}

.rd-slide-content h3 {
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 6px;
}

.rd-slide-content h3 a {
    color: var(--white);
}

.rd-slide-content h3 a:hover {
    color: var(--accent);
}

.rd-slide-content p {
    font-size: 17.5px;
    line-height: 1.5;
    color: var(--lightest-slate);
    margin-bottom: 8px;
}

.rd-slide-content .rd-slide-tech {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: var(--light-slate);
    text-transform: uppercase;
}

.rd-slide-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--lightest-slate);
    font-size: 19px;
}

.rd-slide-link:hover {
    color: var(--accent);
}

.rd-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: none;
    border: none;
    color: rgba(244, 241, 255, 0.6);
    font-size: 30px;
    cursor: pointer;
    padding: 14px;
    transition: var(--transition);
}

.rd-slider-arrow:hover {
    color: var(--accent);
}

.rd-slider-arrow.prev { left: 8px; }
.rd-slider-arrow.next { right: 8px; }

.rd-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.rd-slider-dots button {
    width: 26px;
    height: 4px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: var(--lightest-navy);
    cursor: pointer;
    transition: var(--transition);
}

.rd-slider-dots button:hover {
    background: var(--slate);
}

.rd-slider-dots button.is-active {
    background: var(--accent);
}

/* --------------------------------------------------------------------------
   Contact + footer
   -------------------------------------------------------------------------- */

.rd-contact {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
    padding: 110px 0 90px;
}

.rd-contact .rd-overline {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 14px;
}

.rd-contact h2 {
    font-size: clamp(40px, 5.5vw, 56px);
    color: var(--white);
    font-weight: 400;
    margin-bottom: 14px;
}

.rd-contact p {
    margin-bottom: 40px;
}

.rd-footer {
    text-align: center;
    padding: 26px 20px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--slate);
}

.rd-footer a {
    color: var(--slate);
}

.rd-footer a:hover {
    color: var(--accent);
}

.rd-footer .rd-footer-social {
    display: none;
    justify-content: center;
    gap: 26px;
    margin-bottom: 16px;
    font-size: 19px;
}

/* --------------------------------------------------------------------------
   Game toggle + overlay
   -------------------------------------------------------------------------- */

.rd-game-toggle {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 70;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    background: var(--navy);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px -12px var(--shadow);
}

.rd-game-toggle:hover {
    background: var(--accent-tint);
}

.rd-game-info {
    position: fixed;
    right: 26px;
    bottom: 74px;
    z-index: 70;
    max-width: 250px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--light-slate);
    background: var(--light-navy);
    border: 1px solid var(--lightest-navy);
    border-radius: 5px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px -12px var(--shadow);
}

.rd-game-info .k {
    color: var(--accent);
}

#combo-game-canvas {
    position: fixed;
    inset: 0;
    z-index: 65;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .rd-main { padding: 0 56px; }
}

@media (max-width: 860px) {
    .rd-main { padding: 0 36px; }
    .rd-rail { display: none; }

    .rd-hero {
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 30px;
    }

    .rd-avatar-stage {
        width: min(300px, 78vw);
        margin: 0 auto;
        align-self: center;
    }

    /* side cards would overflow small screens; pin inside the stage */
    .rd-ax-about, .rd-ax-experience, .rd-ax-contact { right: auto; left: 0; }
    .rd-ax-resume { left: auto; right: 0; }
    .rd-ax-chip.c1, .rd-ax-chip.c3 { left: -6%; }
    .rd-ax-chip.c2, .rd-ax-chip.c4 { right: -6%; }
    .rd-avatar img { height: min(52vh, 480px); margin: 0 auto; }

    .rd-about-grid { grid-template-columns: 1fr; }
    .rd-photo { margin: 10px auto 0; }

    .rd-exp { flex-direction: column; }
    .rd-exp-tabs {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 2px solid var(--lightest-navy);
    }
    .rd-exp-tab {
        border-left: none;
        border-bottom: 2px solid transparent;
        margin-left: 0;
        margin-bottom: -2px;
        padding: 12px 16px;
    }
    .rd-exp-tab.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }

    .rd-slider {
        aspect-ratio: auto;
        height: 480px;
    }
    .rd-slide-content { bottom: 24px; }
    .rd-slide-content h3 { font-size: 26px; }
    .rd-slide-content p { font-size: 16px; }

    .rd-game-toggle,
    .rd-game-info { display: none !important; }

    .rd-footer .rd-footer-social { display: flex; }
}

@media (max-width: 640px) {
    .rd-nav { padding: 0 24px; }
    .rd-nav-links { display: none; }
    .rd-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--accent);
        font-size: 24px;
        cursor: pointer;
    }
    .rd-nav-links.is-open {
        display: flex;
        position: fixed;
        top: var(--nav-height);
        right: 0;
        flex-direction: column;
        background: var(--light-navy);
        width: min(75vw, 320px);
        padding: 34px 30px;
        gap: 22px;
        border-radius: 0 0 0 8px;
        box-shadow: 0 20px 40px -12px var(--shadow);
    }
    .rd-section-heading { font-size: 32px; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .fade-in-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .rd-hero-title .cursor { animation: none; }

    .rd-game-toggle,
    .rd-game-info { display: none !important; }
}

/* --------------------------------------------------------------------------
   Custom reticle cursor (js/cursor.js)
   Accent dot tracks the pointer exactly; the crosshair ring trails with
   easing and locks on (grows + quarter-turn) over anything clickable.
   Only mounted on fine-pointer devices without reduced motion — everyone
   else keeps the native cursor.
   -------------------------------------------------------------------------- */

html.rd-cursor-on,
html.rd-cursor-on * { cursor: none !important; }

/* the native cursor still makes sense over these */
html.rd-cursor-on video,
html.rd-cursor-on input,
html.rd-cursor-on textarea,
html.rd-cursor-on select { cursor: auto !important; }

.rd-cursor,
.rd-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rd-cursor.is-on,
.rd-cursor-dot.is-on { opacity: 1; }

.rd-cursor-dot::before {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(168, 139, 255, 0.9);
}

.rd-cursor-ring {
    position: relative;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1.5px solid rgba(168, 139, 255, 0.55);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1),
                border-color 0.3s ease;
}

/* crosshair ticks at N / S and W / E */
.rd-cursor-ring::before,
.rd-cursor-ring::after {
    content: "";
    position: absolute;
}

.rd-cursor-ring::before {
    left: 50%;
    top: -5px;
    bottom: -5px;
    width: 1.5px;
    margin-left: -0.75px;
    background: linear-gradient(to bottom,
        rgba(168, 139, 255, 0.9) 0 6px,
        transparent 6px calc(100% - 6px),
        rgba(168, 139, 255, 0.9) calc(100% - 6px) 100%);
}

.rd-cursor-ring::after {
    top: 50%;
    left: -5px;
    right: -5px;
    height: 1.5px;
    margin-top: -0.75px;
    background: linear-gradient(to right,
        rgba(168, 139, 255, 0.9) 0 6px,
        transparent 6px calc(100% - 6px),
        rgba(168, 139, 255, 0.9) calc(100% - 6px) 100%);
}

/* lock-on over clickables: grow + quarter-turn, ticks become corners */
.rd-cursor.is-lock .rd-cursor-ring {
    transform: scale(1.45) rotate(45deg);
    border-color: rgba(168, 139, 255, 0.95);
}

/* press: quick squeeze */
.rd-cursor.is-down .rd-cursor-ring {
    transform: scale(0.8);
}

.rd-cursor.is-lock.is-down .rd-cursor-ring {
    transform: scale(1.15) rotate(45deg);
}
