/*font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;*/

/* main container – card feel */
.portfolio {
    max-width: 1175px;
    margin: 0 auto;
    background: var(--footer-bg);
    border-radius: 10px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 15px;
}

.portfolio-section {
    padding: 10px;
}

/* header / about row */
.intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 1px;
}

.avatar-chip {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #f1f5f9;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
    border-radius: 60px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
}

.avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, #2563eb, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 500;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.avatar-chip h1 {
    font-size: 2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    background: linear-gradient(130deg, #1e293b, #2d3c53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bio {
    flex: 1;
    max-width: 600px;
}

.bio p {
    font-size: 1.2rem;
    color: #334155;
    border-left: 5px solid #2563eb;
    padding-left: 1.5rem;
    font-weight: 400;
}

.stats {
    display: flex;
    gap: 2rem;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--nav-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--bg-hover-color);
}

.stat-item i {
    color: #2563eb;
    font-size: 1.2rem;
}

/* loading state */
.loading-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem;
    background: #f8fafc;
    border-radius: 2rem;
    color: #475569;
}

.loading-state i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.error-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem;
    background: #fef2f2;
    border-radius: 2rem;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* filter bar + search (js used) */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1rem;
    gap: 1.2rem;
}

.filter-group {
    display: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--bg-hover-color);
    padding: 0.65rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-btn i {
    font-size: 0.9rem;
    color: #64748b;
}

.filter-btn.active {
    background: var(--bg-hover-color);
    border-color: var(--bg-hover-color);
    color: white;
}

.filter-btn.active i {
    color: white;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d9e2ef;
    border-radius: 50px;
    padding: 0.3rem 0.3rem 0.3rem 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin: 0 auto;
}

.search-box i {
    color: #94a3b8;
}

.search-box input {
    border: none;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    min-width: 230px;
    outline: none;
    background: transparent;
}

.search-box button {
    background: #2563eb;
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s;
    border: 1px solid #2563eb;
}

.search-box button:hover {
    background: #1d4ed8;
}

.search-box button:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
}

/* article grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem 1.8rem;
    margin: 2rem 0 3rem;
}

.article-card {
    background: color-mix(in srgb, var(--secondary-color) 15%, transparent);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--bg-hover-color);
    padding: 1.8rem 1.5rem 1.8rem 1.5rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    cursor: default;
    backdrop-filter: blur(2px);
}

.article-card:hover {
    transform: translateY(-6px);
    border-color: #b9d3f0;
    box-shadow: 0 20px 28px -8px rgba(37, 99, 235, 0.15);
}

.card-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #2563eb;
    background: #e6f0ff;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    align-self: flex-start;
    margin-bottom: 1rem;
    border: 1px solid #cddfff;
}

.article-card h3 {
    font-size: 1.5rem;
    font-weight: 650;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.article-card .meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    align-items: center;
}

.meta i {
    font-size: 0.8rem;
    color: #2563eb;
}

.excerpt {
    color: #3a4a62;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #dae5f0;
    padding-top: 1.2rem;
    margin-top: 0.4rem;
}

.read-link {
    text-decoration: none;
    font-weight: 600;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: 0.2s;
}

.read-link:hover {
    gap: 0.7rem;
    color: #0f2b5e;
}

.save-icon {
    color: #95aac9;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.15s;
}

.save-icon:hover {
    color: #2563eb;
}

.save-icon.saved {
    color: #2563eb;
    font-weight: 900;
}

/* saved articles panel (js interactive) */
.saved-panel {
    background: #f0f6fe;
    border-radius: 10px;
    padding: 10px 10px;
    margin-top: 2.5rem;
    border: 1px solid #c7dfff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.saved-panel h2 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.saved-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.saved-tag {
    background: white;
    padding: 0.4rem 1.2rem 0.4rem 1.5rem;
    border-radius: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid #acc9eb;
    font-weight: 500;
    font-size: 0.95rem;
}

.saved-tag i {
    color: #2563eb;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.1s;
}

.saved-tag i:hover {
    color: #b91c1c;
}

.clear-saved {
    background: none;
    border: 1px solid #9bb5d9;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    color: #274e7c;
    cursor: pointer;
    transition: 0.15s;
}

.clear-saved:hover {
    background: #ffffffb3;
    border-color: #2563eb;
}

.footer-note {
    text-align: center;
    margin-top: 2rem;
    color: #6e7d98;
    font-size: 0.9rem;
}

hr {
    border: none;
    border-top: 2px dotted #cfdef5;
    margin: 1.8rem 0 0.5rem;
}

/*====== ARTICLES =======*/
.article-container {
    max-width: 1300px;
    margin: 0 auto;
    background: white;
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
}

.back {
    display: inline-block;
    margin-bottom: 2rem;
}

.back a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back a:hover {
    gap: 0.8rem;
}

.article-feature h4 {
    color: #2563eb;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.article-feature h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f1829;
    margin-bottom: 1rem;
}

.article-feature h5 {
    color: #475569;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.captionn {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.caption-name,
.caption-date {
    display: inline-block;
}

.caption-name:after {
    content: "•";
    margin: 0 0.5rem;
    color: #94a3b8;
}

.article-line,
.article-line2 {
    border: none;
    border-top: 2px dotted #cfdef5;
    margin: 1.5rem 0;
}

/* Accordion styling */
.accordion-item {
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem !important;
}

.accordion-button {
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: #e6f0ff;
    color: #2563eb;
}

.accordion-body {
    background-color: white;
    color: #334155;
}

/* Article content */
.artic {
    color: #334155;
    line-height: 1.8;
}

.artic p {
    margin-bottom: 1.5rem;
}

.cap {
    font-size: 3rem;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    color: #2563eb;
    font-weight: 700;
}

.img1,
.img2 {
    max-width: 100%;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

/* Related articles */
.related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dotted #cfdef5;
}

.related h4 {
    color: #0f1829;
    margin-bottom: 1.5rem;
}

.related-article {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.related-article:hover {
    transform: translateX(5px);
    background: #f1f5f9;
}

.related-article a {
    text-decoration: none;
    color: inherit;
}

.related-article h5 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.loading-state {
    text-align: center;
    padding: 4rem;
    color: #64748b;
}

.error-state {
    text-align: center;
    padding: 4rem;
    color: #991b1b;
    background: #fef2f2;
    border-radius: 1rem;
}

/*======== RESPONSIVE =======*/
@media (max-width: 480px) {

    .portfolio-section {
        width: 100%;
        padding: 10px 12px 10px;
    }

    .stats {
        display: flex;
        gap: 1rem;
        margin: 0 auto;
    }

    .stat-item {
        gap: 0.6rem;
        padding: 0.3rem 1rem;
        border-radius: 40px;
    }

    .stat-item i {
        color: #2563eb;
        font-size: 1rem;
    }

    .filter-group {
        /* display: flex; */
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 1px 5px;
        border-radius: 40px;
        font-weight: 500;
        font-size: 0.95rem;
        color: #334155;
        gap: 0.2rem;
    }

    .search-box {
        display: flex;
        align-items: center;
        background: white;
        border-radius: 50px;
        padding: 1px 10px;
    }

    .search-box button {
        background: #2563eb;
        color: white;
        padding: 5px;
        font-weight: 500;
        border: 1px solid #2563eb;
    }

    .toolbar {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        margin: 1rem 0 1rem;
        gap: 1.2rem;
    }

    /* header / about row */
    .intro {
        gap: 2.5rem;
        margin-bottom: 2rem;
    }

    .saved-panel {
    justify-content: center;
}

    .saved-panel h2 {
        font-size: 1rem;
        gap: 0.8rem;
        margin: 0 auto;
    }

    .clear-saved {
        margin: 0 auto;
        
    }

    .related h4 {
        font-size: 10px;
    }

}