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

:root {
    --bg: #F5F0E8;
    --text: #1A1208;
    --text-secondary: #5C4A2A;
    --accent: #1C3A2A;
    --border: #DDD5C4;
    --hover-bg: #EDE8DE;
    --card-bg: #FDFBF8;
}

/* Explicitly ignore dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #F5F0E8;
        --text: #1A1208;
        --text-secondary: #5C4A2A;
        --accent: #1C3A2A;
        --border: #DDD5C4;
        --hover-bg: #EDE8DE;
        --card-bg: #FDFBF8;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.78;
    font-size: 16px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

.mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    letter-spacing: 0.05em;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(245, 240, 232, 0.93);
    border-bottom-color: var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

nav > div {
    max-width: 660px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .name {
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 640px) {
    nav ul {
        display: none;
    }

    nav ul.mobile-open {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 2rem;
        display: flex;
        z-index: 999;
    }

    nav ul.mobile-open li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    nav ul.mobile-open li:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
    }
}

/* Main content */
main {
    max-width: 660px;
    margin: 0 auto;
    padding: 5.5rem 2rem 4rem;
}

/* Hero */
#hero {
    margin-bottom: 4rem;
}

#hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 56px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
}

#hero .tagline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

#hero p {
    margin-bottom: 2rem;
    color: var(--text);
}

.hero-about {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.hero-about::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.hero-about:hover::after {
    width: 100%;
}

#hero .cta-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

#hero .cta-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

#hero .cta-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

#hero .cta-links a:hover::after {
    width: 100%;
}

.hero-divider {
    height: 1px;
    background: var(--border);
    margin: 4rem 0;
}

/* Photo placeholder */
.photo-placeholder {
    width: 180px;
    height: 180px;
    background: var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--text);
}

/* Section label */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Sections */
section {
    margin-bottom: 5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    scroll-margin-top: 100px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(n+3) { opacity: 1; }

/* Entry (experience, project, achievement) */
.entry {
    margin-bottom: 3rem;
    padding: 1.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

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

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.entry-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.entry-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.entry-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.entry-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.entry-description {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.78;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: rgba(28, 58, 42, 0.08);
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
}

/* Writing section */
.writing-placeholder {
    font-style: italic;
    color: var(--text-secondary);
}

.post-item {
    margin-bottom: 2rem;
}

.post-title {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-teaser {
    font-size: 0.9rem;
    color: var(--text);
}

/* Contact section */
.contact-intro {
    margin-bottom: 2rem;
    color: var(--text);
}

.contact-links {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.contact-links a {
    margin-right: 0.5rem;
}

.contact-links a::after {
    content: ' ·';
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.contact-links a:last-child::after {
    content: '';
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
}

footer > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

    #hero h1 {
        font-size: 40px;
    }

    nav > div {
        padding: 1rem 1.5rem;
    }

    .entry-header {
        flex-direction: column;
    }

    .entry-date {
        width: 100%;
    }

    footer > div {
        flex-direction: column;
        align-items: flex-start;
    }
}
