/* --- VARIABLES --- */
:root {
    --bg-color: #101818;   /* Page background (light aqua) */
    --card-bg: #094f4f;    /* Card background (petrol) */
    --text-white: #ffffff; /* Main card text */
    --text-muted: rgb(222, 235, 235); /* Secondary card text */
    --accent: #09868f;     /* Accent color */
    --radius: 28px;        /* Global roundness */
    --text-bio: #bdd6d7;
    --text-body: #f0feff;
}

/* --- BASE STYLES --- */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 60px 20px;
    color: var(--text-body);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- PROFILE HEADER --- */
.profile-header {
    text-align: center;
    margin-bottom: 60px;
}

.profile-pic {
    width: 280px; /* Extra large profile picture */
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    border: none; /* No border as requested */
    box-shadow: 0 10px 40px rgba(0, 79, 79, 0.1);
}

.bio {
    font-size: 1.1rem;
    color: var(--text-bio);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.cta {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 20px;
    color: var(--accent);
}

/* --- BENTO GRID LAYOUT --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 24px;
}

/* Grid Cell Sizes */
.small { grid-column: span 1; grid-row: span 1; }
.wide  { grid-column: span 2; grid-row: span 1; }
.tall  { grid-column: span 1; grid-row: span 2; }
.large { grid-column: span 2; grid-row: span 2; }

/* --- CARD CORE STYLES --- */
.card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    color: var(--text-white);
    text-decoration: none;
    display: flex; /* Required for layout logic */
    border: 1px solid transparent; /* Prepare the border without showing it */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, filter 0.3s ease;
}

.card:hover { /* Kind of Neon Glow Effect on Hover */
    transform: scale(1.03);

    /* 1. LIGHT */
    filter: brightness(1.15); 
    
    /* 2. STROKE: makes visible the border with the aqua color */
    border-color: rgba(0, 187, 201, 0.5); 

    /* 3. GLOW:neon effect */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), /* Shadowa */
                0 0 6px var(--accent); /* Glow */
}

/* Layer for Background Images */
.card-image-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* --- OVERLAY & POSITIONING --- */
.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 25px;
    box-sizing: border-box;
    z-index: 2;
}

/* 1. SOLID COLOR CARDS: Center everything */
.card:has(.card-image-bg[style*="background-color"]) .overlay {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 2. IMAGE/GRID CARDS: Text at the bottom */
.card:has(.card-image-bg:not([style*="background-color"])) .overlay,
.card:has(.ig-grid-container) .overlay {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
}

/* 3. GRADIENT LOGIC: Apply only if image card HAS text */
/* Targets cards with images that have a title containing text or a description */
.card:has(.card-image-bg:not([style*="background-color"])):has(h3:not(:empty)) .overlay,
.card:has(.card-image-bg:not([style*="background-color"])):has(p) .overlay,
.card:has(.ig-grid-container):has(h3:not(:empty)) .overlay {
    background: linear-gradient(to top, rgba(0, 15, 15, 0.70) 0%, transparent 70%);
}

/* Text elements styling */
.card h3 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.4;
}

/* --- ICONS --- */

/* Minimalist corner icon: small, clean, white */
.card-corner-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    color: var(--text-white);
    font-size: 1rem;
    opacity: 0.7;
    pointer-events: none;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55); /* Subtle dark shadow */
}

/* Large centered icon for solid color cards */
.card-icon {
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: 12px;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}

/* --- INSTAGRAM MANUAL GRID --- */
.ig-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

/* --- UTILS & COMPONENTS --- */
/* Iframe container standard */
.iframe-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Force the iframe to behave properly */
.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    transform: scale(1.1); 
    transform-origin: center;
}

/* FIX  */
.card[class*="wide"] iframe, .card[class*="tall"] iframe {
    transform: scale(0.9);
    transform-origin: center;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* External Link handling */
.card-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .bento-grid { 
        grid-template-columns: 1fr; 
        grid-auto-rows: auto;
    }
    .small, .wide, .tall, .large { 
        grid-column: span 1; 
        grid-row: auto; 
        min-height: 250px; 
    }
    .profile-pic { width: 220px; height: 220px; }
}

/* TRANSPARENT CARD OPTION */
.card.transparent {
    background: transparent !important;
    box-shadow: none !important;
    color: #031f1f !important; /* Forces dark text to be readable on light background */
}

/* Ensure secondary text is also visible on transparent cards */
.card.transparent p {
    color: #094f4f !important;
    opacity: 0.7;
}

/* Ensure icons on transparent cards are dark */
.card.transparent .card-icon, 
.card.transparent .card-corner-icon {
    color: #031f1f !important;
}