﻿/* ================ ROOT VARIABLES ================ */
:root {
    --bg: #0a0a0a;
    --surface: #111;
    --surface2: #1a1a1a;
    --border: #222;
    --accent: #00ffff;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #888;
    --text-light: #ddd;
}

/* 1. RESET & GLOBAL */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

#hero, #experience, #projects, #skills, #contact, .docs-section {
    scroll-margin-top: 90px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

#experience, #projects, #skills, #contact, .docs-section {
    padding: 100px 0;
}


/* 2. TYPOGRAPHY & BASE */

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}




/* ================ NAV & HAMBURGER ================ */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

#navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px 20px;
}

.nav-links {
    display: flex;
    gap: 48px;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 8px;
}

.nav-links a:hover {
    color: var(--text);
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #0ff;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    position: absolute;
    right: 20px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: white;
}



/* 4. HERO */


#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 160px 0 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 4.8rem;
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.45rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.4;
}

/* ================ BUTTONS & CTAs ================ */

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

/* Base Button Style */
.btn {
    padding: 13px 34px;
    font-size: 1.02rem;
    font-weight: 600;
    background-color: var(--text);
    color: #0a0a0a;
    border: 2px solid transparent;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--surface2);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Main CTA overrides */
.main-cta {
    padding: 16px 36px;
    font-size: 1.12rem;
}

.contact-cta .main-cta {
    padding: 18px 48px;
    min-width: 240px;
}

/* Icon Buttons (social + others) */
.icon-btn {
    width: 54px;
    height: 54px;
    background-color: var(--surface2);
    border: 2px solid #333;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    border-color: var(--accent);
    background-color: #222;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.25);
}

/* Icon inside buttons */
.btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.main-cta:hover .btn-icon,
.icon-btn:hover .btn-icon {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px #00ffff);
}

/* Performance + Box Model */
.btn, .icon-btn, .project-card, .experience-card, .cert-card, .timeline-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform; /* Only transform when needed */
}

button, a.btn {
    box-sizing: border-box;
}



/* 6. PROJECTS + DOCS GRID */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 36px;
    padding: 20px 0;
}

/* Only one override needed */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.project-card {
    background-color: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid #222;
    height: 100%;
    display: flex;
    flex-direction: column;        /* Back to vertical layout */
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.1);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-info {
    padding: 32px 32px 36px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.project-info p {
    color: #aaa;
    margin-bottom: 26px;
    line-height: 1.55;
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: 24px;
}

.project-tag {
    background-color: #222;
    color: #0ff;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
}

.project-info .btn {
    margin-top: auto;
    margin-left: auto;
}

.docs-page #navbar .nav-links a[href="docs.html"] {
    color: var(--accent);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 1.05rem;
    cursor: pointer;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

#sort-btn {
    padding: 12px 28px;
}

#sort-btn:hover {
    border-color: var(--accent);
    background-color: #222;
    color: var(--text);
}



/* 7. EXPERIENCE + TIMELINE */

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.experience-card {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #222;
    transition: all 0.4s ease;
}

.experience-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.1);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.experience-header h3 {
    font-size: 1.45rem;
    margin: 0;
    flex: 1;
}

.experience-date {
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

.experience-company {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.experience-list {
    list-style: none;
    padding: 0;
    color: #ccc;
    line-height: 1.65;
}

.experience-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.experience-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}


/* 8. SKILLS */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    padding: 20px 0;
}

.skill-orb {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.skill-orb:hover {
    border-color: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.25);
}

.skill-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.skill-orb:hover .skill-icon {
    transform: scale(1.15);
    filter: brightness(1.2) drop-shadow(0 0 12px #00ffff);
}

.skill-name {
    font-size: 1rem;
    font-weight: 600;
    color: #eee;
    text-align: center;
    padding: 0 12px;
}

.skill-orb {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-orb.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger animation */
.skills-grid .skill-orb:nth-child(1) { transition-delay: 0.05s; }
.skills-grid .skill-orb:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .skill-orb:nth-child(3) { transition-delay: 0.15s; }
.skills-grid .skill-orb:nth-child(4) { transition-delay: 0.2s; }
.skills-grid .skill-orb:nth-child(5) { transition-delay: 0.25s; }
.skills-grid .skill-orb:nth-child(6) { transition-delay: 0.3s; }
.skills-grid .skill-orb:nth-child(7) { transition-delay: 0.35s; }
.skills-grid .skill-orb:nth-child(8) { transition-delay: 0.4s; }
.skills-grid .skill-orb:nth-child(9) { transition-delay: 0.45s; }
.skills-grid .skill-orb:nth-child(10){ transition-delay: 0.5s; }
.skills-grid .skill-orb:nth-child(11){ transition-delay: 0.55s; }




/* 9. CERTIFICATIONS */


.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    padding: 20px 0;
}

.cert-card {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    border: 1px solid #222;
    transition: all 0.4s ease;
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.1);
}

.cert-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    display: block;
    transition: all 0.3s ease;
}

.cert-card:hover .cert-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 20px #00ffff);
}

.cert-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.cert-card p {
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 20px;
}

.cert-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.cert-link:hover {
    text-decoration: underline;
}


/* 10. CONTACT + FOOTER */

#contact {
    padding: 120px 0;
    text-align: center;
}

.contact-cta {
    margin-top: 40px;
}

.contact-cta .main-cta {
    font-size: 1.15rem;
    padding: 18px 48px;
    min-width: 240px;
}

/* ================ FOOTER ================ */
footer {
    padding: 60px 0;
    background-color: var(--surface);
    text-align: center;
    color: #666;
}


/* 11. DOCS PAGE SPECIFIC (filters, tldr, post styles) */


/* ================ DOCS PAGE CONTAINER ================ */
.docs-page .container {
    max-width: 1480px;
    padding: 0 48px;
}




/* ==================== TLDR CONTAINER ==================== */
.tldr-container {
    background: linear-gradient(145deg, #1a1a1a, #111);
    border: 1px solid #00ffff33;
    border-radius: 16px;
    padding: 40px 48px;
    margin: 40px 0 60px;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.08);
    position: relative;
}

.tldr-container h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: left;
}

.tldr-content {
    max-height: 130px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.tldr-content.expanded {
    max-height: 800px;
}

.tldr-container p {
    color: var(--text-light);
    line-height: 1.75;
    font-size: 1.08rem;
    max-width: 900px;
}

.tldr-toggle-btn {
    margin-top: 16px;
    padding: 10px 28px;
    background: transparent;
    color: var(--accent);
    border: 1px solid #00ffff33;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.tldr-toggle-btn:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: var(--accent);
}

/* Core Components Grid */
.core-components-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
    margin: 40px 0;
}

.core-image {
    order: 1;
}

.core-text {
    order: 2;
}




/* Layer 2 Grid */
.layer2-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
    margin: 40px 0;
}

.layer2-image {
    order: 1;   /* Image first on mobile */
}

.layer2-text {
    order: 2;
}



/* Layer 3 Grid - Same pattern as Layer 2 */
.layer3-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
    margin: 40px 0;
}

.layer3-image {
    order: 1;   /* Image first on mobile */
}

.layer3-text {
    order: 2;
}




.hero-tag {
    display: inline-block;
    background-color: var(--surface2);
    color: var(--accent);
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    border: 1px solid #00ffff33;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* ================ TIMELINE ================ */
.timeline {
    position: relative;
    max-width: 960px;
    margin: 60px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 118px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #00ffff, #00aaff);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 90px;
    display: flex;
    align-items: flex-start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Dot overlaid ON the line */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 118px;
    top: 28px;
    width: 18px;
    height: 18px;
    background: #0a0a0a;
    border: 4px solid #00ffff;
    border-radius: 50%;
    z-index: 3;
}

/* Content card */
.timeline-content {
    margin-left: 150px;
    background-color: var(--surface);
    border-radius: 16px;
    padding: 36px;
    border: 1px solid #222;
    flex: 1;
    min-width: 0;
    position: relative;
}

.timeline-content:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.1);
}

/* Date inside card */
.timeline-date {
    font-size: 1.05rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
}

/* Tags - fixed */
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tag {
    background-color: var(--surface2);
    color: #0ff;
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 0.87rem;
    border: 1px solid #333;
}

/* Rest */
.timeline-header h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.company {
    color: #aaa;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Documentation Posts */

.post-tag {
    background-color: var(--surface2);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background-color: #222;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.back-to-library {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.back-to-library:hover {
    color: var(--text);
    text-shadow: 0 0 10px #00ffff;
}

/* ================ RESPONSIVE ================ */

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==================== MOBILE FIRST (≤ 768px) ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    #hero {
        padding: 110px 0 80px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0;
    }

    .hero-text {
        text-align: center;
    }

    .hero-title {
        font-size: 2.9rem;
        line-height: 1.05;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1.18rem;
        margin-bottom: 32px;
    }

    .hero-buttons {
        justify-content: center;
        gap: 18px;
    }

    .main-cta {
        padding: 15px 32px;
        font-size: 1.05rem;
    }

    .icon-btn {
        width: 48px;
        height: 48px;
    }

    .btn-icon {
        width: 22px;
        height: 22px;
    }

    /* Navigation */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transition: left 0.4s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-links li {
        display: block;
    }

    /* Skills - Mobile */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 10px 0;
        justify-content: center;
    }

    .skill-orb {
        width: 100%;
        max-width: 108px;        /* ← Key fix: cap the width */
        height: 112px;
        padding: 10px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .skill-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .skill-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    /* Timeline */
    .timeline {
        max-width: 100%;
        padding: 0 16px;
    }

    .timeline::before {
        left: 28px;
        width: 4px;
    }

    .timeline-item {
        margin-bottom: 70px;
    }

    .timeline-item::after {
        left: 28px;
        top: 22px;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        margin-left: 68px;
        padding: 24px;
    }

    .timeline-date {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .timeline-header h3 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .experience-list li {
        padding-left: 20px;
        font-size: 0.97rem;
    }
}

/* ==================== TABLET / SMALL DESKTOP (≤ 1024px) ==================== */
@media (max-width: 1024px) {
    .hero-grid {
        gap: 40px;
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 3.8rem;
    }

    .container {
        max-width: 900px;
    }
}

/* ==================== DOCS PAGE CONTAINER ==================== */
@media (max-width: 1400px) {
    .docs-page .container {
        padding: 0 32px;
    }
}

@media (min-width: 1800px) {
    .docs-page .container {
        padding: 0 80px;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        gap: 20px;
    }
}

/* ==================== DESKTOP GRID OVERRIDES (≥ 768px) ==================== */
@media (min-width: 768px) {
    /* Post content grids - image on right, text on left */
    .core-components-grid,
    .layer2-grid,
    .layer3-grid {
        grid-template-columns: 1fr 1fr;
    }

    .core-image,
    .layer2-image,
    .layer3-image {
        order: 2;
    }

    .core-text,
    .layer2-text,
    .layer3-text {
        order: 1;
    }
}

