:root {
    --accent: #2337ff;
    --accent-dark: #000d8a;
    --black: 15, 18, 25;
    --gray: 96, 115, 159;
    --gray-light: 229, 233, 240;
    --gray-dark: 34, 41, 57;
    --gray-gradient: rgba(var(--gray-light), 50%), #fff;
}

@font-face {
    font-family: 'Nunito';
    src: url('https://fonts.gstatic.com/s/nunito/v31/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Nunito';
    src: url('https://fonts.gstatic.com/s/nunito/v31/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgcw.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

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

body {
    background: #f3f4f6;
    color: rgb(var(--gray-dark));
    font-family: Nunito, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===== Header ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 18, 25, 0.05);
    padding: 0 1em;
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.site-header .brand {
    font-size: 1em;
    font-weight: 800;
    padding: 1em .5em;
    display: flex;
    align-items: center;
    gap: .5em;
}
.internal-links { display: flex; flex-wrap: wrap; }
.internal-links a {
    padding: 1em .6em;
    font-weight: 600;
    border-bottom: 4px solid transparent;
    transition: border-color .15s ease;
    font-size: .95rem;
}
.internal-links a:hover, .internal-links a.active {
    border-bottom-color: var(--accent);
}
.site-header .social-links {
    display: flex;
    gap: .25em;
    align-items: center;
}
.site-header .social-links a {
    padding: .5em;
    color: rgb(var(--gray-dark));
    display: inline-flex;
}
.site-header .social-links svg { width: 22px; height: 22px; }

/* ===== Main ===== */
main.bento {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2em 1em;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.card {
    background: #fff;
    border: .5px solid #d1d5db;
    border-radius: 1rem;
    padding: 1.25rem;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
    display: block;
}
a.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: rgb(var(--gray-dark));
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* ===== Top section ===== */
.top-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}
.profile-area { padding: 0; }
.profile-name {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: .5rem;
    color: rgb(var(--black));
    letter-spacing: -0.02em;
}
.profile-subtitle {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
}
.profile-subtitle p + p { margin-top: .6rem; }
.profile-subtitle a { color: var(--accent); font-weight: 600; }
.profile-subtitle a:hover { text-decoration: underline; }

.top-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 120px;
    position: relative;
}
.feature-card .icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}
.feature-card .ft-title {
    font-weight: 800;
    font-size: 1rem;
    color: #111;
    margin-top: .4rem;
}
.feature-card .ft-sub {
    font-size: .8rem;
    color: #6b7280;
}
.feature-card .ft-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    font-size: .9rem;
}

.icon-blog { background: #2337ff; }
.icon-news { background: #f59e0b; }
.icon-shop { background: #10b981; }
.icon-email { background: #ef4444; }
.icon-linkedin { background: #0a66c2; }
.icon-github { background: #1f2937; }
.icon-bluesky { background: #0285ff; }
.icon-twitter { background: #1da1f2; }

/* ===== Generic grid of item-cards (projects / writing / speaking) ===== */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.item-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    overflow: hidden;
    padding: 1rem;
}
.item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.item-name {
    font-weight: 700;
    font-size: .95rem;
    color: #111;
    line-height: 1.3;
    margin: 0;
}
.item-meta {
    font-size: .78rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.item-desc {
    font-size: .82rem;
    color: #4b5563;
    line-height: 1.4;
    margin-top: .3rem;
}
.item-links {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: .4rem;
}
.item-links a {
    font-size: .78rem;
    color: var(--accent);
    font-weight: 700;
}
.item-links a:hover { text-decoration: underline; }
.item-thumb {
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: .6rem;
    flex-shrink: 0;
    background: #e5e7eb;
}

/* ===== Social grid ===== */
.social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.social-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.25rem;
}
.social-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.social-icon-box svg { width: 26px; height: 26px; fill: #fff; }
.social-name {
    font-weight: 700;
    font-size: .95rem;
    color: #111;
    margin: 0;
}
.social-handle {
    font-size: .78rem;
    color: #6b7280;
}
.follow-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    border-radius: .4rem;
    padding: .3rem .9rem;
    font-size: .72rem;
    font-weight: 700;
    width: fit-content;
    margin-top: .3rem;
}

/* ===== CTA + quote ===== */
.cta-section {
    text-align: center;
    padding: 1.5rem 0;
}
.cta-text {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1.5rem;
}
.cta-link {
    color: var(--accent);
    font-weight: 700;
}
.cta-link:hover { text-decoration: underline; }
.quote-block {
    border-left: none;
    padding: 0;
    margin: 0 auto;
    max-width: 540px;
}
.quote-text {
    font-size: .95rem;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.6;
}

/* ===== Footer ===== */
footer.site-footer {
    padding: 2em 1em 4em;
    background: linear-gradient(rgba(var(--gray-light), 50%), #fff) no-repeat;
    color: rgb(var(--gray));
    text-align: center;
    font-size: .9rem;
    margin-top: 2rem;
}
footer .social-links {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
}
footer .social-links a {
    color: rgb(var(--gray));
    transition: color .15s ease;
}
footer .social-links a:hover { color: rgb(var(--gray-dark)); }
footer .social-links svg { width: 24px; height: 24px; }

/* ===== Responsive ===== */
@media (max-width: 720px) {
    main.bento { padding: 1em; gap: 2rem; }
    .top-section,
    .bento-grid,
    .top-right { grid-template-columns: 1fr; }
    .social-grid { grid-template-columns: 1fr 1fr; }
    .item-thumb { width: 90px; height: 68px; }
    .profile-name { font-size: 1.8rem; }
    .internal-links a { padding: .8em .4em; font-size: .85rem; }
    .site-header .social-links { display: none; }
}
