﻿/* =========================
   Root Variables (Theming)
========================= */
:root {
    --bg: #111827;
    /* --bg-rgb: 28, 37, 46; */
    --bg-rgb: 24, 32, 40;

    --card: #1a1a1a;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --accent: #3b82f6;
}

/* =========================
   Global Styles
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 2rem;
}

/* =========================
   Hero Section
========================= */
.hero {
    position: relative;
    height: 60vh;
    background-size: cover;
    background-position: center;
}

/* Gradient overlay for readability */


.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/images/hero.png') center / cover no-repeat;

    -webkit-mask-image:
        /* Bottom fade */
        linear-gradient(to top,
            transparent 0px,
            transparent 5px,
            black 80px),

        /* Left fade */
        linear-gradient(to right,
            transparent 0px,
            transparent 5px,
            rgba(0, 0, 0, 0.4) 640px,
            black 860px),

        /* Right fade */
        linear-gradient(to left,
            transparent 0px,
            transparent 5px,
            black 40px);

    /* Combine masks */
    -webkit-mask-composite: destination-in;
    mask-composite: intersect;

    /* -webkit-mask-composite: source-over;
    mask-composite: add; */

    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

.hero h1 {
    font-size: 3rem;
    margin: 0 0 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* =========================
   Section / Rows
========================= */
.row {
    padding: 2rem;
}

.row h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

/* Horizontal scrolling container */
.row-items {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: 1rem;
}

/* Scrollbar styling */
.row-items::-webkit-scrollbar {
    height: 8px;
}

.row-items::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

/* =========================
   Card (Project Tile)
========================= */
.card {
    cursor: pointer;
    min-width: 360px;
    max-width: 360px;
    height: 360px;
    border-radius: 0.5rem;
    overflow: hidden;
    perspective: 1000px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}


.card::after {
    content: "↻";
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.9rem;
    opacity: 0.5;
}


.card:active {
    transform: scale(0.98);
}


/* Hover effect */
.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Image with fixed height */
.card img {
    height: 160px;
    width: 100%;
    object-fit: cover;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.4s;
    transform-style: preserve-3d;
    will-change: transform;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-front {
    position: absolute;
    inset: 0;
}

/* Back side */
.card-back {
    transform: rotateY(180deg);
    align-items: center;
    justify-content: center;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.04));
}

.card-back .logo {
    max-width: 140px;   /* controls overall size */
    max-height: 80px;   /* prevents tall logos from exploding */

    width: auto;
    height: auto;

    object-fit: contain; /* 🔑 ensures no cropping or stretching */
}

.card-body {
    flex: 1;

    padding: 1rem;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.04));

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    position: relative;
    overflow: hidden;
}

.card-body::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.12) 50%,
            transparent 70%);

    opacity: 0.25;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

.card:hover .card-body::before {
    transform: translateX(10px);
    opacity: 0.35;
}

.card h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================
   Links / Buttons
========================= */
a {
    color: inherit;
    text-decoration: none;
}

.button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.button:hover {
    background: #2563eb;
}

/* =========================
   Utility (Optional)
========================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.project {
    border-color: #BEF1FF;
    border-radius: 8px;
    border-color: #BEF1FF;
    border-radius: 8px;
    border-style: ridge;
    border-width: 2px;
    box-shadow: 0 4px 8px #BEF1FF;
    box-shadow: 0 4px 8px #BEF1FF;
    display: grid;
    grid-gap: 0.5em;
    margin: 1em 0;
    padding: 2em 1em 1em 1em;
    padding: 2em 1em 1em 1em;
}

.project header {
    display: grid;
    grid-column-start: 1;
    grid-row: 1;
    grid-template-columns: auto auto;
}

.project header .logo {
    grid-column-start: 2;
    height: 32px;
    margin: 0 0 0 auto;
    max-width: 120px;
    width: auto;
}

.project p {
    font-weight: bold;
    grid-column-start: 1;
    grid-row-start: 2;
}

.product img {
    display: block;
    height: auto;
    margin: auto 0;
    max-width: 320px;
    width: 100%;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;

    padding: 0.5rem 0;

    /* soft fade instead of hard band */
    background: linear-gradient(to top,
            rgba(28, 37, 46, 0.85),
            rgba(28, 37, 46, 0.4),
            rgba(28, 37, 46, 0));

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border-top: 1px solid rgba(255, 255, 255, 0.08);


    border-top: 1px solid rgba(200, 220, 240, 0.12);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);

    text-align: center;
    z-index: 10;
}

.footer p {
    margin: 0;

    font-size: 0.75rem;
    font-weight: 500;

    color: rgba(200, 220, 240, 0.7);

    /* subtle readability boost */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

::selection {
    color: #ffffff;
    background: rgba(200, 220, 240, 0.25);
}

::selection {
    color: #174276;
    background: #BEF1FF;
}

::selection {
    color: #174276;
    background: #BEF1FF;
}

/* Custom scroll bar */
/* =========================
   Base Scrollbar Size
========================= */
::-webkit-scrollbar {
    height: 8px;
    /* horizontal rows */
    width: 8px;
    /* vertical (if any) */
}

/* =========================
   Track (the rail)
========================= */
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    /* faint rail */
    border-radius: 999px;
}

/* =========================
   Thumb (the draggable part)
========================= */
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom,
            rgba(200, 220, 240, 0.25),
            rgba(200, 220, 240, 0.15));

    border-radius: 999px;

    /* creates the "floating" effect */
    border: 2px solid transparent;
    background-clip: padding-box;

    /* subtle glow */
    box-shadow:
        inset 0 0 4px rgba(255, 255, 255, 0.15),
        0 0 6px rgba(180, 210, 230, 0.15);
}

/* =========================
   Hover / Active
========================= */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom,
            rgba(200, 220, 240, 0.45),
            rgba(200, 220, 240, 0.25));

    box-shadow:
        inset 0 0 6px rgba(255, 255, 255, 0.25),
        0 0 10px rgba(180, 210, 230, 0.25);
}