/* ============================================================
   ENHANCE LAYER
   Visual upgrades on top of the base section styles.
   Loaded last on index.html and first-class on project.html.
   ============================================================ */
:root {
    --cyan: #00D4FF;
    --orange: #FF6B00;
    --violet: #8b5cf6;
    --ink: #07090f;
    --panel: rgba(255, 255, 255, 0.035);
    --line: rgba(255, 255, 255, 0.08);
    --muted: #9aa3b2;
    --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

body {
    background: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ===== Scroll progress ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--cyan), var(--violet), var(--orange));
    z-index: 10000;
    pointer-events: none;
}

/* ===== Logo ===== */
.logo-icon {
    animation: none;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 15px;
    color: #06121a;
    background: linear-gradient(135deg, var(--cyan), #7dd3fc 45%, var(--orange));
    box-shadow: 0 6px 22px -6px var(--cyan);
}

/* ===== Hero ===== */
.hero {
    background:
        radial-gradient(70% 60% at 15% 35%, rgba(0, 212, 255, 0.13), transparent 60%),
        radial-gradient(60% 55% at 90% 15%, rgba(139, 92, 246, 0.14), transparent 60%),
        radial-gradient(55% 50% at 75% 95%, rgba(255, 107, 0, 0.10), transparent 60%),
        var(--ink);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 25%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 25%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.shape {
    opacity: 0.16;
    filter: blur(50px);
}

.name {
    letter-spacing: 2px;
    filter: drop-shadow(0 0 34px rgba(0, 212, 255, 0.28));
}

.typing-wrapper {
    font-family: var(--mono);
    font-size: 26px;
}

.cursor {
    font-size: 30px;
}

/* ----- hero visual: code window ----- */
.hero-visual {
    position: relative;
    padding: 34px 26px;
    animation: fadeInRight 1s ease 0.4s both;
}

.code-window {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 22, 36, 0.92), rgba(9, 12, 20, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, 0.9),
        0 0 80px -30px rgba(0, 212, 255, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: perspective(1400px) rotateY(-9deg) rotateX(4deg);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    animation: floatWindow 7s ease-in-out infinite;
}

.hero-visual:hover .code-window {
    transform: perspective(1400px) rotateY(0deg) rotateX(0deg);
}

@keyframes floatWindow {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

.code-window::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.7), transparent 35%, transparent 65%, rgba(255, 107, 0, 0.6));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.code-bar span:nth-child(1) { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }

.code-bar em {
    margin-left: 10px;
    font-style: normal;
    font-family: var(--mono);
    font-size: 12px;
    color: #6b7385;
}

.code-body {
    margin: 0;
    padding: 22px 24px 26px;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.85;
    color: #c9d1e0;
    white-space: pre;
    overflow-x: auto;
    text-align: left;
}

.c-k { color: #c084fc; }
.c-v { color: #7dd3fc; }
.c-p { color: #9ca3af; }
.c-s { color: #86efac; }
.c-n { color: #fdba74; }
.c-f { color: #fde047; }
.c-c { color: #5b6477; font-style: italic; }

.code-caret {
    display: inline-block;
    width: 8px;
    height: 17px;
    margin-left: 3px;
    vertical-align: -3px;
    background: var(--cyan);
    animation: blink 0.9s step-end infinite;
}

/* ----- hero visual: floating tech chips ----- */
.tech-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 50px;
    background: rgba(12, 16, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e8ecf4;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9);
    animation: floatCard 6s ease-in-out infinite;
    z-index: 2;
}

.tech-chip i { font-size: 15px; }
.chip-1 { top: 0; left: 0; animation-delay: 0s; }
.chip-1 i { color: #a78bfa; }
.chip-2 { top: 6px; right: 0; animation-delay: -1.5s; }
.chip-2 i { color: #61dafb; }
.chip-3 { bottom: 6px; left: 14px; animation-delay: -3s; }
.chip-3 i { color: #fb923c; }
.chip-4 { bottom: 0; right: 8px; animation-delay: -4.5s; }
.chip-4 i { color: #fde047; }

/* ===== Tech marquee ===== */
.tech-marquee {
    position: relative;
    overflow: hidden;
    padding: 22px 0;
    background: #090c14;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
    display: flex;
    gap: 46px;
    width: max-content;
    animation: marquee 38s linear infinite;
}

.tech-marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 14px;
    color: #7f8898;
    white-space: nowrap;
}

.marquee-track span i {
    color: var(--cyan);
    font-size: 16px;
}

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

/* ===== Section polish ===== */
.about-section,
.skills-section,
.portfolio-section,
.contact-section {
    background: var(--ink);
}

.about-section::after,
.skills-section::after,
.portfolio-section::after,
.contact-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(900px, 80%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.45), rgba(255, 107, 0, 0.35), transparent);
    pointer-events: none;
}

.about-section::before {
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.09) 0%, transparent 65%);
}

.skills-section::before {
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 65%);
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -20%;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 65%);
    pointer-events: none;
}

.section-tag {
    font-family: var(--mono);
    letter-spacing: 1.5px;
}

.section-tag::before {
    content: '// ';
    opacity: 0.55;
}

.section-title {
    letter-spacing: -0.6px;
}

/* ===== Glass cards ===== */
.skill-category,
.info-card,
.stat-item,
.contact-card,
.timeline-content,
.contact-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.skill-category:hover,
.info-card:hover,
.stat-item:hover,
.contact-card:hover,
.timeline-content:hover {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9), 0 0 44px -22px var(--cyan), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
}

.profile-image {
    box-shadow: 0 30px 70px -30px rgba(0, 212, 255, 0.45);
}

/* ===== Skill bars ===== */
.progress-bar {
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.progress-fill {
    position: relative;
    overflow: hidden;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-fill.blue { background: linear-gradient(90deg, #0284c7, #00D4FF); box-shadow: 0 0 14px rgba(0, 212, 255, 0.55); }
.progress-fill.orange { background: linear-gradient(90deg, #ea580c, #fdba74); box-shadow: 0 0 14px rgba(255, 107, 0, 0.5); }
.progress-fill.green { background: linear-gradient(90deg, #059669, #6ee7b7); box-shadow: 0 0 14px rgba(52, 211, 153, 0.5); }
.progress-fill.purple { background: linear-gradient(90deg, #7c3aed, #c4b5fd); box-shadow: 0 0 14px rgba(139, 92, 246, 0.5); }

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: translateX(-100%);
    animation: shimmer 2.8s ease-in-out infinite;
}

@keyframes shimmer {
    60%, 100% { transform: translateX(100%); }
}

.skill-percentage {
    font-family: var(--mono);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--line);
    background: #06080d;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-visual {
        max-width: 560px;
        width: 100%;
        margin: 0 auto;
    }

    .code-window {
        transform: none;
    }
}

@media (max-width: 600px) {
    .typing-wrapper { font-size: 17px; }
    .cursor { font-size: 20px; }
    .hero-visual { padding: 30px 0; }
    .code-body { font-size: 11px; padding: 16px; }
    .tech-chip { font-size: 11px; padding: 7px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .code-window,
    .tech-chip,
    .marquee-track,
    .progress-fill::after,
    .shape {
        animation: none;
    }

    html { scroll-behavior: auto; }
}

/* ===== Footer layout ===== */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #7f8898;
    font-size: 14px;
}

.footer-container strong {
    color: #fff;
}

/* ===== Contact form card ===== */
.contact-form {
    padding: 30px;
    border-radius: 24px;
}

/* the message box grows so the card has no empty space under the button */
.contact-form .form-group:has(textarea) {
    flex: 1;
    display: flex;
}

.contact-form textarea {
    flex: 1;
    min-height: 150px;
    resize: none;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 600px) {
    .contact-form {
        padding: 20px;
    }
}
