body {
    margin: 22px 26px;
    color: #1f1f1f;
    /* Font options — uncomment ONE line to try */
    font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
    /* font-family: Georgia, "Times New Roman", Times, serif; */
    /* font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    line-height: 1.46;
    letter-spacing: 0.01em;
    word-spacing: 0.03em;
    text-rendering: optimizeLegibility;
}

/* Shared typography */
h1,
h2 {
    font-weight: 500;
    margin: 0 0 0.35rem;
    letter-spacing: 0;
}

h2 {
    margin-top: 1.75rem;
}

p {
    margin: 0.65rem 0;
}

/* Hyperlink modification */
a {
    color: teal;
    text-decoration: none;
}

a:hover {
    color: gray;
}

/* Erdos Number chain */
.special-hover {
    position: relative;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(40, 70, 70, 0.45);
    text-underline-offset: 2px;
    cursor: pointer;
}

.tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) translateX(6px);
    background: rgba(20, 20, 20, 0.92);
    color: #f6f6f6;
    padding: 0.3rem 0.48rem;
    border-radius: 6px;
    white-space: nowrap;
    width: max-content;
    max-width: none;
    font-size: 0.9rem;
    letter-spacing: 0;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.special-hover:hover .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.special-hover:focus .tooltip,
.special-hover:focus-visible .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Home page */
.page {
    max-width: 900px;
}

.intro-flex {
    display: flex;
    gap: 1.35rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.intro-flex img {
    width: 210px;
    height: auto;
    flex: 0 0 auto;
    cursor: pointer;
}

.intro-flex-content {
    flex: 1 1 380px;
    min-width: 320px;
}

.photo-note {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    color: #4a4a4a;
}

.brief-past {
    max-width: 900px;
}

.name-reveal {
    position: relative;
    display: inline-block;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(40, 70, 70, 0.35);
    text-underline-offset: 3px;
    cursor: default;
}

.name-reveal:focus,
.name-reveal:focus-visible {
    outline: none;
}

.name-reveal:hover .tooltip,
.name-reveal:focus .tooltip,
.name-reveal:focus-visible .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.name-reveal .tooltip {
    font-family: "Noto Sans Gujarati", "Shruti", "Nirmala UI", inherit;
}

a i {
    font-size: 1.4rem;
    margin: 0 4px;
}

/* Article pages */
.article-page {
    margin: 22px 20% 50px;
    text-align: justify;
}

.article-page p {
    margin-bottom: 5px;
}

.article-page pre {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .article-page {
        margin: 16px;
    }

    .intro-flex-content {
        min-width: 0;
    }
}
