/* =========================
   ROOT
========================= */

:root {

    --bg: #020617;

    --card: rgba(15, 23, 42, 0.78);

    --text: #f8fafc;

    --muted: #94a3b8;

    --border: rgba(148, 163, 184, 0.15);

    --primary: #60a5fa;

    --button: rgba(96, 165, 250, 0.10);

    --shadow: rgba(0, 0, 0, 0.45);

}


/* =========================
   LIGHT THEME
========================= */

body.light {

    --bg: #eef4fb;

    --card: rgba(255, 255, 255, 0.85);

    --text: #0f172a;

    --muted: #64748b;

    --border: rgba(15, 23, 42, 0.12);

    --primary: #2563eb;

    --button: rgba(37, 99, 235, 0.08);

    --shadow: rgba(15, 23, 42, 0.15);

}


/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================
   BODY
========================= */

body {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    font-family: "Inter", sans-serif;

    color: var(--text);

    background:

        radial-gradient(
            circle at 10% 10%,
            rgba(37, 99, 235, 0.20),
            transparent 30%
        ),

        radial-gradient(
            circle at 90% 90%,
            rgba(6, 182, 212, 0.15),
            transparent 30%
        ),

        var(--bg);

    transition:
        background 0.4s ease,
        color 0.4s ease;

}


/* =========================
   CONTAINER
========================= */

.clock-container {

    width: 100%;

}


/* =========================
   CARD
========================= */

.clock-card {

    width: 100%;

    max-width: 680px;

    margin: auto;

    padding: 35px 40px;

    text-align: center;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 28px;

    backdrop-filter: blur(20px);

    box-shadow:
        0 30px 80px var(--shadow);

    transition:
        background 0.4s ease,
        border 0.4s ease;

}


/* =========================
   TOP BAR
========================= */

.top-bar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 55px;

}


.brand {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 3px;

}


.brand-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: var(--primary);

    box-shadow:
        0 0 12px var(--primary);

}


/* =========================
   THEME BUTTON
========================= */

.icon-btn {

    width: 40px;

    height: 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 50%;

    background: var(--button);

    cursor: pointer;

    font-size: 1rem;

    transition: 0.3s;

}

.icon-btn:hover {

    transform: rotate(15deg) scale(1.08);

}


/* =========================
   HEADING
========================= */

.label {

    color: var(--primary);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 4px;

    margin-bottom: 8px;

}


.heading h1 {

    font-size: clamp(
        2rem,
        5vw,
        3.2rem
    );

    margin-bottom: 10px;

}


.location {

    color: var(--muted);

    font-size: 0.8rem;

}


/* =========================
   DATE
========================= */

.date {

    color: var(--muted);

    font-size: 0.9rem;

    margin-top: 35px;

}


/* =========================
   TIME
========================= */

.time {

    margin-top: 18px;

    font-size: clamp(
        3.5rem,
        11vw,
        6.5rem
    );

    font-weight: 700;

    line-height: 1;

    letter-spacing: 3px;

    font-variant-numeric: tabular-nums;

    text-shadow:
        0 0 35px rgba(
            96,
            165,
            250,
            0.20
        );

}


/* =========================
   AM / PM
========================= */

.period {

    display: inline-block;

    margin-top: 18px;

    padding: 6px 15px;

    border-radius: 50px;

    color: var(--primary);

    background: var(--button);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 2px;

}


/* =========================
   CONTROLS
========================= */

.controls {

    margin-top: 30px;

}


.control-btn {

    padding: 10px 18px;

    border: 1px solid var(--border);

    border-radius: 8px;

    color: var(--text);

    background: var(--button);

    cursor: pointer;

    font-family: inherit;

    font-size: 0.75rem;

    transition: 0.3s;

}


.control-btn:hover {

    border-color: var(--primary);

    color: var(--primary);

    transform: translateY(-2px);

}


/* =========================
   FOOTER
========================= */

.clock-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 40px;

    padding-top: 20px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 0.7rem;

}


.clock-footer span:first-child {

    display: flex;

    align-items: center;

    gap: 7px;

}


/* =========================
   STATUS
========================= */

.status-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 10px #22c55e;

}


/* =========================
   MOBILE
========================= */

@media (max-width: 576px) {

    body {

        padding: 12px;

    }

    .clock-card {

        padding: 25px 18px;

        border-radius: 22px;

    }

    .top-bar {

        margin-bottom: 40px;

    }

    .brand {

        font-size: 0.6rem;

        letter-spacing: 2px;

    }

    .time {

        font-size: 3.2rem;

        letter-spacing: 1px;

    }

    .clock-footer {

        flex-direction: column;

        gap: 10px;

    }

}

/* link back to the portfolio */
.back-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10;

    padding: 8px 14px;
    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 500;
    color: inherit;
    text-decoration: none;

    background: rgba(128, 128, 128, 0.15);
    backdrop-filter: blur(6px);
}

.back-link:hover {
    background: rgba(128, 128, 128, 0.3);
}
