@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --header-height: 4.8rem;
    --z-fixed: 100;

    /* Dark theme (default) */
    --body-color:     #080d1a;
    --card-color:     #0f1629;
    --card-hover:     #152040;
    --accent:         #4f8ef7;
    --accent-alt:     #38bdf8;
    --accent-glow:    rgba(79, 142, 247, 0.22);
    --text:           #cbd5e1;
    --text-light:     #64748b;
    --title:          #f1f5f9;
    --border:         rgba(255, 255, 255, 0.07);
    --shadow:         0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-card:    0 4px 20px rgba(0, 0, 0, 0.35);
    --header-bg:      rgba(8, 13, 26, 0.88);
    --footer-bg:      #050810;

    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --font-sec:  'Montserrat', sans-serif;

    --fs-h1:    clamp(2rem, 4vw, 3rem);
    --fs-h2:    clamp(1.8rem, 3vw, 2.4rem);
    --fs-h3:    1.8rem;
    --fs-body:  1.6rem;
    --fs-sm:    1.4rem;
    --fs-xs:    1.2rem;

    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semi:   600;
    --fw-bold:   700;

    --section-py: 7rem;
}

/* Light theme overrides */
.light-theme {
    --body-color:   #f0f4fc;
    --card-color:   #ffffff;
    --card-hover:   #f5f8ff;
    --accent:       #2563eb;
    --accent-alt:   #0ea5e9;
    --accent-glow:  rgba(37, 99, 235, 0.15);
    --text:         #374151;
    --text-light:   #6b7280;
    --title:        #111827;
    --border:       rgba(0, 0, 0, 0.08);
    --shadow:       0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-card:  0 4px 16px rgba(0, 0, 0, 0.07);
    --header-bg:    rgba(240, 244, 252, 0.92);
    --footer-bg:    #1e293b;
}

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-body);
    background-color: var(--body-color);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

ul  { list-style: none; }
a   { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    color: var(--title);
    font-weight: var(--fw-semi);
    line-height: 1.3;
}

section {
    padding: var(--section-py) 0;
    scroll-margin-top: var(--header-height);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 2.4rem;
}

.section_title {
    font-size: var(--fs-h2);
    color: var(--title);
    text-align: center;
    margin-bottom: 0.6rem;
}

.section_subtitle {
    display: block;
    font-size: var(--fs-sm);
    color: var(--text-light);
    text-align: center;
    margin-bottom: 4.5rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav_logo {
    font-family: var(--font-sec);
    font-weight: var(--fw-bold);
    font-size: 1.7rem;
    color: var(--title);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav_logo:hover { color: var(--accent); }

.nav_list {
    display: flex;
    align-items: center;
    gap: 2.8rem;
}

.nav_link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--text);
    white-space: nowrap;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 0.2rem;
}
.nav_link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.25s ease;
}
.nav_link:hover,
.nav_link.active-link { color: var(--accent); }
.nav_link:hover::after,
.nav_link.active-link::after { width: 100%; }

.nav_icon { font-size: 1rem; }

.nav_btns {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.change-theme {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.2s, transform 0.2s;
}
.change-theme:hover {
    color: var(--accent);
    transform: rotate(20deg);
}

.nav_toggle {
    display: none;
    font-size: 2.2rem;
    color: var(--title);
    cursor: pointer;
}

.nav_close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.2rem;
    cursor: pointer;
    color: var(--title);
    transition: color 0.2s;
}
.nav_close:hover { color: var(--accent); }

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
    padding-top: calc(var(--header-height) + 5rem);
    padding-bottom: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero__tag {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(79, 142, 247, 0.3);
    padding: 0.4rem 1.4rem;
    border-radius: 100px;
    margin-bottom: 1.6rem;
}

.page-hero__title {
    font-size: var(--fs-h1);
    color: var(--title);
    font-weight: var(--fw-bold);
    margin-bottom: 1.2rem;
}

.page-hero__subtitle {
    font-size: var(--fs-sm);
    color: var(--text-light);
    max-width: 600px;
    margin-inline: auto;
}

/* ============================================================
   CONTENT CARD
   ============================================================ */
.content-card {
    background: var(--card-color);
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    padding: 3.2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2.4rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.content-card:hover {
    border-color: rgba(79, 142, 247, 0.3);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.content-card__title {
    font-size: var(--fs-h3);
    color: var(--accent);
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.content-card__title i {
    font-size: 1.6rem;
}

.content-card p {
    font-size: var(--fs-sm);
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 1.2rem;
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   INFO GRID
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.4rem;
}

/* ============================================================
   ARTICLE BODY
   ============================================================ */
.article-body {
    font-size: var(--fs-sm);
    color: var(--text);
    line-height: 1.9;
}

.article-body p {
    margin-bottom: 1.6rem;
}

.article-body ul {
    list-style: none;
    margin-bottom: 1.6rem;
}

.article-body ul li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.8rem;
    font-size: var(--fs-sm);
    color: var(--text);
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.article-body strong {
    color: var(--title);
    font-weight: var(--fw-semi);
}

/* ============================================================
   FEEDLY BLOCK
   ============================================================ */
.feedly-block {
    background: var(--card-color);
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    padding: 3.2rem;
    box-shadow: var(--shadow-card);
}

.feedly-block h2 {
    font-size: var(--fs-h3);
    color: var(--title);
    margin-bottom: 0.8rem;
}

.feedly-block .feedly-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-light);
    margin-bottom: 2rem;
}

.feedly-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.feedly-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--card-hover);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 1rem 1.8rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text);
    transition: transform 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.feedly-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.feedly-btn .icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

/* ============================================================
   GALLERY SLIDER
   ============================================================ */
.gallery-slider {
    position: relative;
    margin-top: 1.6rem;
}

.gallery-slider-track-wrapper {
    overflow: hidden;
    border-radius: 1.4rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    background: var(--card-color);
}

.gallery-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slider-track .gallery-item {
    min-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
}

.gallery-slider-track .gallery-item img {
    height: 460px;
    object-fit: contain;
    background: var(--body-color);
    padding: 0;
    width: 100%;
}

.gallery-slider-track .gallery-item-label {
    font-size: var(--fs-sm);
    padding: 1.4rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
}

.gallery-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}
.gallery-slider-btn:hover { background: var(--accent); transform: translateY(-50%) scale(1.08); }
.gallery-slider-btn:disabled { opacity: 0.25; cursor: default; transform: translateY(-50%); }
.gallery-slider-prev { left: 1.2rem; }
.gallery-slider-next { right: 1.2rem; }

.gallery-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.6rem;
}
.gallery-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.gallery-slider-dot.active {
    background: var(--accent);
    transform: scale(1.35);
}

/* Counter */
.gallery-slider-counter {
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-light);
    margin-top: 0.8rem;
}

/* Grid gallery (fallback / other pages) */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 1.6rem;
}

.gallery-item {
    background: var(--card-color);
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px var(--accent-glow);
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: var(--body-color);
    padding: 1rem;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item-label {
    padding: 1rem 1.4rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--text-light);
    text-align: center;
}

/* ============================================================
   BUTTONS & LINKS
   ============================================================ */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--accent);
    color: #fff;
    padding: 1.2rem 2.8rem;
    border-radius: 0.7rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px var(--accent-glow);
    filter: brightness(1.08);
    color: #fff;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--card-color);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 1rem 2rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text);
    transition: transform 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-card);
}
.link-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.6rem;
}

/* ============================================================
   TECH TAGS
   ============================================================ */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.tech-tag {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent);
    border: 1px solid rgba(79, 142, 247, 0.25);
}

/* ============================================================
   LARAVEL IMAGE
   ============================================================ */
.page-image {
    max-width: 800px;
    margin-inline: auto;
    border-radius: 1.4rem;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.page-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 5rem 0 2.5rem;
}

.footer_inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.footer_title {
    font-size: var(--fs-h3);
    color: #f1f5f9;
    margin-bottom: 0.4rem;
}
.footer_subtitle {
    font-size: var(--fs-xs);
    color: #64748b;
}

.footer_links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.footer_link {
    font-size: var(--fs-xs);
    color: #94a3b8;
    transition: color 0.2s;
}
.footer_link:hover { color: var(--accent); }

.footer_copy {
    text-align: center;
    font-size: var(--fs-xs);
    color: #475569;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ============================================================
   MAIN CONTENT OFFSET
   ============================================================ */
.main {
    padding-top: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 767px) {
    .nav_toggle { display: block; }
    .nav_close  { display: block; }

    .nav_menu {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background: var(--card-color);
        border-top: 1px solid var(--border);
        padding: 3rem 2.5rem 4.5rem;
        border-radius: 2rem 2rem 0 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
        transition: bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: var(--z-fixed);
    }
    .nav_menu.show-menu { bottom: 0; }

    .nav_list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        text-align: center;
    }
    .nav_link {
        flex-direction: column;
        font-size: 1.1rem;
        gap: 0.4rem;
    }
    .nav_icon { font-size: 1.6rem; }
    .nav_link::after { display: none; }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }

    .feedly-links {
        flex-direction: column;
    }

    .content-card {
        padding: 2rem;
    }
}

@media screen and (max-width: 480px) {
    :root { --section-py: 5rem; }

    .gallery {
        grid-template-columns: 1fr;
    }

    .links-row {
        flex-direction: column;
    }
}
