:root {
    --bg: #040816;
    --panel: rgba(9, 14, 30, 0.82);
    --panel-strong: rgba(11, 18, 36, 0.94);
    --border: rgba(148, 163, 184, 0.14);
    --text: #eff6ff;
    --text-dim: #9aa8c7;
    --primary: #6d7cff;
    --secondary: #14d3ff;
    --accent: #7c3aed;
    --warm: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(109, 124, 255, 0.18), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(20, 211, 255, 0.12), transparent 24%),
        linear-gradient(180deg, #07101f 0%, #040816 58%, #05070f 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.page-noise,
.glow,
.glow-2,
.grid-halo {
    position: fixed;
    pointer-events: none;
}

.page-noise {
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 88%);
}

.glow {
    width: 32rem;
    height: 32rem;
    top: -8rem;
    right: -7rem;
    border-radius: 999px;
    background: rgba(109, 124, 255, 0.18);
    filter: blur(90px);
    z-index: -1;
}

.glow-2 {
    width: 24rem;
    height: 24rem;
    bottom: 8rem;
    left: -7rem;
    border-radius: 999px;
    background: rgba(20, 211, 255, 0.12);
    filter: blur(85px);
    z-index: -1;
}

.grid-halo {
    width: 56vw;
    height: 56vw;
    left: 50%;
    top: 14rem;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(124, 58, 237, 0.16) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.7;
    z-index: -1;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(4, 8, 22, 0.6);
    border-bottom: 1px solid var(--border);
}

header .container {
    width: min(1180px, calc(100% - 2rem));
    min-height: 4.8rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text);
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

nav a,
.nav-resume,
.btn,
.btn-dive,
.chat-button,
.send-btn {
    transition:
        transform 0.24s ease,
        background 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        color 0.24s ease;
}

nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
}

nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.nav-resume,
.btn,
.btn-dive,
.chat-button,
.send-btn,
.chat-close-button,
.cell {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
}

.nav-resume {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    color: white;
    padding: 0.68rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    box-shadow: 0 18px 40px rgba(57, 73, 171, 0.25);
}

.nav-resume:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 22px 50px rgba(57, 73, 171, 0.38);
    border-color: rgba(125, 211, 252, 0.34);
}

main {
    padding-bottom: 8rem;
}

.hero,
section {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    padding: 6rem 0 2rem;
    text-align: left;
}

.section-shell {
    position: relative;
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
        radial-gradient(circle at top right, rgba(109, 124, 255, 0.1), transparent 42%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-shell::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 2rem;
    width: 7rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.8), transparent);
}

.hero-text {
    max-width: 58rem;
}

.eyebrow,
.meta,
.meta-warm {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(109, 124, 255, 0.24);
    background: rgba(109, 124, 255, 0.08);
    color: #c7d2fe;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.meta,
.meta-warm {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

.meta {
    color: #7dd3fc;
}

.meta-warm {
    color: #fdba74;
}

.hero h1 {
    margin-top: 1.4rem;
    font-size: clamp(3.3rem, 8vw, 6.8rem);
    line-height: 0.98;
    letter-spacing: 0;
    background: linear-gradient(180deg, #ffffff 0%, #d7e3ff 38%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    display: block;
    min-height: 1.2em;
    background: linear-gradient(90deg, var(--secondary), #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 48rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dim);
    font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.typing-cursor::after {
    content: "|";
    color: var(--secondary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.hero-actions > a,
.hero-actions > button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 3.2rem;
    padding: 0.95rem 1.5rem;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 700;
    color: white;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.hero-actions > a:first-child {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    box-shadow: 0 18px 40px rgba(57, 73, 171, 0.28);
}

.btn,
.btn-dive {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.18);
}

.btn::before,
.btn-dive::before,
.nav-resume::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: translateX(-100%);
    transition: transform 0.45s ease;
}

.btn:hover::before,
.btn-dive:hover::before,
.nav-resume:hover::before {
    transform: translateX(100%);
}

.btn {
    padding: 0.95rem 1.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 18px 40px rgba(57, 73, 171, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.btn:hover,
.btn-dive:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 211, 252, 0.36);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 22px 55px rgba(57, 73, 171, 0.4);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.6rem;
}

.section-header-center {
    justify-content: center;
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: linear-gradient(180deg, rgba(109, 124, 255, 0.12), rgba(20, 211, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.section-title::after {
    content: none;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.15;
}

.card,
.vision-container {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    box-shadow: var(--shadow);
}

.card {
    padding: 1.6rem;
    border-radius: 22px;
    height: 100%;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(125, 211, 252, 0.32);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.about-grid,
.projects-grid {
    display: grid;
    gap: 1rem;
}

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

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

.muted-text,
.vision-text,
.recipe-list li,
.method-steps p,
.contact-card p {
    color: var(--text-dim);
}

.project-text {
    margin-top: 0.85rem;
}

.section-subtitle {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.section-subtitle-spaced {
    margin-top: 1.5rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 0.86rem;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.34);
    background: rgba(125, 211, 252, 0.12);
    color: white;
}

.skill-tag-highlight {
    border-color: rgba(245, 158, 11, 0.34);
    color: white;
    background: rgba(245, 158, 11, 0.09);
}

.vision-container {
    margin-top: 1.25rem;
    padding: 1.8rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.vision-title {
    margin-bottom: 0.9rem;
    color: #c7d2fe;
    font-size: 1.2rem;
}

.vision-text {
    max-width: 46rem;
}

.btn-dive {
    margin-top: 1.3rem;
    padding: 0.95rem 1.45rem;
    background: linear-gradient(180deg, rgba(109, 124, 255, 0.18), rgba(20, 211, 255, 0.12));
    color: white;
}

.fuel-title {
    display: flex;
    align-items: center;
}

.chai-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 auto;
    margin-right: 0.9rem;
    color: #fdba74;
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.35));
}

.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 1.4rem;
}

.recipe-list {
    list-style: none;
}

.recipe-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
}

.recipe-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #fdba74;
}

.method-steps p {
    position: relative;
    padding-left: 2.6rem;
    margin-bottom: 1rem;
}

.method-steps p span {
    position: absolute;
    left: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.14);
    color: #fdba74;
    font-weight: 800;
    font-size: 0.78rem;
}

.contact-section {
    text-align: center;
}

.contact-card {
    max-width: 38rem;
    margin: 0 auto;
}

.contact-line {
    margin-bottom: 0.75rem;
}

.contact-link {
    color: #7dd3fc;
    text-decoration: none;
}

.contact-link:hover {
    color: white;
}

footer {
    width: min(1180px, calc(100% - 2rem));
    margin: 5rem auto 0;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: center;
}

.chat-widget {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-button {
    width: 64px;
    height: 64px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 50%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    color: white;
    display: grid;
    place-items: center;
    box-shadow: 0 18px 40px rgba(57, 73, 171, 0.34);
    cursor: pointer;
}

.chat-button:hover,
.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 50px rgba(57, 73, 171, 0.42);
}

.chat-window {
    position: absolute;
    right: 0;
    bottom: 80px;
    width: min(390px, 92vw);
    height: 550px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 20, 0.95);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    overflow: hidden;
    pointer-events: none;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.chat-header-title strong,
.chat-header-title span {
    display: block;
}

.chat-header-title span {
    margin-top: 0.2rem;
    color: var(--text-dim);
    font-size: 0.76rem;
}

.chat-close-button {
    background: transparent;
    border: 0;
    color: white;
    font-size: 1.5rem;
}

.chat-close-button:hover {
    transform: scale(1.08);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.message {
    max-width: 85%;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    line-height: 1.45;
    font-size: 0.92rem;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
}

.message.error {
    align-self: center;
    background: rgba(220, 38, 38, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

.message.bot p {
    margin-bottom: 0.45rem;
}

.message.bot p:last-child {
    margin-bottom: 0;
}

.message.bot ul,
.message.bot ol {
    margin-left: 1.1rem;
}

.typing-indicator {
    display: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
}

.chat-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.chat-input-area input {
    flex: 1;
    min-width: 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    padding: 0.85rem 0.95rem;
    outline: none;
}

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
}

#about .card::before,
#skills .card::before,
#projects .card::before,
#fuel .card::before,
#contact .card::before,
.vision-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 42%);
    pointer-events: none;
}

#skills .skill-group,
#fuel .recipe-grid > div,
#contact .contact-card,
#about .card,
#projects .card {
    position: relative;
    z-index: 1;
}

@media (max-width: 960px) {
    .about-grid,
    .projects-grid,
    .skills-container,
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 4rem;
    }

    .section-shell {
        padding: 1.3rem;
        border-radius: 24px;
    }

    nav a {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .btn-dive {
        width: 100%;
    }

    .chat-window {
        width: 92vw;
        right: 0;
    }
}
