:root {
    --bg: #eef2f6;
    --panel: #ffffff;
    --panel-soft: #f7f9fc;
    --text: #1f2937;
    --muted: #5f6f82;
    --border: #d9e0e8;
    --accent: #3867a8;
    --accent-dark: #254c80;
    --shadow: 0 10px 28px rgba(20, 38, 61, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.42;
    color: var(--text);
    background: linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
}

.page {
    width: min(97vw, 1600px);
    margin: 0 auto;
    padding: 20px clamp(10px, 1.8vw, 26px) 32px;
}

.site-header,
.clock-card,
.card,
.highlight-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.site-header {
    padding: 24px clamp(18px, 3vw, 34px);
    margin-bottom: 14px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 5px;
    font-size: clamp(1.45rem, 2.5vw, 2.05rem);
    line-height: 1.08;
}

h2 {
    margin-bottom: 9px;
    font-size: 0.98rem;
    line-height: 1.25;
}

.subtitle {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.clock-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.clock-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 13px 16px;
}

.clock-card > * {
    position: relative;
    z-index: 1;
}

.clock-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 118px;
    height: 72px;
    border-bottom-left-radius: 42px;
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}

.clock-card-hawaii::after {
    background:
        linear-gradient(135deg, rgba(1, 33, 105, 0.36) 0 17%, transparent 17% 100%),
        linear-gradient(45deg, transparent 0 16%, rgba(191, 10, 48, 0.28) 16% 21%, transparent 21% 100%),
        repeating-linear-gradient(180deg,
            rgba(191, 10, 48, 0.22) 0 8px,
            rgba(255, 255, 255, 0.30) 8px 16px,
            rgba(1, 33, 105, 0.20) 16px 24px,
            rgba(255, 255, 255, 0.30) 24px 32px);
}

.clock-card-cern::after {
    background:
        radial-gradient(circle at 72% 30%, transparent 0 14px, rgba(255, 255, 255, 0.65) 15px 17px, transparent 18px 100%),
        radial-gradient(circle at 54% 48%, transparent 0 22px, rgba(255, 255, 255, 0.52) 23px 25px, transparent 26px 100%),
        radial-gradient(circle at 86% 58%, transparent 0 27px, rgba(255, 255, 255, 0.45) 28px 30px, transparent 31px 100%),
        linear-gradient(135deg, rgba(30, 86, 160, 0.30), rgba(18, 56, 120, 0.15));
}

.clock-card-india::after {
    background:
        radial-gradient(circle at 72% 50%, transparent 0 10px, rgba(0, 0, 128, 0.24) 11px 12px, transparent 13px 100%),
        linear-gradient(180deg,
            rgba(255, 153, 51, 0.26) 0 33%,
            rgba(255, 255, 255, 0.40) 33% 66%,
            rgba(19, 136, 8, 0.24) 66% 100%);
}

.clock-place {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.clock-time {
    display: block;
    margin: 2px 0 3px;
    font-size: 1.55rem;
    line-height: 1.08;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.015em;
}

.clock-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.highlight-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 19px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f8fd 100%);
}

.highlight-card p {
    max-width: 900px;
    margin-bottom: 0;
    color: var(--muted);
}

.button-link {
    display: inline-block;
    flex: 0 0 auto;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.button-link:hover,
.button-link:focus {
    background: var(--accent-dark);
}

.card {
    padding: 16px 19px;
}


.card-note {
    margin-bottom: 12px;
    color: var(--muted);
}

.scholar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    text-decoration: none;
    min-width: 178px;
}

.profile-link:hover,
.profile-link:focus {
    border-color: var(--accent);
    text-decoration: none;
}

.profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    transform: translateY(0.5px);
}

.profile-link strong,
.profile-link small {
    display: block;
}

.profile-link small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
}

.research-summary {
    max-width: none;
    margin: 12px 0 0;
    font-size: 0.90rem;
    line-height: 1.55;
    color: var(--text);
}

.research-keywords {
    max-width: 980px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.42;
}

.profile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
}

.profile-icon-scholar {
    background: var(--accent);
}

.profile-icon-ams {
    background: #243f7a;
    font-family: Arial, Helvetica, sans-serif;
}

ul {
    margin: 0;
    padding-left: 1.05rem;
}

li {
    margin: 0.30rem 0;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

@media (min-width: 1100px) {
    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body {
        font-size: 12.5px;
    }

    .page {
        width: 100%;
        padding: 12px 10px 24px;
    }

    .highlight-card {
        flex-direction: column;
        align-items: stretch;
    }

    .button-link {
        text-align: center;
    }

    .profile-link {
        justify-content: center;
        width: min(100%, 230px);
    }
}

/* Styled bookmark viewer page */
.bookmarks-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.page-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.quiet-download-link {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.quiet-download-link:hover,
.quiet-download-link:focus {
    border-color: var(--accent);
    color: var(--accent-dark);
    text-decoration: none;
}

.bookmark-toolbar {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(220px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bookmark-search-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bookmark-search {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

.bookmark-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 103, 168, 0.14);
    outline: none;
}

.bookmark-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: right;
    white-space: nowrap;
}

.bookmark-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(315px, 1fr));
    gap: 13px;
}

.bookmark-folder-card {
    padding: 16px 19px 14px;
}

.bookmark-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bookmark-card-header h2,
.bookmark-card-header h3 {
    margin: 0;
}

.bookmark-card-header h3 {
    font-size: 0.86rem;
}

.bookmark-count {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.bookmark-link-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bookmark-link-list li {
    margin: 0;
}

.bookmark-link {
    display: block;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    text-decoration: none;
}

.bookmark-link:hover,
.bookmark-link:focus {
    border-color: var(--accent);
    background: #ffffff;
    text-decoration: none;
}

.bookmark-link-title,
.bookmark-host {
    display: block;
}

.bookmark-link-title {
    font-weight: 700;
}

.bookmark-host {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.bookmark-nested-folder {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.bookmark-empty {
    color: var(--muted);
}

.bookmark-error {
    color: #8a3c2d;
}

@media (max-width: 800px) {
    .bookmarks-header,
    .bookmark-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .bookmark-status {
        text-align: left;
        white-space: normal;
    }

    .bookmark-folder-grid {
        grid-template-columns: 1fr;
    }
}
