:root {
    --bg: #ffffff;
    --text: #0a0a0a;
    --muted: rgba(0, 0, 0, 0.6);
    --accent: #0066cc;
}

html {
    color-scheme: light dark
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #212328;
        --text: #f6f7f8;
        --muted: rgba(255, 255, 255, 0.65);
        --accent: #4ea1ff;
    }
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(18px, 6vw, 48px);
    transform: translateY(-2vh);
}

.name {
    font-size: 3.5rem;
    margin: 0 0 8px 0;
    font-weight: 900;
    letter-spacing: -0.8px;
    text-align: center;
    width: 100%;
    max-width: 360px;}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
}

.contact {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background .16s, color .16s, transform .08s;
    width: 100%;
    justify-content: flex-start;
    padding-left: 25px;
}

.contact .icon {
    width: 24px;
    height: 24px;
    display: block;
}

.contact .label {
    font-size: clamp(1.05rem, 2.8vw, 1.15rem);
    color: var(--muted);
}

.contact:hover {
    background: rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    .contact .icon {
        filter: invert(1) hue-rotate(180deg);
        transition: filter .16s;
    }

    .contact:hover {
        background: rgba(255, 255, 255, 0.03)
    }
}

/* make the icon and text more prominent on small screens */
@media (max-width:420px) {
    .contact {
        padding: 12px 16px
    }

    .contact .icon {
        width: 26px;
        height: 26px
    }
}

/* Stack into a single column on narrow screens */
@media (max-width:520px) {
    .wrap {
        transform: translateY(-2vh);
    }

    .contacts {
        max-width: 320px
    }
}

/* focus styles for keyboard users */
.contact:focus {
    outline: 3px solid rgba(100, 150, 255, 0.12);
    outline-offset: 3px
}

.info {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 20px;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    display: flex; /* Ensure .info is a flex container */

    /* Reserve space to avoid layout shift while data loads */
    min-height: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s cubic-bezier(.2,.9,.2,1);
    pointer-events: none;
    max-width: 100%;
}

.info.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    /* prevent items from wrapping or shrinking so they stay on one line */
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: 100%;
}

.info-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.info-icon {
    width: 16px;
    height: 16px;
    display: block;
}

@media (max-width:520px) {
    .info {
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .info-item {
        gap: 6px;
    }
    
    .info-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width:380px) {
    .info {
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .info-item {
        gap: 5px;
    }
}

@media (prefers-color-scheme: dark) {
    .info-icon {
        filter: invert(1) hue-rotate(180deg);
    }
}

/* Tool / card styles used by utility pages like monzo.html */
.tool-card {
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0 auto;
    padding: 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
}

.tool-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text);
}

.tool-card input[type="number"],
.tool-card input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    background: transparent;
    color: var(--text);
}

.tool-card button {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
}

.tool-card .muted-link {
    margin-top: 12px;
    color: var(--accent);
    word-break: break-all;
}

@media (prefers-color-scheme: dark) {
    .tool-card {
        background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
    }

    .tool-card input[type="number"],
    .tool-card input[type="text"] {
        border: 1px solid rgba(255,255,255,0.06);
    }
}

/* Temperature toggle animation */
/* Temperature toggle animation (subtle) */
#temperature, .temperature {
    display: inline-block;
    will-change: transform, opacity;
    cursor: pointer;
}

.temp-anim {
    animation: tempToggle 500ms cubic-bezier(.25,.8,.25,1);
}

@keyframes tempToggle {
    0% {
        transform: translateY(-3px) scale(0.995);
        opacity: 0.95;
    }
    60% {
        transform: translateY(1px) scale(1.006);
        opacity: 1;
    }
    100% {
        transform: none;
        opacity: 1;
    }
}

a.info-label {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent; /* remove mobile tap highlight */
}

a.info-label:hover,
a.info-label:active {
    color: inherit;
    text-decoration: none;
}

a.info-label:focus {
    outline: none;
    box-shadow: none;
}

/* Ensure pointer cursor for clickable label */
.info-item a.info-label {
    cursor: pointer;
}