/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-dark: #07111f;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.3);

    --primary-cyan: #38bdf8;
    --primary-purple: #c084fc;
    --primary-pink: #f472b6;
    --primary-green: #4ade80;
    --primary-yellow: #facc15;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Plus Jakarta Sans', var(--font-sans);
    --font-code: 'Fira Code', monospace;

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. GLOW BACKGROUNDS & DECORATIONS
   ========================================================================== */
.page-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.25;
}

.glow-one {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--primary-cyan), transparent 70%);
}

.glow-two {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--primary-purple), transparent 70%);
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(7, 17, 31, 0.75);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    padding: 0.85rem 5%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-mark {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    color: #000;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
}

.logo-accent {
    color: var(--primary-cyan);
}

.navigation {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-cyan);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-cv {
    text-decoration: none;
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-highlight);
    background: rgba(56, 189, 248, 0.05);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.header-cv:hover {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
}

/* ==========================================================================
   4. LAYOUT & SECTIONS
   ========================================================================== */
.section {
    padding: 7rem 8% 4rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-heading {
    margin-bottom: 3.5rem;
}

.section-heading.centered {
    text-align: center;
}

.section-heading span {
    font-family: var(--font-code);
    color: var(--primary-cyan);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-heading h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
}

.section-heading h2 strong {
    color: var(--primary-cyan);
    font-weight: 800;
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 3rem;
    min-height: 90vh;
    padding-top: 8rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--primary-cyan);
    background: rgba(56, 189, 248, 0.08);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-copy h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.hero-copy h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-cyan);
    color: #07111f;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

.social-row {
    display: flex;
    gap: 1rem;
}

.social-row a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-row a:hover {
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
    transform: translateY(-3px);
}

/* Developer Visual Code Card */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.code-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.window-bar {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-bar small {
    margin-left: auto;
    font-family: var(--font-code);
    color: var(--text-dim);
}

.code-content {
    padding: 1.5rem;
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.7;
}

.pink { color: var(--primary-pink); }
.cyan { color: var(--primary-cyan); }
.purple { color: var(--primary-purple); }
.green { color: var(--primary-green); }
.yellow { color: var(--primary-yellow); }

.tech-pills {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.tech-pills span {
    font-size: 0.75rem;
    font-family: var(--font-code);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.floating-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    animation: float 4s ease-in-out infinite;
}

.card-top { top: -20px; right: -20px; }
.card-bottom { bottom: -20px; left: -20px; animation-delay: 2s; }

.floating-card i {
    font-size: 1.4rem;
    color: var(--primary-cyan);
}

.floating-card strong { display: block; font-size: 0.85rem; }
.floating-card small { color: var(--text-muted); font-size: 0.75rem; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   6. ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.large-copy {
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 500;
}

.about-lead p {
    color: var(--text-muted);
}

.about-facts {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.fact-card {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 12px;
    transition: var(--transition-fast);
}

.fact-card:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.fact-card span {
    font-family: var(--font-code);
    color: var(--primary-cyan);
    font-weight: 700;
    font-size: 1.1rem;
}

.fact-card strong { display: block; margin-bottom: 0.2rem; }
.fact-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================================================
   7. SKILLS SECTION
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.skill-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.8rem;
    border-radius: 14px;
    position: relative;
    transition: var(--transition-smooth);
}

.skill-tile:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.skill-tile.featured {
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(56,189,248,0.05));
}

.tile-icon {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.skill-tile h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.skill-tile p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    background: var(--primary-cyan);
    color: #000;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
}

/* ==========================================================================
   8. PROJECTS SECTION
   ========================================================================== */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.project-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
}

.project-media {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    background: rgba(0, 0, 0, 0.4);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: top center; 
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.01);
}

.project-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.project-body {
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
}

.project-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-cyan);
    font-family: var(--font-code);
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.project-body h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-body p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: auto;
}

.tags span {
    font-family: var(--font-code);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    color: var(--text-muted);
}

.project-url {
    align-self: flex-start;
    color: var(--primary-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.project-url:hover {
    gap: 0.7rem;
}

.status {
    font-size: 0.8rem;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status i { font-size: 0.5rem; }

/* ==========================================================================
   9. EXPERIENCE / TIMELINE
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: calc(-2rem - 6px);
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--bg-dark);
    border: 2px solid var(--text-muted);
    border-radius: 50%;
}

.timeline-item.current .timeline-dot {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-cyan);
}

.timeline-time {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--primary-cyan);
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   10. CONTACT & FOOTER
   ========================================================================== */
.contact-panel {
    background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.5));
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    padding: 3.5rem 8%;
    text-align: center;
}

.contact-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.contact-link:hover {
    border-color: var(--primary-cyan);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

.icon-box {
    font-size: 1.2rem;
    color: var(--primary-cyan);
}

.link-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.link-text small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.link-text span {
    font-size: 0.9rem;
    font-weight: 600;
}

.footer {
    padding: 2rem 8%;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 1300px;
    margin: 0 auto;
}

.back-to-top {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.back-to-top:hover {
    color: var(--primary-cyan);
}

/* ==========================================================================
   11. RESPONSIVE DESIGN (MOBILE & TABLETS)
   ========================================================================== */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 6rem;
        gap: 4rem;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-text {
        margin: 0 auto 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .social-row {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-media {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .navigation {
        position: fixed;
        top: 68px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 68px);
        background: rgba(7, 17, 31, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition-smooth);
    }

    .navigation.active {
        left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-copy h1 {
        font-size: 2.3rem;
    }

    .contact-actions {
        flex-direction: column;
    }

    .contact-link {
        width: 100%;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
