/* ==============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================== */
:root {
    /* Color Palette */
    --bg-base: #070b1a;
    --bg-alt: #0f1630;
    --surface: rgba(18, 26, 56, 0.55);
    --surface-strong: rgba(24, 33, 70, 0.82);
    --text-main: #eef2ff;
    --text-muted: #b7c0e6;
    --accent-a: #7c5cff;
    --accent-b: #27d1ff;
    --accent-c: #ff5ec9;
    --stroke: rgba(255, 255, 255, 0.16);
    
    /* Spacing */
    --section-padding: 78px;
    --container-max-width: 1120px;
    --container-margin: 90vw;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-full: 999px;
    
    /* Transitions */
    --transition-fast: 0.25s ease;
    --transition-normal: 0.45s ease;
    --transition-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 14px 30px rgba(1, 5, 16, 0.35);
    --shadow-md: 0 22px 40px rgba(2, 6, 18, 0.45);
    --shadow-glow: 0 0 40px rgba(39, 209, 255, 0.16);
}

/* ==============================================
   RESET & BASE STYLES
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(1300px 900px at 12% -10%, rgba(124, 92, 255, 0.25) 0%, rgba(124, 92, 255, 0) 60%),
        radial-gradient(1000px 700px at 90% 0%, rgba(39, 209, 255, 0.2) 0%, rgba(39, 209, 255, 0) 65%),
        linear-gradient(160deg, var(--bg-base) 0%, var(--bg-alt) 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    height: auto;
    max-width: 100%;
}

/* ==============================================
   VISUAL EFFECTS
   ============================================== */
/* Scanline Effect */
body.retro-future::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.13;
    background: repeating-linear-gradient(
        0deg,
        rgba(182, 230, 255, 0.14) 0px,
        rgba(182, 230, 255, 0.14) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: screen;
}

/* Ambient Glow */
body.retro-future::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(circle at 50% -20%, rgba(39, 209, 255, 0.1), transparent 40%),
        radial-gradient(circle at 50% 120%, rgba(255, 94, 201, 0.08), transparent 38%);
}

/* Mouse Particle Canvas */
#mouse-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 0;
}

/* Gradient Orbs */
.gradient-orb {
    position: fixed;
    border-radius: var(--radius-full);
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.35;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.orb-1 {
    width: 340px;
    height: 340px;
    top: 8%;
    left: -80px;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-c));
}

.orb-2 {
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: 8%;
    background: linear-gradient(135deg, var(--accent-b), var(--accent-a));
}

/* ==============================================
   LAYOUT COMPONENTS
   ============================================== */
.container {
    width: min(var(--container-max-width), var(--container-margin));
    margin: 0 auto;
}

.section {
    padding: var(--section-padding) 0;
}

/* Glass Morphism Panels */
.panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 42px;
    backdrop-filter: blur(14px);
    box-shadow:
        0 0 0 1px rgba(124, 92, 255, 0.14),
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        var(--shadow-sm);
    will-change: transform;
    transform: translateZ(0);
}

/* ==============================================
   NAVIGATION
   ============================================== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 12;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(39, 209, 255, 0.28);
}

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

nav ul {
    list-style: none;
}

nav ul li {
    display: inline-block;
    margin: 0 14px;
}

nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.9;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

nav ul li a:hover {
    color: var(--accent-b);
    opacity: 1;
    text-shadow: 0 0 12px rgba(39, 209, 255, 0.4);
}

nav .fas {
    display: none;
}

/* ==============================================
   HERO SECTION
   ============================================== */
.hero-section {
    padding-top: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-visual {
    padding: 32px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-b);
    margin-bottom: 16px;
}

.hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 16px;
    text-wrap: balance;
    text-shadow: 0 0 32px rgba(124, 92, 255, 0.24);
}

.hero-copy p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.04rem;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-glow);
}

/* ==============================================
   BUTTONS & INTERACTIVE ELEMENTS
   ============================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--stroke);
    transition: transform var(--transition-fast), 
                box-shadow var(--transition-fast), 
                border-color var(--transition-fast);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 18px rgba(124, 92, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #040814;
    border-color: transparent;
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 10px 25px rgba(39, 209, 255, 0.28);
}

.cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Quick Navigation Pills */
.quick-nav {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-nav a,
.project-jump a {
    display: inline-block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color var(--transition-fast), 
                background var(--transition-fast), 
                color var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.quick-nav a::after,
.project-jump a::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 90%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transition: left var(--transition-normal);
}

.quick-nav a:hover,
.project-jump a:hover {
    border-color: rgba(39, 209, 255, 0.7);
    color: var(--accent-b);
    background: rgba(39, 209, 255, 0.08);
}

.quick-nav a:hover::after,
.project-jump a:hover::after {
    left: 135%;
}

/* ==============================================
   CONTENT SECTIONS
   ============================================== */
.section-title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.section-intro {
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 850px;
    margin-bottom: 26px;
}

/* Typography Helpers */
.text-muted {
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==============================================
   GRID LAYOUTS
   ============================================== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.detail-grid article {
    padding: 24px;
}

.detail-grid h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* Global List Styling */
ul {
    list-style: none;
}

li {
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
    transition: all var(--transition-fast);
}

li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-b);
    font-weight: bold;
    font-size: 1.1em;
}

li:hover {
    color: var(--text-main);
    padding-left: 24px;
}

strong {
    color: var(--accent-b);
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.03em;
}

/* Detail Grid Specific */
.detail-grid ul {
    list-style: none;
}

.detail-grid li {
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
    transition: all var(--transition-fast);
}

.detail-grid li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-b);
    font-weight: bold;
    font-size: 1.1em;
}

.detail-grid li:hover {
    color: var(--text-main);
    padding-left: 24px;
}

.detail-grid strong {
    color: var(--accent-b);
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.03em;
}

/* ==============================================
   TIMELINE (EXPERIENCE)
   ============================================== */
.experience-timeline {
    display: grid;
    gap: 16px;
}

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

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
    box-shadow: 0 0 18px rgba(39, 209, 255, 0.45);
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-left: 14px;
}

.timeline-head h3 {
    font-size: 1.05rem;
}

.timeline-head span {
    color: var(--accent-b);
    font-size: 0.83rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(39, 209, 255, 0.35);
}

.timeline-item p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    transition: all var(--transition-fast);
}

.timeline-item p::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-b);
    font-weight: bold;
    font-size: 1.1em;
}

.timeline-item p:hover {
    color: var(--text-main);
    padding-left: 24px;
}

/* Keyword and Metric Highlighting */
.keyword {
    color: var(--accent-b);
    font-weight: 600;
    background: rgba(39, 209, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.keyword:hover {
    background: rgba(39, 209, 255, 0.2);
    text-shadow: 0 0 8px rgba(39, 209, 255, 0.5);
}

.metric {
    color: var(--accent-c);
    font-weight: 700;
    background: rgba(255, 94, 201, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

.metric:hover {
    background: rgba(255, 94, 201, 0.2);
    text-shadow: 0 0 8px rgba(255, 94, 201, 0.5);
}

/* ==============================================
   ROADMAP
   ============================================== */
.roadmap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.roadmap-item {
    padding: 24px;
}

.roadmap-phase {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-b);
    text-shadow: 0 0 12px rgba(39, 209, 255, 0.3);
}

.roadmap-item h3 {
    margin-bottom: 10px;
}

.roadmap-item p {
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==============================================
   SERVICES
   ============================================== */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.service-card {
    padding: 26px;
}

.service-card i {
    font-size: 1.8rem;
    background: linear-gradient(120deg, var(--accent-c), var(--accent-b));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}

.service-card h3 {
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==============================================
   PROJECTS
   ============================================== */
.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.project-jump {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.project-card {
    position: relative;
    overflow: hidden;
    scroll-margin-top: 120px;
    cursor: pointer;
    transition: border-color var(--transition-fast), 
                box-shadow var(--transition-fast), 
                transform var(--transition-fast);
}

.project-card:focus-visible {
    outline: 2px solid var(--accent-b);
    outline-offset: 3px;
}

.project-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.layer {
    position: static;
    background: linear-gradient(180deg, rgba(10, 18, 38, 0.92) 0%, rgba(10, 18, 38, 0.96) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    padding: 20px;
}

.layer h3 {
    text-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

.layer p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-trigger {
    width: fit-content;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast);
}

.project-trigger:hover {
    border-color: rgba(39, 209, 255, 0.7);
    color: var(--accent-b);
    box-shadow: 0 0 12px rgba(39, 209, 255, 0.25);
}

.active-project {
    border-color: rgba(39, 209, 255, 0.6);
    box-shadow:
        0 0 0 1px rgba(39, 209, 255, 0.35),
        0 0 24px rgba(39, 209, 255, 0.22);
    transform: translateY(-2px);
}

.project-detail {
    margin-top: 22px;
    padding: 24px;
}

.project-detail h3 {
    margin-bottom: 10px;
}

.project-detail p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.project-stack {
    color: var(--accent-b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

/* Project Canvas Performance */
.project-cover {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, rgba(39, 209, 255, 0.1) 100%);
    border-bottom: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(39, 209, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Football Project */
.project-cover-football::after {
    content: '⚽';
    font-size: 5rem;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
    z-index: 1;
    text-shadow: 0 0 20px rgba(39, 209, 255, 0.4);
}

/* Database Project */
.project-cover-database::after {
    content: '🗄️';
    font-size: 5rem;
    opacity: 0.8;
    animation: pulse-icon 2s ease-in-out infinite;
    z-index: 1;
    text-shadow: 0 0 20px rgba(124, 92, 255, 0.4);
}

/* Video Project */
.project-cover-video::after {
    content: '▶️';
    font-size: 5rem;
    opacity: 0.8;
    animation: pulse-icon 2.5s ease-in-out infinite;
    z-index: 1;
    text-shadow: 0 0 20px rgba(255, 94, 201, 0.4);
}

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

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

/* ==============================================
   CONTACT SECTION
   ============================================== */
.contact-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.contact-left p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.contact-left p i {
    color: var(--accent-b);
    margin-right: 8px;
}

.social-accounts {
    margin: 16px 0 24px;
}

.social-accounts a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.5rem;
    margin-right: 14px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-accounts a:hover {
    color: var(--accent-b);
    transform: translateY(-2px);
}

.contact-right {
    padding: 24px;
}

/* Form Styles */
form input,
form textarea {
    width: 100%;
    border: 1px solid transparent;
    background: var(--surface-strong);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

form input:focus,
form textarea:focus {
    border-color: var(--accent-b);
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

form .btn {
    cursor: pointer;
}

#msg {
    display: block;
    margin-top: 8px;
    color: #89f8ac;
}

/* ==============================================
   FOOTER
   ============================================== */
.copyright {
    text-align: center;
    color: var(--text-muted);
    padding: 22px 0 30px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* ==============================================
   LAZY LOADING & ANIMATIONS
   ============================================== */
.section-lazy {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Fade-in Animation */
.fade-in-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), 
                transform var(--transition-slow);
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media only screen and (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 28px;
    }
}

@media only screen and (max-width: 640px) {
    :root {
        --section-padding: 62px;
    }

    nav .fas {
        display: block;
        font-size: 1.4rem;
    }

    nav > .fa-bars {
        display: none;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -220px;
        width: 220px;
        height: 100vh;
        background: linear-gradient(160deg, rgba(8, 12, 28, 0.98), rgba(28, 20, 64, 0.95));
        padding-top: 64px;
        border-left: 1px solid var(--stroke);
        transition: right 0.3s ease;
        z-index: 20;
    }

    nav ul li {
        display: block;
        margin: 20px 24px;
    }

    nav ul .fas {
        position: absolute;
        top: 18px;
        left: 18px;
        cursor: pointer;
    }

    .hero-copy,
    .hero-visual,
    .detail-grid article,
    .timeline-item,
    .service-card,
    .contact-right {
        padding: 22px;
    }

    .timeline-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .section-lazy, 
    .fade-in-item {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .project-cover canvas {
        display: none;
    }
}

/* Focus Visible for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--accent-b);
    outline-offset: 2px;
}
