@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

html {
    scroll-behavior: smooth;
    /* scrollbar-color: #a9b8e8 #08080c;  */
    scrollbar-width: thin;
}

/* ::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #08080c; }
::-webkit-scrollbar-thumb { background: #a9b8e8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a9b8e8; } */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #08080c;
    color: #d0d0d5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle background gradient orbs (Nova-style atmospheric gradients) */
.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6a5acd, transparent 70%);
    top: -10%;
    right: -20%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #2a6a8a, transparent 70%);
    bottom: -10%;
    left: -10%;
}

main {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 6rem 0 0;
    gap: 1rem;
    width: 100%;
}

.hero-intro {
    margin-bottom: 1rem;
}

.overline {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #555;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #ececf0;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    color: #606068;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

/* Globe */
#globe-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    margin: 1rem 0 0;
}

/* Social links — text with animated underlines */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: #707078;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.4s ease;
}

.social-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #d0d0d5;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-links a:hover {
    color: #d0d0d5;
}

.social-links a:hover::after {
    transform: scaleX(1);
}

.dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #333;
}

/* GitHub activity — toggled inline by the Github link */
.gh-link-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.gh-toggle {
    cursor: pointer;
}

.gh-ext {
    color: #555 !important;
    font-size: 0.7rem;
    line-height: 1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gh-ext::after {
    content: none !important; /* skip the underline animation on the icon */
}

.gh-ext:hover {
    color: #aa9fc6 !important;
}

.gh-mark {
    display: block;
    width: 12px;
    height: 12px;
}

.github-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease, margin-top 0.4s ease;
}

.github-panel.open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 1.5rem;
}

.github-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.github-heatmap {
    width: 100%;
}

.gh-svg {
    display: block;
    width: 100%;
    height: auto;
}

.gh-mon {
    font-size: 7px;
    fill: #555;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.04em;
}

.gh-cap {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #555;
}

.github-err {
    font-size: 0.65rem;
    color: #555;
}

/* Context bar — time & weather */
.context-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0 2.5rem;
    width: 100%;
}

.context-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #444;
}

.context-time {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ececf0;
    letter-spacing: -0.02em;
}

.context-weather {
    font-size: 0.85rem;
    font-weight: 400;
    color: #555;
    letter-spacing: 0.02em;
}

/* Shared dropdown (details/summary) */
.dropdown {
    width: 100%;
    padding: 1rem 0;
}

.dropdown + .dropdown {
    padding-top: 0;
}

summary.dropdown-toggle {
    display: block !important;
    list-style: none !important;
    list-style-type: none !important;
    text-align: center;
    cursor: pointer;
    padding: 0.5rem 0;
    user-select: none;
}

summary.dropdown-toggle::-webkit-details-marker {
    display: none !important;
}

summary.dropdown-toggle::marker {
    content: none !important;
    display: none !important;
}

.dropdown-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #666;
    transition: color 0.3s ease;
}

.dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    transition: transform 0.3s ease, border-top-color 0.3s ease;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.dropdown[open] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-toggle:hover .dropdown-label {
    color: #555;
}

.dropdown-toggle:hover .dropdown-arrow {
    border-top-color: #555;
}

/* Slide transition for dropdown content */
.dropdown-content {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown[open] > .dropdown-content {
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s 0.05s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-content > * {
    min-height: 0;
    overflow: hidden;
}

/* Vitals */
.vitals .vitals-grid {
    padding: 1rem 0;
}

.vitals-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.vital-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 100px;
}

.vital-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #444;
}

.vital-value {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ececf0;
}

/* Weekly trend chart — combined steps/distance/calories */
.vitals-trend {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    max-width: 280px;
    margin: 2.75rem auto 0;
    opacity: 0;
    animation: sparkFade 0.6s ease 0.2s forwards;
}

.trend-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #444;
}

.trend-svg {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

/* Hover tooltip on the trend chart (fixed → escapes the dropdown's overflow clip) */
.trend-tip,
.gh-tip {
    position: fixed;
    transform: translate(-50%, calc(-100% - 6px));
    background: rgba(8, 8, 8, 0.45);
    border: 1px solid #1a1a1f;
    border-radius: 8px;
    padding: 6px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
    z-index: 6;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.trend-tip.show,
.gh-tip.show {
    opacity: 1;
}

.trend-tip-date {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #ececf0;
    margin-bottom: 1px;
}

.trend-tip-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 500;
    color: #b8b8c0;
}

.trend-tip-row i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.trend-legend {
    display: flex;
    gap: 1.1rem;
}

.trend-lg {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.58rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #444;
}

.trend-lg i {
    width: 9px;
    height: 2px;
    border-radius: 1px;
    display: inline-block;
}

@keyframes sparkFade {
    to { opacity: 1; }
}

/* Product showcase carousel */
.showcase {
    overflow: hidden;
}

.showcase-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 1rem 1rem;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}

.showcase-track.dragging {
    cursor: grabbing;
}

.showcase-track img,
.showcase-card {
    -webkit-user-drag: none;
    user-select: none;
}

.showcase-track::-webkit-scrollbar {
    display: none;
}

.showcase-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.3s ease;
}

.showcase-card:hover {
    transform: translateY(-4px);
}

.showcase-img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #141418;
    border: 1px solid #1a1a1f;
}

.showcase-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.showcase-card:hover .showcase-img img {
    opacity: 1;
}

.showcase-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ececf0;
    padding: 0 0.15rem;
}

.showcase-type {
    font-size: 0.7rem;
    font-weight: 400;
    color: #555;
    padding: 0 0.15rem;
}

@media (max-width: 640px) {
    .showcase-card {
        flex: 0 0 160px;
    }

    .showcase-img {
        width: 160px;
        height: 160px;
    }
}

/* Footer colophon */
.colophon {
    padding: 2rem 0 3rem;
    text-align: center;
}

.colophon p {
    font-size: 0.7rem;
    font-weight: 400;
    color: #333;
    letter-spacing: 0.02em;
}

.colophon a {
    color: #444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.colophon a:hover {
    color: #707078;
}

/* Pin glow — unified element controlled by JS lerp */
.pin-glow-persistent {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 30%, rgba(255,255,255,0.1) 60%, transparent 80%);
    box-shadow: 0 0 18px 10px rgba(255,255,255,0.35);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 1;
}

/* Globe hover tooltip (city + date) — strip globe.gl's default wrapper box */
.float-tooltip-kap {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.globe-tip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(8, 8, 8, 0.92);
    border: 1px solid #26262e;
    border-radius: 8px;
    padding: 7px 11px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
}

.globe-tip-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ececf0;
    letter-spacing: 0.01em;
}

.globe-tip-sub {
    font-size: 0.65rem;
    font-weight: 400;
    color: #8a8a95;
    letter-spacing: 0.02em;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    main {
        padding: 0 1.25rem;
    }

    .hero {
        padding: 4rem 0 1rem;
    }

    #globe-container {
        height: 320px;
    }

    .vitals-grid {
        gap: 2rem;
    }

    .vital-value {
        font-size: 1.5rem;
    }
}
