
/* -------------------------------------------------------------
   Trần Hữu Portal Core Style Guide (index.css)
   A premium dark theme with custom glassmorphism and ambient glows.
   ------------------------------------------------------------- */

/* Custom Variables & Tokens */
:root {
    --bg-main: #06070b;
    --bg-card: rgba(14, 16, 27, 0.45);
    --border-card: rgba(255, 255, 255, 0.05);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-emerald-primary: #10b981;
    --color-emerald-glow: rgba(16, 185, 129, 0.15);
    --color-emerald-border: rgba(16, 185, 129, 0.25);
    
    --color-indigo-primary: #6366f1;
    --color-indigo-glow: rgba(99, 102, 241, 0.15);
    --color-indigo-border: rgba(99, 102, 241, 0.25);
    
    --color-amber-primary: #f59e0b;
    --color-amber-glow: rgba(245, 158, 11, 0.15);
    --color-amber-border: rgba(245, 158, 11, 0.25);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow: hidden; /* Prevent both html and body elements from showing scrollbars on desktop */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 1. Ambient Background Orbs & Gradients */
.orb-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
    mix-blend-mode: screen;
    animation: pulse 12s infinite alternate ease-in-out;
}

.orb-left {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
}

.orb-right {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
    animation-delay: -6s;
}

@keyframes pulse {
    0% {
        transform: scale(1) translate(0px, 0px);
    }
    100% {
        transform: scale(1.15) translate(40px, -40px);
    }
}

/* 2. Technical Grid Overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    pointer-events: none;
}

/* 3. Portal Layout Container */
.portal-container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    width: 90%;
    margin: auto; /* Vertically and horizontally centers content safely without cutting off the top */
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px; /* Reduced gap to save height */
}

/* Header Styles */
.portal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Reduced gap to save height */
    max-width: 650px;
}

.family-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    text-transform: uppercase;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

.portal-title {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.5;
}

/* 4. Grid & Glassmorphic Cards */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Changed to 3 columns */
    gap: 30px;
    width: 100%;
}

.portal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 30px; /* Reduced padding from 45px to 30px to fit screen nicely */
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

/* Card Glow Elements */
.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.04), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    transition: var(--transition-smooth);
    opacity: 0;
}

/* Specific glows for cards */
.card-binhminh:hover {
    border-color: var(--color-emerald-border);
    transform: translateY(-6px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px var(--color-emerald-glow),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.card-nhathuy:hover {
    border-color: var(--color-indigo-border);
    transform: translateY(-6px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px var(--color-indigo-glow),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.card-quocdong:hover {
    border-color: var(--color-amber-border);
    transform: translateY(-6px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px var(--color-amber-glow),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.card-content {
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced inner gap from 25px to 20px to fit screen nicely */
    height: 100%;
}

/* Avatar Styles */
.avatar-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
}

.ring-emerald {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.ring-indigo {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.ring-amber {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

/* Rotate ring on card hover */
.portal-card:hover .avatar-ring {
    transform: rotate(180deg) scale(1.05);
}

.card-binhminh:hover .avatar-ring {
    border-color: var(--color-emerald-primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.card-nhathuy:hover .avatar-ring {
    border-color: var(--color-indigo-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.card-quocdong:hover .avatar-ring {
    border-color: var(--color-amber-primary);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.avatar-fallback {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    z-index: 5;
}

.member-name {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.member-role {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.card-binhminh .member-role i {
    color: var(--color-emerald-primary);
}

.card-nhathuy .member-role i {
    color: var(--color-indigo-primary);
}

.card-quocdong .member-role i {
    color: var(--color-amber-primary);
}

.member-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Links & Buttons */
.links-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-primary {
    color: #ffffff;
}

.btn-emerald {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
    background: var(--color-emerald-primary);
    border-color: var(--color-emerald-primary);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-indigo {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.btn-indigo:hover {
    background: var(--color-indigo-primary);
    border-color: var(--color-indigo-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-amber {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-amber:hover {
    background: var(--color-amber-primary);
    border-color: var(--color-amber-primary);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.placeholder-socials {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    padding: 14px 24px;
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 5. Footer Badging */
.portal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.domain-badges {
    display: flex;
    gap: 15px;
}

.badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge i {
    font-size: 0.85rem;
}

/* 6. Media Queries & Responsiveness */
@media (max-width: 900px) {
    html, body {
        overflow-y: auto; /* Enable scroll on tablets / smaller screens */
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 550px;
    }
    
    .portal-card {
        padding: 35px;
    }
    
    .portal-title {
        font-size: 2.3rem;
    }
}

@media (max-width: 600px) {
    html, body {
        overflow-y: auto; /* Enable scroll on mobile */
    }
    
    .portal-container {
        padding: 40px 0;
        gap: 40px;
    }
    
    .portal-title {
        font-size: 1.9rem;
    }
    
    .portal-tagline {
        font-size: 0.95rem;
    }
    
    .portal-card {
        padding: 30px 25px;
    }
    
    .portal-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Fallback scrolling if the viewport height is very short */
@media (max-height: 720px) {
    html, body {
        overflow-y: auto;
    }
}
