@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400;0,500;0,700;1,400&family=Manrope:wght@400;500&family=Jacquard+12&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Manrope', sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fafafa;
}

h2, h3 {
    font-family: 'Alegreya', serif;
}

main {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Hero - first h1 and following paragraphs */
main > h1:first-child {
    font-family: 'Jacquard 12', serif;
    font-size: 3.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    width: 100%;
    background: linear-gradient(
        90deg,
        #1a1a1a 0%,
        #1a1a1a 40%,
        #c9a227 50%,
        #1a1a1a 60%,
        #1a1a1a 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out forwards;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@keyframes shimmer-hover {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

main > h1:first-child:hover {
    animation: shimmer-hover 2s ease-in-out forwards;
}

main > h1:first-child a {
    text-decoration: none;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

main > h1:first-child + p {
    text-align: center;
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 0.5rem;
}

main > h1:first-child + p + p {
    text-align: center;
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 0;
}

/* Horizontal rules as section dividers */
hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0;
}

main > h1:first-child + p + p + hr {
    margin-top: 2.5rem;
}

/* Remove border from h2 right after hr */
hr + h2 {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Section headings */
h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e8e8e8;
}

h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 0.75rem;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.75rem;
}

li {
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.5rem;
}

li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #999;
}

/* Inline elements - explicit size */
strong, em {
    font-size: 1em !important;
}

a {
    font-size: inherit;
}

a {
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: #555;
}

/* Date styling */
p > em:only-child {
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
}


/* Publications */
.pub {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0 0.5rem;
    margin-bottom: 1.25rem;
}

.pub .year {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 0.85rem !important;
    font-weight: 700;
    color: #666;
}

.pub-title {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0.1rem;
}

.pub-details {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

.pub-details em {
    font-style: italic !important;
}

/* Find me - inline links */
h2 + p.findme {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 1.5rem 1rem 3rem;
    }

    main > h1:first-child {
        font-size: 2.5rem;
    }

    main > h1:first-child + p {
        font-size: 1.1rem;
    }

    main > h1:first-child + p + p {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.3rem;
    }
}
