/* ===================================
   Sughosha K Joshi Portfolio
   Full UI refresh: kinetic studio + 3D portfolio lab
   =================================== */

:root {
    color-scheme: dark;
    --bg: #0b0f14;
    --bg-soft: #111821;
    --panel: rgba(20, 28, 38, 0.82);
    --panel-solid: #151d27;
    --panel-lift: rgba(28, 38, 49, 0.94);
    --ink: #edf2f7;
    --muted: #a2adba;
    --dim: #74808d;
    --line: rgba(205, 218, 230, 0.12);
    --line-strong: rgba(205, 218, 230, 0.2);
    --aqua: #55b9b3;
    --coral: #e88b91;
    --amber: #c7a86b;
    --lime: #86b99b;
    --violet: #8d98aa;
    --radius: 8px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --soft-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-mode {
    color-scheme: light;
    --bg: #f5f7f8;
    --bg-soft: #e9edf0;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-solid: #ffffff;
    --panel-lift: rgba(255, 255, 255, 0.94);
    --ink: #17202a;
    --muted: #586574;
    --dim: #77828d;
    --line: rgba(18, 19, 26, 0.12);
    --line-strong: rgba(18, 19, 26, 0.22);
    --shadow: 0 24px 70px rgba(18, 19, 26, 0.14);
    --soft-shadow: 0 14px 40px rgba(18, 19, 26, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 14% 8%, rgba(85, 185, 179, 0.075), transparent 28%),
        radial-gradient(circle at 88% 34%, rgba(141, 152, 170, 0.055), transparent 26%),
        linear-gradient(180deg, var(--bg), var(--bg-soft) 52%, var(--bg));
    line-height: 1.65;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -4;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(205, 218, 230, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(205, 218, 230, 0.024) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 88%);
}

body.light-mode::before {
    background-image:
        linear-gradient(rgba(18, 19, 26, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 19, 26, 0.045) 1px, transparent 1px);
}

body.menu-open {
    overflow: hidden;
}

::selection {
    background: var(--aqua);
    color: #081113;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--aqua);
    border: 2px solid var(--bg);
    border-radius: 999px;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--aqua);
    outline-offset: 4px;
}

body .container {
    width: min(1160px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto;
}

/* ===================================
   Kinetic Background
   =================================== */

.hero-3d-container {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    opacity: 0.82;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.background-animation {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.particle,
.bubble,
.parallax-element {
    position: absolute;
    display: block;
    border-radius: 2px;
    opacity: 0.22;
    transform: rotate(var(--angle, 0deg));
    animation: driftPanel var(--duration, 18s) linear infinite;
}

.particle {
    width: var(--w, 80px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c, var(--aqua)), transparent);
}

.bubble {
    width: var(--s, 38px);
    height: var(--s, 38px);
    border: 1px solid color-mix(in srgb, var(--c, var(--amber)) 70%, transparent);
    background: linear-gradient(135deg, transparent 45%, color-mix(in srgb, var(--c, var(--amber)) 20%, transparent));
}

.parallax-element {
    width: 170px;
    height: 170px;
    border: 1px solid var(--line);
    transform: rotate(45deg);
    animation-duration: 36s;
}

.particle-1 { left: 6%; top: 18%; --c: var(--aqua); --angle: 18deg; --duration: 19s; }
.particle-2 { left: 46%; top: 11%; --c: var(--coral); --angle: -12deg; --duration: 21s; }
.particle-3 { left: 73%; top: 24%; --c: var(--amber); --angle: 32deg; --duration: 24s; }
.particle-4 { left: 18%; top: 44%; --c: var(--violet); --angle: -28deg; --duration: 17s; }
.particle-5 { left: 62%; top: 51%; --c: var(--lime); --angle: 8deg; --duration: 28s; }
.particle-6 { left: 86%; top: 65%; --c: var(--aqua); --angle: -18deg; --duration: 23s; }
.particle-7 { left: 9%; top: 77%; --c: var(--coral); --angle: 42deg; --duration: 20s; }
.particle-8 { left: 38%; top: 86%; --c: var(--amber); --angle: -8deg; --duration: 30s; }
.particle-9 { left: 78%; top: 82%; --c: var(--violet); --angle: 20deg; --duration: 26s; }
.particle-10 { left: 31%; top: 27%; --c: var(--lime); --angle: 50deg; --duration: 18s; }
.particle-11 { left: 55%; top: 73%; --c: var(--aqua); --angle: -38deg; --duration: 25s; }
.particle-12 { left: 93%; top: 35%; --c: var(--coral); --angle: 14deg; --duration: 22s; }
.particle-13 { left: 3%; top: 57%; --c: var(--amber); --angle: -18deg; --duration: 31s; }
.particle-14 { left: 67%; top: 9%; --c: var(--violet); --angle: 29deg; --duration: 24s; }
.particle-15 { left: 22%; top: 8%; --c: var(--lime); --angle: -45deg; --duration: 19s; }
.particle-16 { left: 49%; top: 39%; --c: var(--aqua); --angle: 35deg; --duration: 33s; }
.particle-17 { left: 89%; top: 9%; --c: var(--amber); --angle: -32deg; --duration: 27s; }
.particle-18 { left: 42%; top: 62%; --c: var(--coral); --angle: 25deg; --duration: 21s; }
.particle-19 { left: 14%; top: 94%; --c: var(--violet); --angle: -11deg; --duration: 28s; }
.particle-20 { left: 70%; top: 94%; --c: var(--lime); --angle: 11deg; --duration: 24s; }

.bubble-full-1 { left: 11%; top: 26%; --c: var(--aqua); --s: 54px; }
.bubble-full-2 { left: 80%; top: 13%; --c: var(--coral); --s: 44px; animation-delay: -6s; }
.bubble-full-3 { left: 27%; top: 67%; --c: var(--amber); --s: 36px; animation-delay: -3s; }
.bubble-full-4 { left: 92%; top: 78%; --c: var(--lime); --s: 50px; animation-delay: -9s; }
.bubble-full-5 { left: 48%; top: 18%; --c: var(--violet); --s: 30px; animation-delay: -10s; }
.bubble-full-6 { left: 5%; top: 83%; --c: var(--coral); --s: 42px; animation-delay: -13s; }
.bubble-full-7 { left: 58%; top: 87%; --c: var(--aqua); --s: 40px; animation-delay: -4s; }
.bubble-full-8 { left: 36%; top: 35%; --c: var(--lime); --s: 34px; animation-delay: -15s; }
.bubble-full-9 { left: 73%; top: 56%; --c: var(--amber); --s: 46px; animation-delay: -7s; }
.bubble-full-10 { left: 16%; top: 6%; --c: var(--violet); --s: 32px; animation-delay: -11s; }

.parallax-element:nth-last-child(4) { left: -70px; top: 18%; }
.parallax-element:nth-last-child(3) { right: -90px; top: 44%; animation-delay: -12s; }
.parallax-element:nth-last-child(2) { left: 28%; bottom: -95px; animation-delay: -18s; }
.parallax-element:nth-last-child(1) { right: 18%; top: -110px; animation-delay: -7s; }

@keyframes driftPanel {
    0% { translate: 0 0; opacity: 0.18; }
    40% { opacity: 0.55; }
    100% { translate: 0 -130px; opacity: 0.12; }
}

.scanlines,
.noise-overlay,
.rgb-glitch {
    position: fixed;
    inset: 0;
    z-index: 950;
    pointer-events: none;
}

.scanlines {
    display: none;
}

.noise-overlay {
    opacity: 0.006;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.rgb-glitch {
    display: none;
}

.rgb-glitch.is-active {
    animation: softGlitch 0.28s steps(2) both;
}

@keyframes softGlitch {
    0% { opacity: 0; transform: translateX(0); }
    35% { opacity: 0.45; transform: translateX(-8px); }
    70% { opacity: 0.25; transform: translateX(6px); }
    100% { opacity: 0; transform: translateX(0); }
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 0 20px;
    pointer-events: none;
}

.nav-container {
    width: min(1180px, 100%);
    min-height: 64px;
    margin: 0 auto;
    padding: 8px 10px 8px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow: var(--soft-shadow);
}

.nav-logo {
    min-width: 210px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.logo-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(85, 185, 179, 0.2), rgba(141, 152, 170, 0.16)),
        var(--panel-solid);
    border: 1px solid var(--line-strong);
    font-weight: 900;
}

.logo-text {
    font-weight: 800;
    white-space: nowrap;
}

.nav-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius);
    transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn,
.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.theme-btn:hover,
.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--aqua) 70%, var(--line));
    background: rgba(85, 185, 179, 0.09);
}

.mobile-menu-toggle {
    display: none;
    gap: 5px;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 10px;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.code-rain {
    display: none;
}

/* ===================================
   Hero
   =================================== */

.hero-section {
    position: relative;
    min-height: 96svh;
    display: grid;
    align-items: center;
    padding: 124px 20px 76px;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 90px 20px 28px;
    z-index: -1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(110deg, rgba(85, 185, 179, 0.055), transparent 30%);
}

.hero-content {
    width: min(1160px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(300px, 0.72fr);
    gap: 56px;
    align-items: center;
}

.hero-text {
    max-width: 780px;
}

.hero-greeting,
.section-tag,
.timeline-date,
.meta-item,
.skill-percent,
.tag,
.tech-tag,
.badge {
    font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hero-greeting {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 18px;
    padding: 0 12px;
    color: var(--aqua);
    background: rgba(85, 185, 179, 0.09);
    border: 1px solid rgba(85, 185, 179, 0.28);
    border-radius: var(--radius);
    font-weight: 800;
}

.hero-title {
    margin: 0;
    max-width: 790px;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 4.65rem;
    line-height: 1;
    font-weight: 820;
    color: var(--ink);
    text-wrap: balance;
}

.hero-title .cursor-blink {
    color: var(--aqua);
}

.hero-subtitle {
    margin: 24px 0 0;
    font-size: 1.35rem;
    color: var(--aqua);
    font-weight: 750;
}

.hero-description {
    max-width: 650px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-buttons {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn,
.project-btn,
.chat-send,
.filter-chip,
.project-modal-close {
    min-height: 44px;
    border-radius: var(--radius);
}

.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    text-decoration: none;
    font-weight: 850;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--aqua);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.btn:hover {
    transform: translateY(-3px);
    border-color: transparent;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    color: #081113;
    background: var(--aqua);
    border-color: transparent;
}

.btn-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.hero-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.social-icon,
.footer-social-link {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.social-icon:hover,
.footer-social-link:hover {
    color: var(--ink);
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--aqua) 58%, var(--line));
    background: rgba(85, 185, 179, 0.09);
}

#floating-icons-3d {
    position: absolute;
    top: 50%;
    right: max(24px, calc((100vw - 1160px) / 2));
    width: min(420px, 38vw);
    height: 430px;
    transform: translateY(-45%);
    z-index: 1;
    pointer-events: auto;
    perspective: 900px;
}

.tech-orbit {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: orbitTilt 24s var(--ease) infinite alternate;
}

.floating-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size, 54px);
    height: var(--size, 54px);
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    color: var(--icon-color, var(--aqua));
    transform: translate(-50%, -50%) translateZ(var(--z, 0px)) rotate(var(--r, 0deg));
    animation: iconFloat var(--speed, 5s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.floating-icon i {
    font-size: 1.55rem;
    filter: saturate(0.62) brightness(1.08);
}

.floating-icon:hover {
    border-color: var(--aqua);
    transform: translate(-50%, -56%) translateZ(36px) scale(1.04) rotate(var(--r, 0deg));
}

@keyframes orbitTilt {
    from { transform: rotateX(8deg) rotateY(-12deg); }
    to { transform: rotateX(-6deg) rotateY(16deg); }
}

@keyframes iconFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -16px; }
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--dim);
    font-size: 0.88rem;
}

.scroll-indicator i {
    color: var(--aqua);
    animation: scrollCue 1.8s ease-in-out infinite;
}

@keyframes scrollCue {
    0%, 100% { transform: translateY(-2px); }
    50% { transform: translateY(5px); }
}

/* ===================================
   Sections
   =================================== */

.section {
    position: relative;
    padding: 104px 0;
    scroll-margin-top: 105px;
}

.section + .section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header {
    margin-bottom: 38px;
}

.section-tag {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    color: var(--aqua);
    border: 1px solid color-mix(in srgb, var(--aqua) 40%, transparent);
    background: rgba(85, 185, 179, 0.07);
}

.section-title {
    margin: 0;
    font-size: 2.65rem;
    line-height: 1.08;
    text-wrap: balance;
}

.about-content,
.contact-content,
.stats-recap-content {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--soft-shadow);
}

.about-content {
    padding: 38px;
}

.about-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
}

.about-text p {
    margin: 0 0 18px;
    color: var(--muted);
}

.about-lead {
    grid-column: 1 / 2;
    color: var(--ink) !important;
    font-size: 1.25rem;
    font-weight: 760;
}

.about-stats {
    grid-column: 2 / 3;
    grid-row: 1 / span 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stat-item,
.recap-stat {
    min-height: 124px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(85, 185, 179, 0.075), transparent),
        rgba(255, 255, 255, 0.045);
}

.stat-number,
.recap-number {
    font-family: Orbitron, Inter, sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--amber);
    font-weight: 900;
}

.stat-label,
.recap-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.section-background-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.section-background-animation .bubble {
    opacity: 0.14;
}

/* Timeline */

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--aqua), var(--coral), var(--amber));
}

.timeline-item {
    position: relative;
    padding-left: 58px;
}

.timeline-dot {
    position: absolute;
    left: 9px;
    top: 26px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 3px solid var(--aqua);
    box-shadow: 0 0 0 8px rgba(85, 185, 179, 0.07);
}

.timeline-content,
.skill-category,
.project-card,
.contact-method,
.contact-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--soft-shadow);
}

.timeline-content {
    padding: 24px;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.timeline-content:hover {
    transform: translateX(8px);
    border-color: color-mix(in srgb, var(--aqua) 50%, var(--line));
    background: var(--panel-lift);
}

.timeline-date {
    color: var(--amber);
    font-size: 0.88rem;
}

.timeline-title,
.category-header h3,
.project-title,
.contact-info h3 {
    margin: 6px 0 10px;
    line-height: 1.16;
}

.timeline-title {
    font-size: 1.35rem;
}

.timeline-description,
.project-description,
.contact-info p {
    color: var(--muted);
}

.timeline-tags,
.project-tech,
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.tech-tag,
.badge,
.meta-item {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.88rem;
}

/* Skills */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.skill-category {
    padding: 24px;
    min-height: 100%;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.skill-category:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--coral) 55%, var(--line));
    background: var(--panel-lift);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.category-header i,
.method-icon,
.recap-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #061014;
    background: linear-gradient(135deg, var(--aqua), var(--lime));
}

.skill-item {
    margin-bottom: 18px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted);
}

.skill-name {
    color: var(--ink);
    font-weight: 760;
}

.skill-bar {
    height: 12px;
    padding: 3px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    overflow: hidden;
}

.skill-progress {
    width: 0;
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--aqua), var(--violet), var(--coral));
    transition: width 1.25s var(--ease);
}

/* ===================================
   Project Lab
   =================================== */

.projects-section {
    overflow: hidden;
}

.projects-section .container {
    position: relative;
}

.project-lab {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.48fr);
    gap: 16px;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: var(--soft-shadow);
}

.project-lab-main {
    min-height: 220px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(85, 185, 179, 0.085), transparent 42%),
        rgba(255, 255, 255, 0.025);
}

.project-lab-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.project-lab-copy {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
}

.project-lab-kicker {
    color: var(--aqua);
    font-family: "Share Tech Mono", ui-monospace, monospace;
    font-size: 0.9rem;
}

.project-lab-title {
    margin: 8px 0;
    font-size: 2rem;
    line-height: 1.06;
}

.project-lab-desc {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.project-controls {
    display: grid;
    align-content: start;
    gap: 12px;
}

.project-search {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    outline: none;
}

.project-search::placeholder {
    color: var(--dim);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #081113;
    border-color: transparent;
    background: var(--aqua);
    transform: translateY(-1px);
}

.project-counter {
    color: var(--dim);
    font-family: "Share Tech Mono", ui-monospace, monospace;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    perspective: 1400px;
}

.projects-grid + .section-header {
    margin-top: 68px !important;
}

.project-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.35s var(--ease), border-color 0.25s var(--ease), opacity 0.25s var(--ease), filter 0.25s var(--ease);
    will-change: transform;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.2), transparent 34%);
    transition: opacity 0.2s var(--ease);
}

.project-card:hover,
.project-card.is-active {
    border-color: color-mix(in srgb, var(--aqua) 48%, var(--line));
}

.project-card:hover::before,
.project-card.is-active::before {
    opacity: 1;
}

.project-card.is-filtered-out {
    opacity: 0.16;
    filter: grayscale(0.9);
    pointer-events: none;
}

.project-image {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.045);
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(7, 7, 9, 0.78), transparent 60%),
        linear-gradient(135deg, rgba(85, 185, 179, 0.11), transparent 45%);
    pointer-events: none;
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.04);
    transition: transform 0.6s var(--ease), filter 0.4s var(--ease), opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img.loaded,
img:not([data-src]) {
    opacity: 1;
}

.project-card:hover .project-screenshot {
    transform: scale(1.13);
    filter: saturate(1.2) contrast(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tech-icon,
.project-link {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 7, 9, 0.62);
    backdrop-filter: blur(12px);
}

.project-link {
    color: var(--ink);
    text-decoration: none;
}

.project-content {
    position: relative;
    z-index: 4;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.project-title {
    font-size: 1.28rem;
}

.project-description {
    margin: 0 0 18px;
    font-size: 0.96rem;
}

.project-tech {
    margin-top: auto;
    margin-bottom: 18px;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: max-content;
    max-width: 100%;
    padding: 0 14px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.project-btn:hover {
    transform: translateY(-2px);
    color: #071010;
    background: var(--lime);
    border-color: transparent;
}

/* ===================================
   Contact and Stats
   =================================== */

.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(340px, 0.62fr);
    gap: 20px;
    padding: 20px;
}

.contact-info {
    padding: 18px;
}

.contact-info h3 {
    font-size: 2rem;
}

.contact-methods {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.contact-method {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    box-shadow: none;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.contact-method:hover {
    transform: translateX(6px);
    border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
    background: var(--panel-lift);
}

.method-details h4 {
    margin: 0;
}

.method-details a {
    color: var(--muted);
    text-decoration: none;
    word-break: break-word;
}

.method-details a:hover {
    color: var(--aqua);
}

.contact-form {
    padding: 22px;
    box-shadow: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    outline: none;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.form-group textarea {
    min-height: 132px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--aqua);
    background: rgba(85, 185, 179, 0.07);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--coral);
}

.error-message,
.form-message {
    margin-top: 7px;
    color: var(--coral);
    font-size: 0.88rem;
}

.form-message.success {
    color: var(--lime);
}

.form-message.error {
    color: var(--coral);
}

.stats-recap-section {
    padding-top: 74px;
}

.stats-recap-content {
    padding: 28px;
}

.stats-recap-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.stats-recap-header h3 {
    margin: 0;
    font-size: 2rem;
}

.stats-recap-header p {
    margin: 0;
    color: var(--muted);
}

.stats-recap-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.recap-stat {
    min-height: 150px;
}

.recap-icon {
    margin-bottom: 10px;
}

/* ===================================
   Footer, Progress, Tooltip
   =================================== */

.progress-container {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 850;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: none;
}

.progress-bar {
    position: relative;
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--aqua), var(--coral), var(--amber));
}

.progress-dots {
    display: flex;
    gap: 7px;
    pointer-events: auto;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    cursor: pointer;
}

.progress-dot.active {
    background: var(--aqua);
}

.footer {
    padding: 42px 0 70px;
    border-top: 1px solid var(--line);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-text p {
    margin: 0 0 4px;
    color: var(--muted);
}

.footer-text i {
    color: var(--coral);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tooltip {
    position: fixed;
    z-index: 1300;
    max-width: 260px;
    padding: 8px 10px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-solid);
    box-shadow: var(--soft-shadow);
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.tooltip.show {
    opacity: 1;
    transform: translate(-50%, -18px);
}

.cursor-trail {
    position: fixed;
    z-index: 940;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(85, 185, 179, 0.44);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.cursor-trail.active {
    opacity: 0.72;
}

.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
    background: var(--bg);
    transform: scaleX(0);
    transform-origin: left center;
}

.section-separator {
    display: none;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 84px;
    z-index: 840;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--aqua);
    color: #061014;
}

/* ===================================
   Project Modal
   =================================== */

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.project-modal.open,
.project-modal.show {
    opacity: 1;
    visibility: visible;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(18px);
}

.project-modal-content {
    position: relative;
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--panel-solid);
    box-shadow: var(--shadow);
    transform: translateY(28px) scale(0.98);
    transition: transform 0.25s var(--ease);
}

.project-modal.open .project-modal-content,
.project-modal.show .project-modal-content {
    transform: translateY(0) scale(1);
}

.project-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-solid) 92%, transparent);
    backdrop-filter: blur(14px);
}

.project-modal-title {
    margin: 0;
    font-size: 1.65rem;
}

.project-modal-close {
    width: 44px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.project-modal-close:hover {
    background: var(--coral);
    color: #fff;
}

.project-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.44fr);
    gap: 18px;
    padding: 20px;
}

.project-modal-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.project-modal-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.project-modal-description {
    margin: 0;
    color: var(--muted);
}

.project-modal-tech,
.project-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-modal-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
}

.project-modal-links a:hover {
    color: #061014;
    background: var(--aqua);
}

/* ===================================
   Roaming Chatbot
   =================================== */

.chatbot-runner {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1250;
    width: 96px;
    height: 108px;
    transform: translate3d(calc(100vw - 120px), calc(100vh - 180px), 0);
    transition: transform 1.1s var(--ease);
}

.chatbot-runner.is-dragging {
    transition: none;
}

.chatbot-avatar {
    position: absolute;
    left: 13px;
    top: 12px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(205, 218, 230, 0.35);
    border-radius: 23px;
    background: linear-gradient(145deg, #d9e5e8, #91aeb3);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: grab;
    transform-style: preserve-3d;
    animation: botBounce 3.2s ease-in-out infinite;
    touch-action: none;
}

.chatbot-avatar:active {
    cursor: grabbing;
}

.bot-antenna {
    position: absolute;
    left: 50%;
    top: -13px;
    width: 2px;
    height: 15px;
    border-radius: 2px;
    background: #91aeb3;
    transform: translateX(-50%);
    transform-origin: bottom;
}

.bot-antenna::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aqua);
    box-shadow: 0 0 0 4px rgba(85, 185, 179, 0.12);
    transform: translateX(-50%);
}

.bot-arm,
.bot-leg {
    position: absolute;
    z-index: -1;
    display: block;
    background: #91aeb3;
    border: 1px solid rgba(205, 218, 230, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bot-arm {
    top: 29px;
    width: 13px;
    height: 32px;
    border-radius: 10px;
    transform-origin: top center;
}

.bot-arm::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 15px;
    height: 11px;
    border-radius: 50%;
    background: #d9e5e8;
    transform: translateX(-50%);
}

.bot-arm-left {
    left: -10px;
    transform: rotate(15deg);
}

.bot-arm-right {
    right: -10px;
    transform: rotate(-15deg);
}

.bot-leg {
    bottom: -21px;
    width: 14px;
    height: 28px;
    border-radius: 0 0 8px 8px;
    transform-origin: top center;
}

.bot-leg::after {
    content: "";
    position: absolute;
    bottom: -3px;
    width: 20px;
    height: 9px;
    border-radius: 7px 7px 4px 4px;
    background: #d9e5e8;
}

.bot-leg-left {
    left: 13px;
}

.bot-leg-left::after {
    right: 0;
}

.bot-leg-right {
    right: 13px;
}

.bot-leg-right::after {
    left: 0;
}

.bot-face {
    position: relative;
    width: 51px;
    height: 42px;
    overflow: hidden;
    border-radius: 17px;
    background: #17232c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.bot-face::before,
.bot-face::after {
    content: "";
    position: absolute;
    top: 13px;
    width: 7px;
    height: 9px;
    border-radius: 50%;
    background: #d8f7f3;
    box-shadow: 0 0 8px rgba(85, 185, 179, 0.7);
    animation: botBlink 4.6s infinite;
}

.bot-face::before {
    left: 12px;
}

.bot-face::after {
    right: 12px;
}

.bot-mouth {
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 14px;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 0 0 12px 12px;
    border: 2px solid #d8f7f3;
    border-top: 0;
    background: transparent;
}

.bot-blush {
    position: absolute;
    bottom: 8px;
    width: 10px;
    height: 5px;
    border-radius: 50%;
    background: var(--coral);
    opacity: 0.25;
    filter: blur(0.4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bot-blush-left {
    left: 5px;
}

.bot-blush-right {
    right: 5px;
}

.chatbot-runner.is-petted .chatbot-avatar {
    animation: botPetted 0.75s var(--ease) both;
}

.chatbot-runner.is-petted .bot-blush {
    opacity: 0.9;
    transform: scale(1.22);
}

.chatbot-runner.is-petted .bot-mouth {
    width: 18px;
    height: 9px;
}

.chatbot-runner.is-petted .bot-arm-left {
    animation: botWaveLeft 0.48s ease-in-out 2;
}

.chatbot-runner.is-petted .bot-arm-right {
    animation: botWaveRight 0.48s ease-in-out 2;
}

.chatbot-runner.is-petted .bot-leg-left {
    animation: botKickLeft 0.4s ease-in-out 2;
}

.chatbot-runner.is-petted .bot-leg-right {
    animation: botKickRight 0.4s ease-in-out 2;
}

.chatbot-runner.is-petted .bot-antenna {
    animation: antennaWiggle 0.35s ease-in-out 2;
}

.chatbot-runner.is-open,
.chatbot-runner.is-docked {
    transform: translate3d(calc(100vw - 120px), calc(100vh - 570px), 0) !important;
}

.chatbot-panel {
    position: fixed;
    right: 24px;
    bottom: 11px;
    z-index: 1245;
    width: 360px;
    height: 430px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.22s var(--ease), visibility 0.22s var(--ease), transform 0.22s var(--ease);
}

.chatbot-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.chat-title {
    margin: 0;
    font-weight: 850;
}

.chat-status {
    color: var(--aqua);
    font-size: 0.82rem;
}

.chat-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    overflow: auto;
}

.chat-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.chat-msg.bot {
    align-self: flex-start;
    border-color: color-mix(in srgb, var(--aqua) 38%, var(--line));
}

.chat-msg.user {
    align-self: flex-end;
    color: #081113;
    background: var(--aqua);
    border-color: transparent;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 14px 10px;
}

.chat-suggestion {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    cursor: pointer;
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
}

.chat-input {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    padding: 0 12px;
    outline: none;
}

.chat-send {
    width: 46px;
    border: 0;
    color: #081113;
    background: var(--aqua);
    cursor: pointer;
}

@keyframes botBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes botBlink {
    0%, 44%, 48%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.12); }
}

@keyframes botPetted {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-8px) scale(1.06) rotate(-3deg); }
    65% { transform: translateY(-5px) scale(1.04) rotate(3deg); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes botWaveLeft {
    0%, 100% { transform: rotate(15deg); }
    50% { transform: rotate(62deg); }
}

@keyframes botWaveRight {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(-62deg); }
}

@keyframes botKickLeft {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(20deg); }
}

@keyframes botKickRight {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(-20deg); }
}

@keyframes antennaWiggle {
    0%, 100% { transform: translateX(-50%) rotate(0); }
    50% { transform: translateX(-50%) rotate(18deg); }
}

/* ===================================
   Reveal States
   =================================== */

.reveal-ready {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1100px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #floating-icons-3d {
        position: relative;
        inset: auto;
        width: min(460px, 100%);
        height: 320px;
        margin: 12px auto 0;
        transform: none;
    }

    .about-text,
    .project-lab,
    .contact-content,
    .project-modal-body {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-column: auto;
        grid-row: auto;
    }

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

    .stats-recap-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .navbar {
        top: 10px;
        padding: 0 10px;
    }

    .nav-container {
        min-height: 58px;
        padding: 8px 10px;
    }

    .nav-logo {
        min-width: 0;
        flex: 1;
    }

    .logo-text {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-toggle {
        display: inline-grid;
    }

    .nav-menu {
        position: fixed;
        top: 82px;
        left: 10px;
        right: 10px;
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--panel-solid);
        box-shadow: var(--shadow);
        transform: translateY(-14px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease), transform 0.2s var(--ease);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        justify-content: flex-start;
        width: 100%;
        padding: 0 12px;
    }

    .hero-section {
        min-height: auto;
        padding: 108px 16px 64px;
    }

    .hero-section::before {
        inset: 78px 10px 18px;
    }

    .hero-title {
        font-size: 3.1rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .hero-buttons,
    .hero-social {
        gap: 10px;
    }

    .section {
        padding: 72px 0;
    }

    .section-title {
        font-size: 2.1rem;
    }

    .about-content,
    .stats-recap-content {
        padding: 20px;
    }

    .projects-grid,
    .skills-grid,
    .stats-recap-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 190px;
    }

    .footer-content,
    .stats-recap-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .progress-container {
        left: 12px;
        right: 12px;
        bottom: 10px;
    }

    .chatbot-runner {
        width: 90px;
        height: 102px;
        transform: translate3d(calc(100vw - 106px), calc(100vh - 164px), 0);
    }

    .chatbot-runner.is-open,
    .chatbot-runner.is-docked {
        transform: none !important;
        transition: none;
    }

    .chatbot-runner.is-open .chatbot-avatar,
    .chatbot-runner.is-docked .chatbot-avatar {
        position: fixed;
        left: calc(100vw - 86px);
        top: 94px;
    }

    .chatbot-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 184px;
        bottom: 18px;
        width: auto;
        height: auto;
        transform: none;
        transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
    }

    .chatbot-panel.is-open {
        transform: none;
    }
}

@media (max-width: 520px) {
    body .container {
        width: min(100% - 28px, 1160px);
    }

    .logo-text {
        display: none;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    #floating-icons-3d {
        height: 260px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-item {
        padding-left: 42px;
    }

    .timeline-dot {
        left: 4px;
    }

    .project-lab-title {
        font-size: 1.55rem;
    }

    .project-modal {
        padding: 10px;
    }

    .project-modal-content {
        max-height: calc(100vh - 20px);
    }

    .project-modal-image {
        height: 220px;
    }

    .progress-dots {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    .cursor-trail {
        display: none;
    }

    .project-card:hover .project-overlay {
        opacity: 1;
    }
}

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

    .hero-3d-container,
    .background-animation,
    .cursor-trail {
        display: none !important;
    }
}

@media print {
    .navbar,
    .hero-3d-container,
    .background-animation,
    .scanlines,
    .noise-overlay,
    .rgb-glitch,
    .progress-container,
    .chatbot-runner,
    .back-to-top {
        display: none !important;
    }

    body {
        color: #111;
        background: #fff;
    }

    .section {
        padding: 32px 0;
    }
}
