/* Mobile-first, minimal, soft-looking link page with banner and icon grid */

/* Root variables (smaller overall sizing) */
:root{
    --card-radius: 14px;
    --soft-border: rgba(255,255,255,0.08);
    --accent: #ffffff;
    --muted: rgba(255,255,255,0.72);
    --gap: 12px;
    --max-width: 360px;    /* narrower card */
    --padding: 14px;       /* reduced padding */
    --transition: 200ms ease;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Page and card layout */
body{
    margin:0;
    color:var(--accent);
    background: #000; /* black background */
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

.page{
    width:100%;
    max-width:var(--max-width);
}

.card{
    border-radius:var(--card-radius);
    padding:var(--padding);
    background: rgba(112, 0, 0, 0.342);
    border: 1px solid var(--soft-border);
    box-shadow: 0 6px 14px rgba(255,255,255,0.02);
}

/* Banner header */
.profile{
    position:relative;
    overflow:hidden;
}

.banner {
    width: 100%;
    height: auto;      /* ensures natural proportions */
    object-fit: contain;  /* prevents cropping */
    display: block;
    max-height: 160px; /* increase to make it feel more important */
    margin-bottom: 12px; /* spacing from icons */
    filter: brightness(1.1);
}

/* Icon grid: 2 columns */
.icon-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
}

/* Individual icon item */
.icon-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    text-decoration:none;
    color:var(--accent);
    position:relative;
    transition: transform var(--transition);
    padding-bottom:6px;
    gap:8px;
}

.icon-item:active{
    transform: scale(0.985);
}

/* Icon box: square container for image (smaller visual size) */
.icon-box{
    width:70%;
    aspect-ratio:1 / 1;
    border-radius:10px;
    border:1px solid var(--soft-border);
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    background: rgba(112, 0, 0, 0.541);
    margin-bottom:6px;
}

/* Icon images: force icon to appear white (for bitmap PNGs).
   If your icons are already white, the filter is harmless.
   If an icon has transparency, object-fit keeps it centered. */
.icon-img{
    width:65%;
    height:65%;
    object-fit:contain;
    padding:8px;
    display:block;
    /* Make PNG/bitmap icons visually white:
       invert -> brighten -> increase contrast for crisper white */
    filter: invert(1.1) brightness(1) contrast(1.5);
}

.icon_img{
    width:65%;
    height:65%;
    object-fit:contain;
    padding:8px;
    display:block;
    /* Make PNG/bitmap icons visually white:
       invert -> brighten -> increase contrast for crisper white */
}

/* Icon label (smaller) */
.icon-label{
    font-weight:500;
    font-size:13px;
    color:var(--accent);
    z-index:1;
}

/* Icon description: hidden by default, shown on hover/tap */
.icon-desc{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:12px;
    line-height:1.25;

    max-height:0;
    opacity:0;
    transform:translateY(-6px);
    overflow:hidden;
    transition: max-height var(--transition), opacity var(--transition), transform var(--transition);
}

/* Show description on hover (desktop) */
.icon-item:hover .icon-desc,
.icon-item:focus-within .icon-desc{
    max-height:60px;
    opacity:1;
    transform:none;
}

/* Show description when .revealed class is set (mobile) */
.icon-item.revealed .icon-desc{
    max-height:60px;
    opacity:1;
    transform:none;
}

/* Footer hint */
.hint{
    margin-top:14px;
    font-size:12px;
    color:var(--muted);
    text-align:center;
}

/* Desktop adjustments (slightly larger but still compact) */
@media (min-width:640px){
    :root{
        --max-width:520px;
        --padding:18px;
    }
    .page{ max-width:var(--max-width); }
    .banner{ height:220px; }
    .icon-grid{ gap:14px; }
    .icon-img{ width:72%; height:72%; padding:10px; }
}