/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --card-radius: 24px;
    --card-radius-sm: 16px;
    --gap: 40px;
    --card-size: 175px;
    --sidebar-width: 300px;
    --color-dark: #1a1a1a;
    --color-amber-text: #92400E;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Page Background - Clean minimal style matching reference */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-color);
}

/* Gradient blobs removed to match bento.me reference */
.gradient-blob {
    display: none;
}

/* Main Container - Two Column Layout */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    gap: 40px;
    min-height: 100vh;
}

/* Sidebar - Sticky Left Column */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 32px;
    height: fit-content;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Profile Section */
.profile-section {
    text-align: left;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    /* Yellow border ring matching reference */
    border: 4px solid #FACC15;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* Info Sections */
.info-section {
    margin-top: 4px;
}

.arrow {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.traits-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.traits-list li {
    font-size: 13px;
    color: var(--text-primary);
}

/* Contact Section */
.contact-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-item {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Main Content - Right Column */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Section Styling */
.section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: -10px;
}

/* Card Base Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    /* Subtle shadow matching reference */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 400px; /* Default max-width for cards */
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Bento Grids */
.bento-grid {
    display: grid;
    gap: var(--gap);
    justify-items: center;
    grid-auto-flow: dense; /* Pack cards efficiently to avoid whitespace */
}

/* Grid Layout Utilities */
.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: var(--card-size);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: var(--card-size);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Background Utilities - Solids */
.bg-dark { background: var(--color-dark); }
.bg-gray { background: #F5F5F5; }
.bg-amber { background: #FEF3C7; }
.bg-green { background: #34D399; }

/* Background Utilities - Gradients */
.bg-gradient-indigo { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.bg-gradient-green { background: linear-gradient(135deg, #10B981, #059669); }
.bg-gradient-amber { background: linear-gradient(135deg, #FCD34D, #F59E0B); }
.bg-gradient-red { background: linear-gradient(135deg, #EF4444, #DC2626); }
.bg-gradient-blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.bg-gradient-violet { background: linear-gradient(135deg, #6366F1, #8B5CF6); }

/* Background Utilities - Branded */
.bg-gradient-instagram { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.bg-twitter { background: #000000; }
.bg-linkedin { background: #0077B5; }

/* Text Utilities */
.text-white { color: white; }
.text-white .social-icon,
.text-white .social-handle { color: white; }

/* ==================== */
/* LIVE WORK GRID */
/* ==================== */
/* Staggered Bento layout:
   Row 1: CC Rewards (tall, rows 1-2) | API Playground (short, row 1)
   Row 2: CC Rewards continues      | Personal Finance (tall, rows 2-3)
   Row 3: Boring T&C (short, row 3) | Personal Finance continues
*/
.live-work-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: var(--card-size);
}

/* Card tall - spans 2 rows */
.card-tall {
    grid-row: span 2 !important;
}

/* Card wide - spans 2 columns */
.card-wide {
    grid-column: span 2 !important;
}

/* Card large - spans 2 columns and 2 rows */
.card-large {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
}

/* Max-width constraints to maintain original card widths */
.grid-cols-4 .card {
    max-width: 175px; /* Single column in 4-col grid */
}

.grid-cols-4 .card-wide,
.grid-cols-4 .card-large {
    max-width: 390px; /* 2 columns + gap (175*2 + 40) */
}

.grid-cols-3 .card {
    max-width: 245px; /* Single column in 3-col grid */
}

.grid-cols-3 .card-wide,
.grid-cols-3 .card-large {
    max-width: 530px; /* 2 columns + gap (245*2 + 40) */
}

.grid-cols-2 .card {
    max-width: 380px; /* Single column in 2-col grid */
}

/* ==================== */
/* FUN PROJECTS GRID */
/* ==================== */
.fun-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: var(--card-size);
}

.fun-card {
    aspect-ratio: auto;
    min-height: var(--card-size);
}

/* ==================== */
/* WORKED AT GRID */
/* ==================== */
.company-card {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== */
/* LIFE LEARNER GRID */
/* ==================== */
.life-card .card-image {
    object-position: center;
}

.drive-card .card-image {
    object-position: center top;
}

/* ==================== */
/* PROUD OF GRID */
/* ==================== */
.proud-card .card-image {
    object-fit: cover;
}

/* ==================== */
/* PHOTOS GRID */
/* ==================== */
.photo-card {
    aspect-ratio: 3/4;
}

.photo-card .card-image {
    object-fit: cover;
}

/* Hand Clicked Grid - override aspect-ratio for proper layout */
.grid-cols-3 .photo-card {
    aspect-ratio: unset;
}

.grid-cols-4 .photo-card {
    aspect-ratio: unset;
}

/* ==================== */
/* GRAPHIC GRID */
/* ==================== */
.graphic-card {
    aspect-ratio: 1;
}

/* ==================== */
/* RECOMMENDATIONS GRID */
/* ==================== */
.reco-card {
    background: white;
    padding: 0;
}

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

/* ==================== */
/* READING GRID */
/* ==================== */
.book-card {
    background: white;
    aspect-ratio: 3/4;
    padding: 0;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Book Grid - override aspect-ratio for proper layout */
.grid-cols-3 .book-card,
.card-large.book-card {
    aspect-ratio: unset;
}

/* ==================== */
/* SOCIAL GRID */
/* ==================== */
.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    aspect-ratio: 1;
    gap: 10px;
}

.map-card {
    aspect-ratio: auto;
    min-height: 120px;
}

.map-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-icon {
    width: 28px;
    height: 28px;
}

.social-handle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==================== */
/* SPOTIFY GRID */
/* ==================== */
.spotify-card {
    background: transparent;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: none;
    padding: 0;
}

.spotify-card:hover {
    transform: none;
    box-shadow: none;
}

.spotify-card iframe {
    border-radius: var(--card-radius-sm);
}

/* ==================== */
/* LINKS GRID */
/* ==================== */
.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    min-height: 70px;
}

.link-text {
    font-size: 14px;
    font-weight: 500;
}

.link-arrow {
    font-size: 18px;
    opacity: 0.6;
}

.email-card {
    color: white;
    padding: 0;
}

.link-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thank-you-card {
    padding: 24px;
    display: flex;
    align-items: center;
}

.thank-you-text {
    font-size: 14px;
    color: var(--color-amber-text);
    font-weight: 500;
    line-height: 1.5;
}

/* ==================== */
/* CARD CONTENT */
/* ==================== */
.card-video,
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-video,
.card:hover .card-image {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-label {
    /* White rounded pill style matching reference */
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    text-shadow: none;
    width: fit-content;
}

/* Badge Styling */
.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* ==================== */
/* LINK ICON (Top-Right Arrow) */
/* ==================== */
.link-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(4px, -4px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.link-icon svg {
    width: 14px;
    height: 14px;
    color: var(--color-dark);
    stroke: var(--color-dark);
}

.card:hover .link-icon {
    opacity: 1;
    transform: translate(0, 0);
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */
@media (max-width: 1100px) {
    .container {
        flex-direction: column;
        padding: 24px;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        max-height: none;
    }

    .profile-section {
        text-align: center;
    }

    .profile-image {
        margin: 0 auto 16px;
    }

    .content {
        align-items: center; /* Center sections horizontally */
    }

    .section {
        width: 100%;
        max-width: fit-content; /* Constrain to content width */
        margin: 0 auto; /* Center the section */
    }

    .live-work-grid {
        grid-template-columns: repeat(auto-fit, minmax(175px, 245px));
        grid-auto-rows: auto;
        justify-content: center;
    }

    .personal-finance-card,
    .cc-rewards-card {
        grid-row: span 1;
    }

    .fun-grid {
        grid-template-columns: repeat(auto-fit, minmax(175px, 245px));
        grid-auto-rows: auto;
        justify-content: center;
    }

    .fun-grid .card-tall {
        grid-row: span 1;
    }

    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(auto-fit, minmax(175px, 245px));
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
        gap: 32px;
    }

    .content {
        gap: 32px;
        align-items: center; /* Center sections horizontally */
    }

    .section {
        width: 100%;
        max-width: fit-content; /* Constrain to content width */
        margin: 0 auto; /* Center the section */
    }

    .bento-grid {
        gap: 20px; /* Reduce gap on mobile for better packing */
    }

    /* All grids become 2-column on mobile to allow tall cards to sit side-by-side */
    .live-work-grid,
    .fun-grid,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        justify-content: center; /* Center grid content */
    }

    /* By default, all cards span full width (2 columns) */
    .card {
        grid-column: span 2;
        max-width: 100%;
    }

    /* Tall cards can sit side-by-side (1 column each) */
    .card-tall {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        max-width: 175px !important;
        width: 175px !important;
        aspect-ratio: 1 / 2 !important; /* Maintain 2:1 height-to-width ratio */
        min-height: 350px !important; /* Ensure minimum height */
    }

    /* Wide and large cards explicitly span full width (2 columns) */
    .card-wide,
    .card-large {
        grid-column: span 2 !important;
        grid-row: span 1 !important;
        max-width: 100% !important;
    }

    .name {
        font-size: 24px;
    }

    .card {
        border-radius: var(--card-radius-sm);
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.5s ease forwards;
}

.section:nth-child(1) {
    animation-delay: 0.05s;
}

.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.15s;
}

.section:nth-child(4) {
    animation-delay: 0.2s;
}

.section:nth-child(5) {
    animation-delay: 0.25s;
}

.section:nth-child(6) {
    animation-delay: 0.3s;
}

.section:nth-child(7) {
    animation-delay: 0.35s;
}

.section:nth-child(8) {
    animation-delay: 0.4s;
}

.section:nth-child(9) {
    animation-delay: 0.45s;
}

.section:nth-child(10) {
    animation-delay: 0.5s;
}

.section:nth-child(11) {
    animation-delay: 0.55s;
}

.section:nth-child(12) {
    animation-delay: 0.6s;
}

.section:nth-child(13) {
    animation-delay: 0.65s;
}