/* Jun Kwak — personal site
   Type: Lora (serif body) + IBM Plex Sans (contact row). */

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

html {
    background-color: #f7f3ec;
}

:root {
    --electric-blue: #002FA7;
    --text-color: #5f5a52;
    --bg-color: #f7f3ec;
    --light-gray: #4a4640;
    --rule: #e3dcd0;
    --serif: 'Lora', 'Iowan Old Style', 'Palatino', Georgia, serif;
    --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--serif);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.4;
    font-size: 18px;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content {
    display: flex;
    flex-direction: column;
    margin-top: 5vh;
}

/* Header */

.name-text {
    margin: 0;
    line-height: 1.3;
    font-size: 18px;
}

.header-links {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.header-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-link:hover,
.header-link.active {
    color: #1f1c18;
}

/* Body copy */

.content p {
    margin: 0;
    line-height: 1.3;
    font-size: 18px;
    color: var(--text-color);
}

.name-text + p {
    margin-top: 1.3em;
}

.content p:not(.name-text) ~ p {
    margin-top: 0.75rem;
}

.content strong {
    font-weight: 600;
    color: var(--electric-blue);
}

.content em {
    font-style: italic;
}

.highlight-link {
    color: var(--electric-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.highlight-link:hover {
    opacity: 0.7;
}

.highlight-link.active {
    text-decoration: underline;
    opacity: 1;
}

/* Expanding description under a highlight link */

.description-text {
    color: #a39d92;
    font-size: 18px;
    line-height: 1.2;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    will-change: max-height, margin-top, opacity;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.description-text.active {
    max-height: 1000px;
    margin-top: 0.3em;
    opacity: 1;
}

.description-link {
    color: var(--electric-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.description-link:hover {
    opacity: 0.7;
}

/* Contact row */

.contact-links {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--light-gray);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.6;
    margin-top: 2.2em;
    padding-top: 1.2em;
    border-top: 1px solid var(--rule);
}

.contact-email {
    color: #8c867b;
    text-decoration: none;
}

.contact-email:hover {
    color: var(--electric-blue);
}

.contact-link {
    color: #2a2622;
    text-decoration: none;
    padding-bottom: 1px;
    border-bottom: 2px solid var(--rule);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
    color: var(--electric-blue);
    border-bottom-color: var(--electric-blue);
}

.separator {
    color: #c9c2b6;
}

/* Responsive */

@media (max-width: 768px) {
    .container {
        padding: 4rem 1.5rem;
    }

    .content {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 3rem 1rem;
    }

    body,
    .content p,
    .name-text,
    .description-text {
        font-size: 16px;
    }

    .contact-links {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .description-text,
    .highlight-link,
    .header-link {
        transition: none;
    }
}
