:root {
    --bg: #faf8f5;
    --text: #2c2c2c;
    --text-soft: #5a5a5a;
    --accent: #c45d3a;
    --accent-soft: #e8d5cd;
    --link: #1a5f7a;
    --border: #e0dcd5;
    --code-bg: #f0ede8;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Pro', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* Header */
header {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.greeting {
    font-size: 0.9rem;
    color: var(--text-soft);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 .wave {
    display: inline-block;
    animation: wave 2.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50%, 100% { transform: rotate(0deg); }
}

.intro {
    font-size: 1.15rem;
    color: var(--text-soft);
}

.intro a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--accent-soft);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.intro a:hover {
    text-decoration-color: var(--accent);
}

/* Profile photo */
.profile-photo {
    flex-shrink: 0;
    width: 210px;
    height: 210px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Header layout */
.header-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.header-content .intro {
    flex: 1;
    margin-bottom: 0;
}

/* Sections */
section {
    margin-bottom: 3.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

h2::before {
    content: '# ';
    opacity: 0.5;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* Links in content */
section a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--accent-soft);
    text-underline-offset: 3px;
    transition: all 0.2s;
}

section a:hover {
    text-decoration-color: var(--accent);
    background: var(--accent-soft);
}

/* Inline code / tools */
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

/* Book titles */
.book {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-soft);
    transition: border-color 0.2s;
}

.book:hover {
    border-color: var(--accent);
}

/* Lists */
ul {
    list-style: none;
    margin: 1rem 0;
}

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

ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.7;
}

/* Currently section - special styling */
.currently {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.currently p {
    font-size: 0.95rem;
}

/* Experience cards */
.experience-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border);
}

.experience-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.experience-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.experience-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.experience-company {
    color: var(--text-soft);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.experience-desc {
    font-size: 0.95rem;
}

/* Hackathon styling */
.hackathon-item {
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-soft);
}

.hackathon-item:last-child {
    margin-bottom: 0;
}

.hackathon-name {
    font-weight: 600;
}

.hackathon-result {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    margin-left: 0.5rem;
}

.hackathon-desc {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin-top: 0.25rem;
}

/* Project styling */
.project-item {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--code-bg);
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.project-item:hover {
    transform: translateY(-2px);
}

.project-item:last-child {
    margin-bottom: 0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.project-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--link);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-soft);
    transition: border-color 0.2s;
}

.project-name:hover {
    border-color: var(--accent);
    background: transparent;
}

.project-tech {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-soft);
    letter-spacing: 0.02em;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin-bottom: 0;
}

/* Travel photo */
.travel-photo {
    margin: 1.5rem 0;
}

.travel-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.travel-photo figcaption {
    font-size: 0.85rem;
    color: var(--text-soft);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Travel list */
.places {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.place {
    background: var(--accent-soft);
    padding: 0.3em 0.7em;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.place:hover {
    transform: translateY(-2px);
}

/* Contact */
.contact-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.contact-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.2s;
}

.contact-links a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-soft);
    font-family: 'JetBrains Mono', monospace;
}

.footnote {
    font-style: italic;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 2.5rem 1.25rem 4rem;
    }

    h1 {
        font-size: 1.9rem;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .project-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact-links a {
        text-align: center;
    }
}
/* Typing Test */
body.typing-focus {
    overflow: hidden;
}

body.typing-focus .container > *:not(#typing-section) {
    display: none;
}

body.typing-focus .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

body.typing-focus #typing-section {
    width: 100%;
    max-width: 680px;
}

body.typing-focus #typing-section > h2,
body.typing-focus #typing-section > p {
    display: none;
}

.typing-trigger {
    background: none;
    border: none;
    color: var(--link);
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--accent-soft);
    text-underline-offset: 3px;
    padding: 0;
    transition: all 0.2s;
}

.typing-trigger:hover {
    text-decoration-color: var(--accent);
    background: var(--accent-soft);
}

.typing-test {
    margin-top: 1.5rem;
    text-align: center;
    outline: none;
}

.typing-test.hidden {
    display: none;
}

.typing-header {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-soft);
}

#wpm {
    color: var(--accent);
    font-weight: 500;
}

.quote-display {
    font-size: 1.3rem;
    line-height: 1.9;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.quote-source {
    font-style: italic;
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.typing-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-soft);
    opacity: 0.6;
    margin-top: 1.5rem;
}

.typing-hint.hidden {
    display: none;
}

.hint-muted {
    opacity: 0.6;
}

.char {
    transition: all 0.05s;
}

.char.current {
    border-bottom: 2px solid var(--accent);
}

.char.correct {
    color: #2d8a6e;
}

.char.incorrect {
    color: #c45d3a;
    background: rgba(196, 93, 58, 0.15);
}

.results {
    margin-top: 1.5rem;
}

.results.hidden {
    display: none;
}