:root {
    --bg-color: #050510;
    --bg-alt: #0b0f26;
    --surface-color: rgba(13, 18, 40, 0.85);
    --surface-strong: rgba(21, 25, 54, 0.95);
    --text-color: #f2f6ff;
    --muted-color: #a0aac6;
    --primary-color: #3b82f6;
    --accent-color: #00d1ff;
    --border-color: rgba(59, 130, 246, 0.35);
    --chip-bg: rgba(0, 209, 255, 0.12);
    --hero-gradient: radial-gradient(circle at top left, rgba(0, 209, 255, 0.35), transparent 55%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.28), transparent 60%);
    --transition-speed: 0.35s;
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', Consolas, monospace;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    background-image: var(--hero-gradient);
    color: var(--text-color);
    font-family: var(--font-display);
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

body.light-mode {
    --bg-color: #f7f9fc;
    --bg-alt: #e6ecf7;
    --surface-color: rgba(255, 255, 255, 0.85);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --text-color: #0f172a;
    --muted-color: #52607d;
    --primary-color: #2563eb;
    --accent-color: #0ea5e9;
    --border-color: rgba(37, 99, 235, 0.2);
    --chip-bg: rgba(14, 165, 233, 0.12);
    background-image: radial-gradient(circle at top left, rgba(14, 165, 233, 0.25), transparent 55%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.15), transparent 65%);
}

section {
    position: relative;
    isolation: isolate;
}

.section-padding {
    padding: 120px 0;
}

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.section-heading .eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--accent-color);
    display: inline-block;
    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 18px;
}

.section-heading p {
    margin: 0;
    color: var(--muted-color);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.45;
    z-index: 0;
}

.blur-surface {
    background-color: rgba(7, 9, 20, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .blur-surface {
    background-color: rgba(247, 249, 252, 0.9);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.navbar {
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    z-index: 10;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    color: var(--muted-color);
    transition: color var(--transition-speed) ease;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--text-color);
}

.language-switch {
    margin-left: 14px;
}

.language-switch-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn {
    border: none;
    background: none;
    color: var(--muted-color);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

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

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-color);
    box-shadow: 0 12px 24px -18px rgba(0, 209, 255, 0.8);
}

body.light-mode .language-switch-group {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.05);
}

#modeToggle {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text-color);
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
}

#modeToggle:hover {
    transform: scale(1.1);
}

.hero {
    position: relative;
    padding-top: 160px;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

body.light-mode .hero-particles {
    opacity: 0.35;
    mix-blend-mode: multiply;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--accent-color);
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    margin: 18px 0;
    line-height: 1.1;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
    box-shadow: 0 12px 30px -20px rgba(59, 130, 246, 0.8);
}

body.light-mode .hero-status {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1f3a8a;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--muted-color);
    max-width: 540px;
}

.hero-typed {
    margin: 28px 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
}

.hero-typed .cursor {
    display: inline-block;
    width: 10px;
    animation: blink 1s steps(1) infinite;
}

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

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.chip {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--accent-color);
    font-size: 0.85rem;
    border: 1px solid rgba(0, 209, 255, 0.15);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
}

.hero-cta .btn {
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 500;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-cta .btn i {
    font-size: 1rem;
}

.hero-cta .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    box-shadow: 0 18px 40px -24px rgba(59, 130, 246, 0.8);
}

.hero-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px -20px rgba(59, 130, 246, 0.9);
}

.hero-cta .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.18);
}

body.light-mode .hero-cta .btn-outline-light {
    border-color: rgba(15, 23, 42, 0.2);
    color: var(--text-color);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.35);
    color: inherit;
}

.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.55);
}

body.light-mode .btn-ghost {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.14);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.hero-social {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 10px 0 30px;
}

.hero-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background var(--transition-speed) ease;
}

.hero-social__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -18px rgba(59, 130, 246, 0.7);
    background: rgba(59, 130, 246, 0.25);
}

body.light-mode .hero-social__link {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.12);
    color: var(--text-color);
}

.metric-card {
    background: var(--surface-color);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.7);
}

.metric-value {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

.metric-label {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--muted-color);
    text-transform: uppercase;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.highlight-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -32px rgba(0, 0, 0, 0.7);
}

.highlight-card i {
    font-size: 1.6rem;
    color: var(--accent-color);
    opacity: 0.8;
}

.section-alt {
    position: relative;
    background: linear-gradient(145deg, rgba(17, 25, 56, 0.4), rgba(10, 16, 38, 0.75));
    border-block: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .section-alt {
    background: linear-gradient(145deg, rgba(226, 232, 255, 0.75), rgba(208, 223, 255, 0.55));
    border-block-color: rgba(15, 23, 42, 0.08);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.focus-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    border-radius: 22px;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 55px -36px rgba(6, 12, 35, 0.85);
    overflow: hidden;
}

body.light-mode .focus-card {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.2);
}

.focus-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(0, 209, 255, 0.18));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent-color);
}

.focus-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.focus-card p {
    margin: 0;
    color: var(--muted-color);
}

.focus-card__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.focus-card__list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.focus-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(0, 209, 255, 0.6);
}

.focus-footer {
    margin-top: 48px;
    padding: 26px 28px;
    border-radius: 20px;
    background: rgba(0, 209, 255, 0.08);
    border: 1px solid rgba(0, 209, 255, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

body.light-mode .focus-footer {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.22);
}

.highlight-card h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.highlight-card p {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.95rem;
}

.code-preview {
    border-radius: 22px;
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px -30px rgba(0, 0, 0, 0.75);
    overflow: hidden;
}

.code-preview header {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
}

.code-preview header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.code-preview pre {
    margin: 0;
    padding: 26px;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.6;
    color: #9ccaff;
    overflow-x: auto;
}

.profile-card {
    position: relative;
    border-radius: 24px;
    background: var(--surface-strong);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.7);
}

.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid rgba(0, 209, 255, 0.4);
}

.profile-bio h2,
.profile-bio h3 {
    margin: 0 0 6px;
    text-align: center;
}

.profile-bio p {
    margin: 0;
    text-align: center;
    color: var(--muted-color);
}

.about-grid {
    display: grid;
    gap: 18px;
}

.about-tags {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    border-radius: 999px;
    padding: 8px 18px;
    border: 1px dashed var(--border-color);
    color: var(--accent-color);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 36px;
    border: 1px solid rgba(0, 209, 255, 0.1);
    pointer-events: none;
    z-index: -1;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0), rgba(59, 130, 246, 0.4), rgba(0, 209, 255, 0));
}

.timeline-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 18px;
}

.timeline-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    margin-top: 6px;
    box-shadow: 0 0 0 6px rgba(0, 209, 255, 0.12);
}

.timeline-content {
    background: var(--surface-color);
    border-radius: 22px;
    border: 1px solid var(--border-color);
    padding: 26px;
    box-shadow: 0 24px 50px -36px rgba(0, 0, 0, 0.7);
}

.timeline-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.timeline-period {
    font-size: 0.85rem;
    color: var(--muted-color);
}

.timeline-content p {
    margin: 18px 0 16px;
    color: var(--muted-color);
}

.timeline-content ul {
    padding-left: 18px;
    margin: 0;
    display: grid;
    gap: 10px;
}

.timeline-content li {
    color: var(--text-color);
}

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

.stack-card {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 28px 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px -32px rgba(0, 0, 0, 0.7);
}

.stack-card h3 {
    margin-top: 0;
    font-size: 1.15rem;
}

.stack-card ul {
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--muted-color);
    display: grid;
    gap: 8px;
}

.tech-marquee {
    overflow: hidden;
    margin-top: 60px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--surface-color);
}

.marquee-track {
    display: flex;
    gap: 60px;
    padding: 18px 28px;
    animation: marquee 24s linear infinite;
    white-space: nowrap;
    font-family: var(--font-mono);
    color: var(--accent-color);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

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

.project-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    background: var(--surface-color);
    border-radius: 22px;
    padding: 32px 26px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(0, 209, 255, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 209, 255, 0.35);
    box-shadow: 0 24px 50px -28px rgba(0, 209, 255, 0.35);
}

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

.project-header {
    margin-bottom: 20px;
}

.project-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.project-card h3 {
    font-size: 1.4rem;
    margin: 8px 0 0;
}

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

.project-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags li {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--chip-bg);
    color: var(--accent-color);
    border: 1px solid rgba(0, 209, 255, 0.18);
}

.contact-panel {
    background: var(--surface-strong);
    border-radius: 28px;
    padding: 48px;
    border: 1px solid var(--border-color);
    box-shadow: 0 28px 70px -34px rgba(0, 0, 0, 0.7);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.contact-item {
    display: grid;
    gap: 6px;
    padding: 22px;
    border-radius: 18px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

body.light-mode .contact-item {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.06);
}

.contact-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 209, 255, 0.35);
}

.contact-item i {
    font-size: 1.6rem;
    color: var(--accent-color);
}

.contact-item small {
    color: var(--muted-color);
}

.footer {
    padding: 32px 0;
    text-align: center;
    color: var(--muted-color);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(5, 7, 17, 0.8);
}

body.light-mode .footer {
    background: rgba(247, 249, 252, 0.8);
    border-top-color: rgba(15, 23, 42, 0.08);
}

.chat-widget {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 1500;
}

.chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(2, 12, 50, 0.45);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, filter var(--transition-speed) ease;
}

.chat-toggle i {
    font-size: 1rem;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 45px rgba(2, 12, 50, 0.55);
    filter: brightness(1.05);
}

.chat-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: min(320px, calc(100vw - 40px));
    padding: 22px;
    border-radius: 20px;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 65px rgba(5, 7, 17, 0.55);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

body.light-mode .chat-panel {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.chat-widget.chat-widget--open .chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.chat-panel__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.chat-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.chat-panel__close:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.light-mode .chat-panel__close {
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .chat-panel__close:hover {
    background: rgba(15, 23, 42, 0.08);
}

.chat-panel p {
    margin: 0 0 18px;
    color: var(--muted-color);
    font-size: 0.95rem;
}

.chat-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: inherit;
    font-weight: 500;
    text-decoration: none;
    transition: transform var(--transition-speed) ease, background var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.chat-action i {
    font-size: 1.1rem;
}

.chat-action:hover {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.24);
    border-color: rgba(59, 130, 246, 0.35);
}

body.light-mode .chat-action {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

body.light-mode .chat-action:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.28);
}

@media (max-width: 768px) {
    .chat-widget {
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .chat-toggle span {
        display: none;
    }
    .chat-toggle {
        padding: 12px;
        border-radius: 50%;
    }
    .chat-widget.chat-widget--open .chat-toggle span {
        display: none;
    }
    .chat-panel {
        width: min(280px, calc(100vw - 32px));
    }
}

.loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 7, 17, 0.85);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

body.light-mode .loader {
    background: rgba(247, 249, 252, 0.85);
}

[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

[data-animate][data-animate-delay] {
    transition-delay: calc(var(--delay, 0) * 1ms);
}

@media (max-width: 992px) {
    .hero {
        padding-top: 140px;
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-cta .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .timeline::before {
        left: 16px;
    }
    .timeline-item {
        grid-template-columns: 50px 1fr;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 90px 0;
    }
    .code-preview pre {
        font-size: 0.85rem;
        padding: 22px;
    }
    .timeline-item {
        grid-template-columns: 100%;
    }
    .timeline::before {
        display: none;
    }
    .timeline-marker {
        display: none;
    }
    .timeline-content {
        padding: 22px;
    }
    .hero-metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .hero-highlights {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .contact-panel {
        padding: 36px;
    }
    .focus-grid {
        grid-template-columns: 1fr;
    }
    .focus-card {
        padding: 24px;
    }
    .focus-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 80px 0;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .hero-lead {
        font-size: 1rem;
    }
    .hero-cta {
        gap: 12px;
    }
    .profile-photo {
        width: 180px;
        height: 180px;
    }
    .contact-item {
        padding: 18px;
    }
    .project-card {
        padding: 26px 20px;
    }
    .focus-footer {
        padding: 22px;
    }
}
