:root {
    color-scheme: dark;
    --bg: #0b0d11;
    --surface: #11141a;
    --surface-raised: #15181f;
    --text-primary: #eceef3;
    --text-secondary: #b2b9c3;
    --accent: #8facda;
    --accent-contrast: #08090d;
    --accent-soft: rgba(143, 172, 218, 0.14);
    --border: rgba(45, 51, 65, 0.72);
    --shadow: rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.phone {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 1470 / 3000;
    container-type: inline-size;
}

.phone-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

.phone-screen {
    position: absolute;
    top: 0.65%;
    bottom: 2.2%;
    left: 5.1%;
    right: 5.2%;
    border-radius: 13cqw;
    overflow: hidden;
    background: var(--surface);
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen-springboard {
    background: url('../imgs/springboard-bg.png') center/cover;
    z-index: 2;
}

.screen-springboard .app-statusbar {
    color: #1c1c1e;
}

.screen-app {
    background: var(--surface);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    transition: opacity 0.35s ease;
}

.phone.is-opening .screen-app {
    opacity: 1;
}

.phone.is-open .screen-springboard,
.phone.is-opening .screen-springboard {
    opacity: 0;
    pointer-events: none;
}

.phone.is-open .screen-app {
    opacity: 1;
    pointer-events: auto;
}

.launch-clone {
    position: absolute;
    z-index: 20;
    opacity: 1;
    overflow: hidden;
    background: url('../imgs/mike.jpg') center/cover;
    box-shadow: 0 6px 14px -6px var(--shadow);
    transition: top 0.32s cubic-bezier(0.22, 0.8, 0.28, 1), left 0.32s cubic-bezier(0.22, 0.8, 0.28, 1),
        width 0.32s cubic-bezier(0.22, 0.8, 0.28, 1), height 0.32s cubic-bezier(0.22, 0.8, 0.28, 1),
        border-radius 0.32s cubic-bezier(0.22, 0.8, 0.28, 1),
        opacity 0.22s ease 0.1s;
}

.launch-clone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.launch-clone.is-fading::after {
    opacity: 1;
}

.launch-clone.is-fading {
    opacity: 0;
}

.springboard-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: start;
    gap: 1.4rem 0.5rem;
    padding: 2.5rem 1.25rem 0;
}

.springboard-icon {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    transform: scale(1);
    transition: transform 0.15s ease;
}

.springboard-icon:active {
    transform: scale(0.92);
}

.springboard-icon__art {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22%;
    background: url('../imgs/mike.jpg') center/cover;
    box-shadow: 0 6px 14px -6px var(--shadow), 0 0 0 0 rgba(255, 255, 255, 0.5);
    animation: icon-glow 1s ease-out 0.35s;
}

@keyframes icon-glow {
    0% {
        box-shadow: 0 6px 14px -6px var(--shadow), 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
    60% {
        box-shadow: 0 6px 14px -6px var(--shadow), 0 0 0 14px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 6px 14px -6px var(--shadow), 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.springboard-icon__label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-primary);
    text-shadow: 0 1px 2px var(--shadow);
}

.app-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.4rem 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.app-statusbar__icons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.app-statusbar__carrier {
    font-size: 0.7rem;
    font-weight: 600;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    padding: 1.1rem 0 1.1rem;
}

.avatar {
    width: 58px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: url('../imgs/mike.jpg') center/cover;
    background-color: var(--surface-raised);
    flex-shrink: 0;
}

.app-header__text {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.name {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}

.role {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.role .smilecx-trigger {
    color: var(--accent);
    font-weight: 600;
}

.app-header__location {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.app-header__location svg {
    flex-shrink: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.1rem;
}

.stats__item {
    display: grid;
    justify-items: center;
    gap: 0.1rem;
    padding: 0.7rem 0.4rem;
    border-radius: 12px;
    background: var(--surface-raised);
    text-align: center;
}

.stats__value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.stats__label {
    font-size: 0.62rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.home-block {
    padding: 0.95rem 0;
    border-top: 1px solid var(--border);
}

.home-block:first-of-type {
    border-top: none;
    padding-top: 0.7rem;
}

.home-block__label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.65rem;
}

.home-block__text {
    margin: 0 0 0.6rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.home-block__text:last-child {
    margin-bottom: 0;
}

.home-block__text--muted {
    font-size: 0.8rem;
    opacity: 0.85;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.timeline__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed var(--border);
}

.timeline__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline__company {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline__role {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: right;
}

.tab-panels {
    flex: 1;
    position: relative;
    min-height: 0;
}

.tab-panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding: 0 1.25rem 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tab-panel.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.tab-panel::-webkit-scrollbar {
    display: none;
}

.tab-panel.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.tab-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 1.25rem 0 1.1rem;
}

.list {
    display: grid;
    gap: 0.6rem;
}

.list-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 74px;
    padding: 0.7rem 0.5rem 0.7rem 0.65rem;
    border-radius: 14px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.list-row:hover,
.list-row:focus-visible {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.list-row__icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 8px 16px -8px var(--shadow);
}

.list-row__icon--glyph {
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.list-row__icon--glyph svg {
    width: 24px;
    height: 24px;
}

.list-row__icon--mail {
    background: rgba(102, 184, 148, 0.16);
    color: #66b894;
}

.list-row__icon--doc {
    background: rgba(232, 168, 92, 0.16);
    color: #e8a85c;
}

.list-row__icon--linkedin {
    background: rgba(184, 204, 232, 0.16);
    color: #b8cce8;
}

.list-row__body {
    display: grid;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.list-row__title {
    font-weight: 700;
    font-size: 0.98rem;
}

.badge {
    position: absolute;
    top: 0.6rem;
    right: 0.65rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.badge--live {
    background: rgba(102, 184, 148, 0.18);
    color: #66b894;
}

.badge--archived {
    background: rgba(178, 185, 195, 0.16);
    color: var(--text-secondary);
}

.list-row__desc {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.list-row__link {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

.list-row__chevron {
    margin-left: auto;
    padding-left: 0.5rem;
    color: var(--text-secondary);
    opacity: 0.6;
    flex-shrink: 0;
}

.list-row__chevron svg {
    width: 18px;
    height: 18px;
}

.tab-bar {
    display: flex;
    flex-shrink: 0;
    min-height: 74px;
    border-top: 1px solid var(--border);
    background: var(--surface-raised);
    padding: 0.6rem 0 max(0.9rem, env(safe-area-inset-bottom, 0.9rem));
}

.tab-bar__item {
    flex: 1;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.3rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
}

.tab-bar__icon {
    display: block;
    line-height: 0;
}

.tab-bar__icon svg {
    width: 20px;
    height: 20px;
}

.tab-bar__icon--filled {
    display: none;
}

.tab-bar__item.is-active .tab-bar__icon--outline {
    display: none;
}

.tab-bar__item.is-active .tab-bar__icon--filled {
    display: block;
}

.tab-bar__label {
    font-size: 0.62rem;
    font-weight: 600;
}

.tab-bar__item.is-active {
    color: var(--accent);
}

.smilecx-trigger {
    color: inherit;
    font-weight: inherit;
    cursor: pointer;
    position: relative;
    display: inline-block;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    text-decoration: none;
}

.smilecx-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0.15em;
    border-radius: 2px;
}

.smilecx-logo {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate3d(-9999px, -9999px, 0);
    transform-origin: center;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.25));
    will-change: transform, opacity;
}

.smilecx-logo img {
    width: 20px;
    height: 20px;
    display: block;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .phone {
        width: 100%;
        aspect-ratio: auto;
        height: 100vh;
        height: 100dvh;
    }

    .phone-frame {
        display: none;
    }

    .phone-screen {
        position: static;
        border-radius: 0;
        height: 100%;
    }

    .screen {
        position: static;
        height: 100%;
    }

    .screen-springboard {
        display: none;
    }

    .screen-app {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 0;
    }
}
