:root {
    --color-bg: #090C13;
    --color-surface: #101522;
    --color-surface-2: #131a2b;
    --color-text: #e9edf8;
    --color-text-muted: #9aa3ba;
    --color-accent: #007aff;
    --color-outline: rgba(0, 122, 255, 0.32);
    --shadow-soft: 0 25px 50px -20px rgba(0, 0, 0, 0.45);
    --shadow-hard: 0 16px 32px -24px rgba(0, 122, 255, 0.5);
}

[data-theme="light"] {
    --color-bg: #f6f8fc;
    --color-surface: #ffffff;
    --color-surface-2: #f0f4ff;
    --color-text: #1b1f2c;
    --color-text-muted: #3d4556;
    --color-outline: rgba(0, 122, 255, 0.2);
    --shadow-soft: 0 20px 45px -24px rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .chat-bubble.bot {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(10, 132, 255, 0.03));
    border: 2px solid rgba(0, 122, 255, 0.3);
    color: var(--color-text);
}

[data-theme="light"] .thought-bubble {
    background: var(--color-surface);
    border: 2px solid rgba(0, 122, 255, 0.4);
}

[data-theme="light"] .greeting-bubble {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(10, 132, 255, 0.05));
    border: 2px solid rgba(0, 122, 255, 0.3);
}

[data-theme="light"] .greeting-bubble p {
    color: var(--color-text);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.top-bar {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 8vw;
    background: rgba(9, 12, 19, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-outline);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

[data-theme="light"] .top-bar {
    background: rgba(246, 248, 252, 0.9);
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.logo span {
    color: var(--color-accent);
}

.nav-contact-link {
    margin-left: auto;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-contact-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-contact-link:hover::after {
    width: 100%;
}

.nav-contact-link:hover {
    color: var(--color-text);
}

.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    align-items: center;
}

.main-nav a {
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
    width: 100%;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--color-text);
    transform: translateY(-2px);
}

.nav-robot-icon {
    display: inline-block;
    font-size: 1.2rem;
    margin-right: 0.3rem;
    animation: robotIconBounce 2s ease-in-out infinite;
}

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

.theme-toggle {
    border: 1px solid var(--color-outline);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: transform 0.2s ease, border 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle .icon-light {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-dark {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-light {
    display: inline;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    min-height: 100vh;
    scroll-margin-top: 100px;
    position: relative;
    overflow: hidden;
}

/* Particle Zone */
.hero-particle-zone {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: crosshair;
}

.particle-text-overlay {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    width: 90%;
    text-align: center;
}

/* Contact Form */
.hero-contact-form {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 90%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-input-wrapper {
    display: flex;
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(10, 15, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(0, 255, 200, 0.25);
    box-shadow: 0 0 30px rgba(0, 255, 200, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-input-wrapper:focus-within {
    border-color: rgba(0, 255, 200, 0.5);
    box-shadow: 0 0 40px rgba(0, 255, 200, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #e0e8f0;
    padding: 1rem 1.6rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

.hero-input::placeholder {
    color: rgba(180, 200, 220, 0.5);
    font-weight: 400;
}

.hero-next-btn {
    border: none;
    outline: none;
    background: linear-gradient(135deg, #00e6b0, #00c896);
    color: #030a10;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    padding: 1rem 1.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.hero-next-btn:hover {
    background: linear-gradient(135deg, #00ffc8, #00e6b0);
    box-shadow: 0 0 24px rgba(0, 255, 200, 0.35);
    transform: scale(1.03);
}

.hero-next-btn:active {
    transform: scale(0.97);
}

.hero-form-progress {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 255, 200, 0.2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.progress-dot.active {
    background: #00ffc8;
    box-shadow: 0 0 10px rgba(0, 255, 200, 0.5);
}

.progress-dot.completed {
    background: #00e6b0;
}

/* Success message */
.hero-success-msg {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    color: #00ffc8;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    opacity: 0;
    animation: fadeInScale 0.6s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.btn.tertiary {
    border: 1px dashed var(--color-outline);
    background: transparent;
    color: var(--color-text-muted);
}

.hero-assistant {
    display: flex;
    justify-content: center;
}

.assistant-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(0, 122, 255, 0.18), rgba(10, 132, 255, 0.06));
    border-radius: 28px;
    padding: 2.6rem 2.2rem;
    border: 1px solid rgba(0, 122, 255, 0.25);
    box-shadow: 0 35px 60px -30px rgba(10, 132, 255, 0.45);
    display: grid;
    gap: 1.2rem;
    align-content: start;
    max-width: 360px;
    isolation: isolate;
    text-align: left;
}

.assistant-card::after {
    content: '';
    position: absolute;
    inset: -40% -30% auto;
    height: 60%;
    background: radial-gradient(circle at top, rgba(26, 135, 255, 0.35), transparent 55%);
    filter: blur(40px);
    opacity: 0.6;
    animation: drift 16s infinite linear;
    z-index: -1;
}

.assistant-orb {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 26px;
    background: linear-gradient(135deg, #0a84ff, #4d9dff);
    display: grid;
    place-items: center;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #fff;
    box-shadow: 0 18px 35px rgba(10, 132, 255, 0.35);
    animation: float 6s ease-in-out infinite;
}

.assistant-orb span {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
    padding: 0 0.4rem;
}

.assistant-glow {
    position: absolute;
    inset: -18px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(74, 157, 255, 0.6), rgba(10, 132, 255, 0));
    opacity: 0.7;
    animation: pulse 3.5s ease-in-out infinite;
}

.assistant-card h2 {
    margin: 0;
    font-size: 1.6rem;
}

.assistant-marquee {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 122, 255, 0.18);
    border-radius: 999px;
    background: rgba(7, 10, 17, 0.55);
    padding: 0.6rem 0;
}

.assistant-marquee::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 10, 17, 0.85) 0%, transparent 35%, transparent 65%, rgba(7, 10, 17, 0.85) 100%);
    pointer-events: none;
}

.assistant-marquee-track {
    display: inline-flex;
    gap: 2.4rem;
    padding-left: 2rem;
    animation: marquee 12s linear infinite;
    color: rgba(201, 214, 255, 0.85);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

[data-theme='light'] .assistant-card {
    background: linear-gradient(145deg, rgba(0, 122, 255, 0.12), rgba(10, 132, 255, 0.04));
    border: 1px solid rgba(0, 122, 255, 0.18);
}

[data-theme='light'] .assistant-marquee {
    background: rgba(240, 244, 255, 0.75);
}

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

@keyframes pulse {
    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.85;
        transform: scale(1);
    }
}

@keyframes drift {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-10%) translateY(8%);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(135deg, #007aff, #0a84ff);
    color: #fff;
    box-shadow: var(--shadow-hard);
}

.btn.secondary {
    border: 1px solid var(--color-outline);
    background: transparent;
    color: var(--color-text);
}

.btn.outline {
    border: 1px solid var(--color-outline);
    background: var(--color-surface);
    color: var(--color-text);
    margin-top: 2rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-highlight {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: var(--color-surface);
    border-radius: 14px;
    border: 1px solid var(--color-outline);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    max-width: 60ch;
    margin: 0 auto;
    color: var(--color-text-muted);
}

.profile-overview {
    padding: 6rem 8vw;
    scroll-margin-top: 100px;
}

.profile-wrapper {
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr 1.5fr;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-sticky-side {
    position: sticky;
    top: 20vh;
    height: fit-content;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.profile-arrow {
    width: 100%;
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(27, 75, 240, 0.3));
    animation: floatingArrow 4s ease-in-out infinite;
}

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

.profile-list-side {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    padding-bottom: 4rem;
}

.profile-list-side::before {
    content: '';
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 11px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(27, 75, 240, 0.8), rgba(27, 75, 240, 0.1));
    z-index: 0;
}

.profile-list-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.profile-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 1.5rem;
    background: var(--color-bg);
    border-radius: 50%;
}

.profile-item-content {
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, border-color 0.3s ease;
    flex: 1;
}

.profile-item-content:hover {
    transform: translateX(8px);
    border-color: rgba(27, 75, 240, 0.5);
    box-shadow: 0 20px 40px -15px rgba(27, 75, 240, 0.2);
}

.profile-item-content h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.25rem;
    color: var(--color-text);
}

.profile-date {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.profile-item-content p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.profile-item-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: grid;
    gap: 0.6rem;
    color: var(--color-text-muted);
}

.expertise {
    padding: 7rem 8vw;
    background: var(--color-surface-2);
    scroll-margin-top: 100px;
}

.expertise-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.expertise-card.layout-image {
    background: #0a0e17; /* Dark backdrop like img 1 */
    border-radius: 20px;
    padding: 0;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.expertise-card.layout-image:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -15px rgba(0, 122, 255, 0.3);
    border-color: var(--color-accent);
}

.expertise-image {
    width: 100%;
    height: 240px;
}

.expertise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expertise-content {
    padding: 2.2rem;
    display: grid;
    gap: 1.1rem;
    flex: 1;
}

.expertise-content h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.3rem;
}

.expertise-content p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.92rem;
}

.expertise-content span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.case-studies {
    padding: 6rem 8vw;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.case-grid-wrapper {
    position: relative;
}

.case-grid {
    display: flex;
    gap: 2rem;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 1rem 0 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.case-grid article {
    flex: 0 0 calc(33.333% - 1.34rem);
    min-width: 0;
}

@media (max-width: 1200px) {
    .case-grid article {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .case-grid article {
        flex: 0 0 100%;
    }
}

.case-grid-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.case-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.case-nav-btn:hover {
    background: var(--color-accent);
    color: #fff;
    transform: scale(1.1);
}

.case-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.add-project-section {
    margin-top: 3rem;
    text-align: center;
}

.add-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(10, 132, 255, 0.05));
    border: 2px dashed var(--color-accent);
    border-radius: 16px;
    color: var(--color-accent);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-project-btn:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(10, 132, 255, 0.1));
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.2);
}

.add-project-btn span {
    font-size: 1.5rem;
    font-weight: bold;
}

.add-project-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 2px solid var(--color-outline);
    background: var(--color-surface-2);
    color: var(--color-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.case-grid::-webkit-scrollbar {
    height: 8px;
}

.case-grid::-webkit-scrollbar-track {
    background: transparent;
}

.case-grid::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

.case-grid article {
    background: var(--color-surface);
    border-radius: 22px;
    padding: 2rem;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-grid article::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-grid article:hover::before {
    left: 100%;
}

.case-grid article:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -20px rgba(0, 122, 255, 0.4);
    border-color: var(--color-accent);
}

.case-grid article:active {
    transform: translateY(-4px) scale(1.01);
}

.case-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
    color: var(--color-text-muted);
}

.case-tag {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(0, 122, 255, 0.12);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}

.case-grid p {
    color: var(--color-text-muted);
}

.case-grid article header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.case-inspect-btn {
    margin-top: 1rem;
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #007aff, #0a84ff);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
}

.case-inspect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
}

/* Modal Styles */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 17, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.project-modal.active {
    display: flex;
}

.project-modal-content {
    background: var(--color-surface);
    border-radius: 28px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--color-outline);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: slideUp 0.4s ease;
}

.project-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-outline);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
    font-size: 1.5rem;
    color: var(--color-text);
}

.project-modal-close:hover {
    transform: rotate(90deg);
    background: var(--color-accent);
    color: #fff;
}

.project-modal-header {
    margin-bottom: 2rem;
}

.project-modal-header h2 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.project-modal-tag {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(0, 122, 255, 0.12);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.project-modal-body {
    display: grid;
    gap: 2rem;
}

.project-modal-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.project-modal-section p {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.project-modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.project-modal-tech span {
    background: var(--color-surface-2);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid var(--color-outline);
    color: var(--color-text);
}

.project-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-modal-stat {
    background: var(--color-surface-2);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--color-outline);
    text-align: center;
}

.project-modal-stat h4 {
    font-size: 1.8rem;
    margin: 0 0 0.3rem;
    color: var(--color-accent);
}

.project-modal-stat p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-section {
    padding: 6rem 8vw;
    background: var(--color-surface-2);
    scroll-margin-top: 100px;
}

.assistant-header {
    text-align: center;
    margin-bottom: 4rem;
}

.assistant-header h2 {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.assistant-header p {
    color: var(--color-text-muted);
    max-width: 60ch;
    margin: 0 auto;
}

.assistant-body {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr 1.5fr;
    align-items: start;
}

/* Robot Character Styles */
.assistant-robot-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 28px;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    min-height: 500px;
    justify-content: center;
}

.robot-character {
    position: relative;
    width: 200px;
    height: 280px;
    animation: robotFloat 3s ease-in-out infinite;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.robot-character:hover {
    transform: scale(1.05);
}

.robot-character:active {
    transform: scale(0.95);
    animation: robotClick 0.3s ease;
}

@keyframes robotClick {
    0%, 100% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Thought Cloud Styles */
.robot-thought-cloud {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.robot-thinking .robot-thought-cloud {
    opacity: 1;
    animation: thoughtFloat 2s ease-in-out infinite;
}

.thought-bubble {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    border-radius: 20px;
    padding: 1rem 1.2rem;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.2);
    min-width: 120px;
}

.thought-bubble::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--color-accent);
}

.thought-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--color-surface);
}

.thought-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.thought-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: thoughtDot 1.4s ease-in-out infinite;
}

.thought-dots span:nth-child(1) {
    animation-delay: 0s;
}

.thought-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thought-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thoughtFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes thoughtDot {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.robot-head {
    position: relative;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #4a9dff, #007aff);
    border-radius: 50% 50% 45% 45%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.robot-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 70%;
}

.robot-eye {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 30%;
    animation: robotBlink 4s infinite;
}

.robot-eye.left-eye {
    left: 25%;
}

.robot-eye.right-eye {
    right: 25%;
}

.eye-pupil {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #007aff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: eyeMove 5s ease-in-out infinite;
}

.robot-mouth {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-top: none;
    border-radius: 0 0 30px 30px;
    animation: robotTalk 2s ease-in-out infinite;
}

.robot-antenna {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #007aff, #4a9dff);
    border-radius: 2px;
}

.antenna-top {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    animation: antennaPulse 2s ease-in-out infinite;
}

.robot-body {
    position: relative;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #007aff, #0a84ff);
    border-radius: 20px;
    margin: -20px auto 0;
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.robot-screen {
    width: 80px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.screen-content {
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff88;
    animation: screenFlicker 3s ease-in-out infinite;
}

.robot-arms {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.robot-arm {
    position: absolute;
    width: 12px;
    height: 50px;
    background: linear-gradient(135deg, #007aff, #4a9dff);
    border-radius: 6px;
    top: 20px;
    animation: armSwing 2s ease-in-out infinite;
}

.robot-arm.left-arm {
    left: -15px;
    transform-origin: top center;
    animation-delay: 0s;
}

.robot-arm.right-arm {
    right: -15px;
    transform-origin: top center;
    animation-delay: 1s;
}

.robot-base {
    width: 100px;
    height: 20px;
    background: linear-gradient(135deg, #0051d5, #007aff);
    border-radius: 10px;
    margin: -10px auto 0;
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
}

.robot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.3), transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
    z-index: -1;
}

.robot-greeting {
    position: relative;
    animation: greetingSlide 0.8s ease-out;
}

.greeting-bubble {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(10, 132, 255, 0.1));
    border: 2px solid var(--color-accent);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.2);
    max-width: 280px;
}

.greeting-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--color-accent);
}

.greeting-bubble p {
    margin: 0;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Chat Interface Styles */
.assistant-chat {
    background: var(--color-surface);
    border-radius: 24px;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 500px;
}

.chat-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-outline);
    background: var(--color-surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
    animation: statusPulse 2s ease-in-out infinite;
}

.chat-window {
    flex: 1;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: grid;
    gap: 1.2rem;
    padding: 1.5rem;
    background: var(--color-surface);
}

.chat-window::-webkit-scrollbar {
    width: 6px;
}

.chat-window::-webkit-scrollbar-track {
    background: transparent;
}

.chat-window::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

.chat-bubble {
    padding: 1rem 1.3rem;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 75%;
    word-wrap: break-word;
    position: relative;
    animation: messageSlide 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-bubble.user {
    background: linear-gradient(135deg, #007aff, #0a84ff);
    color: #fff;
    justify-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.chat-bubble.user::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #007aff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.chat-bubble.bot {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(10, 132, 255, 0.05));
    border: 2px solid var(--color-accent);
    justify-self: flex-start;
    border-radius: 24px 24px 24px 8px;
    color: var(--color-text);
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
}

.chat-bubble.bot::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-right: 10px solid transparent;
    border-left: 10px solid transparent;
    border-top: 10px solid var(--color-accent);
}

.chat-bubble.bot::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 22px;
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-top: 8px solid rgba(0, 122, 255, 0.1);
}

.chat-form {
    padding: 1.5rem;
    border-top: 1px solid var(--color-outline);
    background: var(--color-surface-2);
}

.input-wrapper {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.chat-form input {
    flex: 1;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    border: 2px solid var(--color-outline);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chat-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.send-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1) rotate(15deg);
}

.send-icon {
    font-size: 1.2rem;
    display: block;
}

/* Robot Animations */
@keyframes robotFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes robotBlink {
    0%, 90%, 100% {
        height: 18px;
    }
    95% {
        height: 2px;
    }
}

@keyframes eyeMove {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    25% {
        transform: translate(-60%, -40%);
    }
    50% {
        transform: translate(-40%, -60%);
    }
    75% {
        transform: translate(-60%, -60%);
    }
}

@keyframes robotTalk {
    0%, 100% {
        height: 15px;
        width: 30px;
    }
    50% {
        height: 20px;
        width: 35px;
    }
}

@keyframes antennaPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
        transform: translateX(-50%) scale(1.1);
    }
}

@keyframes screenFlicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes greetingSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px #00ff88;
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 12px #00ff88;
    }
}

/* Robot State Animations */
.robot-thinking .robot-head {
    animation: robotThink 1s ease-in-out infinite;
}

.robot-thinking .robot-screen .screen-content {
    animation: screenThink 1.5s ease-in-out infinite;
}

.robot-talking .robot-mouth {
    animation: robotTalkActive 0.5s ease-in-out infinite;
}

.robot-talking .robot-arm {
    animation: armsTalk 1s ease-in-out infinite;
}

.robot-excited .robot-character {
    animation: robotExcite 0.6s ease-in-out;
}

.robot-excited .robot-glow {
    animation: glowExcite 1s ease-in-out infinite;
}

@keyframes robotThink {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-5deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

@keyframes screenThink {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px #00ff88;
    }
    50% {
        opacity: 0.5;
        text-shadow: 0 0 20px #00ff88;
    }
}

@keyframes robotTalkActive {
    0%, 100% {
        height: 15px;
        width: 30px;
    }
    25% {
        height: 25px;
        width: 40px;
    }
    50% {
        height: 20px;
        width: 35px;
    }
    75% {
        height: 22px;
        width: 38px;
    }
}

@keyframes armsTalk {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(25deg);
    }
    75% {
        transform: rotate(-25deg);
    }
}

@keyframes robotExcite {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes glowExcite {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.about {
    padding: 5rem 8vw;
}

.about-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.about-grid article {
    background: var(--color-surface);
    border-radius: 20px;
    padding: 1.8rem;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
}

.about-grid p,
.about-grid li {
    color: var(--color-text-muted);
}

.contact {
    padding: 6rem 8vw 7rem;
    background: var(--color-surface-2);
    scroll-margin-top: 100px;
}

.contact-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 4rem;
}

.contact-info-card {
    background: var(--color-surface);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.2);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.contact-info-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    color: var(--color-text);
}

.contact-info-card p {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.contact-link {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.contact-services {
    margin-top: 3rem;
}

.contact-services h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--color-text);
}

.services-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card {
    background: var(--color-surface);
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 122, 255, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.service-card h4 {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
    color: var(--color-text);
}

.service-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cta-card {
    background: var(--color-surface);
    border-radius: 24px;
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-soft);
    padding: 2.2rem;
    display: grid;
    gap: 1.2rem;
}

.footer {
    padding: 2rem 8vw;
    text-align: center;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-outline);
    background: var(--color-surface);
}

/* Smooth scroll animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced button animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Card hover effects are now inline with each card */

@media (max-width: 960px) { .top-bar { flex-wrap: nowrap; gap: 1rem; padding: 1.2rem 4vw; justify-content: space-between;
    }

    .main-nav { width: auto; justify-content: flex-end; flex-wrap: nowrap; gap: 0.8rem; font-size: 0.85rem;
    }
    
    .hero {
        grid-template-columns: 1fr;
        padding: 0 4vw;
        min-height: auto;
    }

    .hero-particle-zone {
        height: 70vh;
        min-height: 400px;
    }

    .hero-contact-form {
        width: 95%;
    }

    .profile-wrapper { grid-template-columns: 1fr; } .profile-arrow { max-width: 150px; } .profile-sticky-side { position: static; margin-bottom: 2rem; }

    .assistant-body {
        grid-template-columns: 1fr;
    }

    .assistant-robot-container {
        min-height: 400px;
    }

    .robot-character {
        width: 160px;
        height: 240px;
    }

    .case-grid {
        display: flex;
        overflow-x: hidden;
    }

    .case-grid article {
        flex: 0 0 100%;
    }
    
    .case-grid-controls {
        margin-top: 1.5rem;
    }

    .hero-assistant {
        justify-content: flex-start;
    }

    .project-modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }
}

@media (max-width: 640px) {
    .top-bar {
        padding: 1rem 6vw;
    }

    .hero {
        padding: 0 4vw;
    }

    .hero-particle-zone {
        height: 60vh;
        min-height: 350px;
    }

    .hero-contact-form {
        bottom: 8%;
    }

    .hero-input {
        font-size: 0.85rem;
        padding: 0.8rem 1.2rem;
    }

    .hero-next-btn {
        font-size: 0.75rem;
        padding: 0.8rem 1.2rem;
    }

    .profile-overview,
    .expertise,
    .case-studies,
    .assistant-section,
    .contact {
        padding: 4rem 6vw;
    }

    .case-grid article {
        min-width: 90vw;
    }

    .assistant-robot-container {
        min-height: 350px;
        padding: 1.5rem;
    }

    .robot-character {
        width: 140px;
        height: 200px;
    }

    .robot-thought-cloud {
        top: -70px;
    }

    .thought-bubble {
        min-width: 100px;
        padding: 0.8rem 1rem;
    }

    .greeting-bubble {
        max-width: 100%;
    }

    .chat-bubble {
        max-width: 85%;
    }

    .project-modal-content {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .project-modal-header h2 {
        font-size: 1.5rem;
    }

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



/* AI Widget Styles */
.ai-widget {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.ai-widget-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007aff, #0a84ff);
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 122, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: aiPulse 2.5s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(0, 122, 255, 0.5); }
    50% { box-shadow: 0 6px 36px rgba(0, 122, 255, 0.8), 0 0 60px rgba(0, 122, 255, 0.25); }
}

.ai-widget-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.7);
    animation: none;
}

.ai-icon {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 1px;
}

.ai-tooltip {
    position: absolute;
    left: 80px;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--color-outline);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ai-widget-btn:hover .ai-tooltip {
    opacity: 1;
    visibility: visible;
    left: 85px;
}

.ai-widget-chat {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    background: var(--color-surface);
    border-radius: 20px;
    border: 1px solid var(--color-outline);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom left;
}

.ai-widget-chat.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.ai-widget-chat .chat-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--color-outline);
    background: var(--color-surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-widget-chat .chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.ai-widget-chat .status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.chat-close-btn:hover {
    color: var(--color-text);
}

.ai-widget-chat .chat-window {
    height: 350px;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--color-surface);
}

.ai-widget-chat .chat-form {
    padding: 1rem;
    border-top: 1px solid var(--color-outline);
    background: var(--color-surface-2);
}

.ai-widget-chat .input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.ai-widget-chat input {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-outline);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.9rem;
}

.ai-widget-chat input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.ai-widget-chat .send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007aff, #0a84ff);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    /* ── Global overflow prevention ── */
    html, body {
        overflow-x: hidden;
    }

    /* ── Header ── */
    .top-bar {
        padding: 0.8rem 4vw;
        flex-wrap: nowrap;
    }

    .logo-img {
        height: 40px;
    }

    .main-nav {
        position: static;
        transform: none;
        gap: 1rem;
        font-size: 0.85rem;
    }

    .nav-contact-link {
        font-size: 0.85rem;
    }

    /* ── Hero ── */
    .hero {
        min-height: 80vh;
    }

    .hero-primary {
        padding: 0 4vw;
    }

    .hero-contact-form {
        width: 92%;
        max-width: 400px;
    }

    .hero-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.8rem;
    }

    .hero-next-btn {
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }

    /* ── Profile ── */
    .profile-overview {
        padding: 3rem 4vw;
    }

    .profile-wrapper {
        flex-direction: column;
    }

    .profile-sticky-side {
        display: none;
    }

    .profile-list-side {
        width: 100%;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    /* ── Expertise ── */
    .expertise {
        padding: 3rem 4vw;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .expertise-card {
        flex-direction: column;
    }

    .expertise-image {
        width: 100%;
        height: 180px;
    }

    /* ── Case Studies ── */
    .case-studies {
        padding: 3rem 4vw;
    }

    .case-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .case-grid-wrapper {
        overflow: visible;
    }

    .case-grid article {
        min-width: unset;
        width: 100%;
    }

    .case-grid-controls {
        display: none;
    }

    /* ── Modals ── */
    .project-modal-content {
        width: 95vw;
        max-height: 90vh;
        padding: 1.5rem;
        border-radius: 16px;
    }

    .project-modal-header h2 {
        font-size: 1.3rem;
    }

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

    .project-modal-tech {
        flex-wrap: wrap;
    }

    /* ── AI Widget ── */
    .ai-widget {
        bottom: 20px;
        left: 20px;
    }

    .ai-widget-btn {
        width: 56px;
        height: 56px;
    }

    .ai-widget-chat {
        width: calc(100vw - 40px);
        left: 0;
        bottom: 70px;
    }

    .ai-tooltip {
        display: none;
    }

    /* ── Add project ── */
    .add-project-section {
        padding: 0 4vw;
    }

    .add-project-btn {
        font-size: 0.85rem;
    }

    /* ── Footer ── */
    .footer {
        padding: 1.5rem 4vw;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .top-bar {
        padding: 0.6rem 3vw;
        gap: 0.4rem;
    }

    .logo-img {
        height: 34px;
    }

    .main-nav {
        gap: 0.6rem;
        font-size: 0.78rem;
    }

    .nav-contact-link {
        font-size: 0.78rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .hero-contact-form {
        width: 96%;
    }

    .contact-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .expertise-image {
        height: 140px;
    }

    .ai-widget {
        bottom: 16px;
        left: 16px;
    }

    .ai-widget-btn {
        width: 50px;
        height: 50px;
    }

    .ai-icon {
        font-size: 1.1rem;
    }
}
