/* ═══════════════════════════════════════════════════════════════════════════
   shared.css — justwhitee · Matteo Fontolan
   Common variables, base styles, and reusable components
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
    --bg-color:      #0b1414;
    --card-bg:       #094f4f;
    --text-white:    #ffffff;
    --text-muted:    rgba(255,255,255,0.55);
    --text-bio:      #bdd6d7;
    --text-body:     #f0feff;
    --accent:        #09868f;
    --accent-bright: #00bbc9;
    --radius:        28px;
    --radius-sm:     18px;
    --grid-dot:      rgba(9,134,143,0.04);
}

/* ── RESET & BASE ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-body);
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image:
        linear-gradient(var(--grid-dot) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-dot) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none; z-index: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative; z-index: 1;
}
a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
.syne { font-family: 'Syne', sans-serif; }
.section-label {
    display: inline-block;
    font-size: 0.7rem; letter-spacing: 0.25em;
    color: var(--accent-bright); text-transform: uppercase;
    opacity: 0.75; margin-bottom: 10px;
}

/* ── PROFILE HEADER ─────────────────────────────────────────────────────── */
.profile-header { text-align: center; margin-bottom: 60px; }
.profile-pic {
    width: 200px; height: 200px;
    border-radius: 50%; object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.header-label {
    display: block;
    font-size: 0.75rem; letter-spacing: 0.25em;
    color: var(--accent-bright); text-transform: uppercase;
    margin-bottom: 10px; opacity: 0.75;
}
.profile-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800; color: #fff;
    line-height: 1.1; margin-bottom: 14px;
}
.profile-header h1 span { color: var(--accent-bright); }
.bio {
    font-size: 0.9rem; color: var(--text-bio);
    max-width: 640px; margin: 0 auto;
    line-height: 1.7; opacity: 0.85;
}
.cta {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    margin-top: 18px; color: var(--accent-bright);
}

/* ── CARD BASE ───────────────────────────────────────────────────────────── */
.card-base {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid rgba(9,134,143,0.2);
    overflow: hidden; color: #fff; text-decoration: none;
    transition:
        transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275),
        box-shadow 0.35s ease, border-color 0.35s ease, filter 0.35s ease;
}
.card-base:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(0,187,201,0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 18px rgba(9,134,143,0.18);
    filter: brightness(1.07);
}
.card-base::after {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius);
    background: linear-gradient(115deg,
        transparent 0%, rgba(255,255,255,0.04) 40%,
        rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 60%, transparent 100%);
    opacity: 0; transform: translateX(-100%);
    pointer-events: none; z-index: 20;
}
.card-base:hover::after { animation: shimmer 0.65s ease forwards; }

/* ── CORNER ICON ─────────────────────────────────────────────────────────── */
.card-corner-icon {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    color: rgba(255,255,255,0.45); font-size: 1rem;
    pointer-events: none; transition: color 0.3s ease;
}
.card-base:hover .card-corner-icon { color: rgba(255,255,255,0.9); }

/* ── CARD SLUG ───────────────────────────────────────────────────────────── */
.card-slug {
    position: absolute; bottom: 13px; right: 16px;
    font-size: 0.57rem; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.22);
    font-family: 'JetBrains Mono', monospace;
    z-index: 5; pointer-events: none; transition: color 0.3s ease;
}
.card-base:hover .card-slug { color: rgba(255,255,255,0.55); }

/* ── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
@keyframes shimmer {
    0%   { opacity: 0; transform: translateX(-100%); }
    20%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%); }
}

/* ── SITE FOOTER ─────────────────────────────────────────────────────────── */
.site-footer {
    margin-top: 64px; padding: 40px 0 32px;
    border-top: 1px solid rgba(9,134,143,0.18);
    text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer-logo {
    width: 72px; height: 72px; object-fit: contain;
    opacity: 0.75;
    filter: drop-shadow(0 2px 8px rgba(0,187,201,0.15));
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.footer-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 2px 16px rgba(0,187,201,0.35));
}
.footer-name {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    color: rgba(255,255,255,0.65); letter-spacing: 0.02em;
}
.footer-copy {
    font-size: 0.65rem; color: rgba(255,255,255,0.22);
    line-height: 1.7; max-width: 520px;
}
.footer-copy a { color: rgba(0,187,201,0.55); transition: color 0.2s ease; }
.footer-copy a:hover { color: var(--accent-bright); }
.footer-links {
    display: flex; align-items: center;
    justify-content: center; gap: 12px; flex-wrap: wrap;
}
.footer-links a {
    font-size: 0.67rem; color: rgba(0,187,201,0.5);
    transition: color 0.2s ease;
    display: flex; align-items: center; gap: 5px;
}
.footer-links a:hover { color: var(--accent-bright); }
.footer-sep { font-size: 0.55rem; color: rgba(255,255,255,0.12); }
.footer-back {
    font-size: 0.65rem; color: rgba(0,187,201,0.5);
    display: inline-flex; align-items: center; gap: 6px;
    transition: color 0.2s ease;
}
.footer-back:hover { color: var(--accent-bright); }

/* ── NAV BAR ─────────────────────────────────────────────────────────────── */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; height: 58px;
    background: rgba(11,20,20,0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(9,134,143,0.12);
    transition: background 0.3s ease;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem; font-weight: 800;
    color: #fff; letter-spacing: 0.02em; text-decoration: none;
}
.nav-logo img { width: 30px; height: 30px; object-fit: contain; }
.nav-logo span { color: var(--accent-bright); }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a {
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.5); text-decoration: none;
    transition: color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent-bright); }

/* ── ICON WRAP ───────────────────────────────────────────────────────────── */
.icon-wrap {
    flex-shrink: 0; border-radius: 16px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}
.card-base:hover .icon-wrap,
.action-card:hover .icon-wrap {
    transform: scale(1.1);
    background: rgba(255,255,255,0.22);
}

/* ── BTN PILL ────────────────────────────────────────────────────────────── */
.btn-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer; border: none; text-decoration: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}
.btn-pill:hover { filter: brightness(1.15); transform: scale(1.04); }
.btn-primary { background: var(--accent-bright); color: #0b1414; }
.btn-ghost   { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.22); }

/* ── SCROLL REVEAL ───────────────────────────────────────────────────────── */
.reveal {
    opacity: 0; transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE OVERRIDES (shared)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .site-nav   { padding: 0 18px; height: 52px; }
    .nav-logo   { font-size: 0.82rem; gap: 8px; }
    .nav-logo img { width: 26px; height: 26px; }
    .nav-links  { gap: 14px; }
    .nav-links a { font-size: 0.62rem; letter-spacing: 0.07em; }
}

@media (max-width: 480px) {
    .site-nav   { padding: 0 14px; height: 48px; }
    .nav-logo   { font-size: 0.75rem; }
    .nav-links  { gap: 8px; }
    .nav-links a { font-size: 0.57rem; letter-spacing: 0.03em; }
    /* Footer: stack links vertically on tiny screens */
    .footer-links { flex-direction: column; gap: 8px; }
    .footer-sep   { display: none; }
    .footer-copy  { font-size: 0.62rem; padding: 0 12px; }
}
