@font-face {
    font-family: 'Crimson Text';
    font-weight: 400;
    font-style: normal;
    src: url(CrimsonText-Regular.woff2);
}
@font-face {
    font-family: 'Crimson Text';
    font-weight: 600;
    font-style: normal;
    src: url(CrimsonText-SemiBold.woff2);
}
@font-face {
    font-family: 'Inter';
    font-weight: 400;
    font-style: normal;
    src: url(Inter-VariableFont_opsz,wght.woff2);
}

/* CSS Variables for easy theme adjustment */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --light-bg: #f8f9fa;
    --xlight-bg: #fafbfa;
    --xxlight-bg: #fbfcfa;
    --border-color: #dee2e6;
    --hover-bg: #e9ecef;
    --font-serif: 'Crimson Text', serif;
    --font-sans: 'Inter', sans-serif;
    --nav-height: 3rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: white;
    font-family: var(--font-serif);
    line-height: 1.6;
    color: var(--primary-color);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Nav Layout */

#first {
    height: calc(100vh - 3rem);
    font-family: var(--font-sans);
}

nav.in-page {
    font-family: var(--font-sans);
    position: sticky;
    top: 0;
    height: var(--nav-height);
    background-color: var(--light-bg);
    display: flex;
    padding: 0 3rem 0 3rem;
}

nav.in-page > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav.in-page > a.active {
    text-decoration: underline;
}

nav.in-page > a:hover {
    color: var(--accent-color);
    background-color: var(--hover-bg);
}

/* Fullscreen pages layout */

#first, #last {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#first > h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#first > h2 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-weight: 300;
}

#first > h3 {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

#last {
    height: 100vh;
}

/* content layout */

sup {
    font-size: 0.6em;
}
sup > a {
    padding-left: 1em;
}
sup > a::after {
    /*content: " ⤴️";*/
    content: " 🔝";
    font-size: 0.45em;
    vertical-align: super;
}

/* Card styling */
.card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* contact info */

.contact-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.contact-item:hover {
    background: var(--hover-bg);
}

/* content sections */

body > main > * {
    padding-left: 40px;
    padding-right: 20px;
}
main > h1, main > h2, main > h3 {
    position: sticky;
    top: var(--nav-height);
    padding-top: 0; padding-bottom: 0;
    font-family: var(--font-sans);
}
main > h1 {
    line-height: 48px;
    height: 104px;
    background-color: var(--xlight-bg);
    margin: 0;
}
main > h1 > aside {
    font-size: 16px;
    line-height: 48px;
    font-weight: normal;
}
main > h2 {
    top: 48px;
    line-height: 32px;
    height: 56px;
    background-color: var(--xlight-bg);
    margin: 0;
}
main > h2 > aside {
    font-size: 14px;
    line-height: 18px;
    font-weight: normal;
}
main > h3 {
    top: 80px;
    line-height: 24px;
    background-color: var(--xxlight-bg);
    margin: 0;
}

