@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,500;1,400&display=swap');

:root {
    --bg: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border: #ececec;
    --accent: #111111;
    --card-bg: #fafafa;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* ── 2. NEW TOP BANNER ── */
.top-banner {
    width: 100%;
    height: 240px;
    background-image: url('https://iili.io/CnUfKzB.md.png'); /* Clean tech/minimal aesthetic image placeholder */
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 20px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 100%);
}

/* ── HEADER & BRANDING ── */
.profile-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 40px 24px;
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.site-logo {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
}

#layout-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
}

#layout-toggle:hover {
    background: #f5f5f5;
    border-color: var(--text-main);
}

#layout-toggle i {
    width: 18px;
    height: 18px;
}

/* ── BIO SECTION ── */
.bio-section {
    max-width: 680px;
}

.bio-title {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.bio-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.bio-links {
    display: flex;
    gap: 24px;
}

.icon-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.icon-link svg, .icon-link i {
    width: 18px !important;
    height: 18px !important;
    color: var(--text-muted);
}

.icon-link:hover {
    color: var(--text-muted);
}

/* ── MAIN CONTENT CONTAINER ── */
.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ── 1. THE COMPLETE LAYOUT TOGGLE FIX ── */

/* GRID MODE ACTIVE */
.cards-grid.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.cards-grid.grid-mode .card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.cards-grid.grid-mode .card-image-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--card-bg);
    margin-bottom: 20px;
}

/* LIST MODE ACTIVE */
.cards-grid.list-mode {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.cards-grid.list-mode .card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.cards-grid.list-mode .card-image-wrapper {
    width: 180px;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
}

/* BASE CARD ELEMENTS */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover img {
    transform: scale(1.02);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.read-more-btn svg {
    width: 14px;
    height: 14px;
    transition: var(--transition);
}

.card:hover .read-more-btn svg {
    transform: translateX(4px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .cards-grid.list-mode .card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cards-grid.list-mode .card-image-wrapper {
        width: 100%;
        height: 200px;
    }
}
