/* Warm editorial design system for the public shikomba.me experience. */
:root {
    color-scheme: light;
    --ink: #1f2937;
    --paper: #f7f4ee;
    --surface: #fffdf9;
    --line: #d9d4ca;
    --brand: #b45309;
    --brand-dark: #92400e;
    --muted: #5b6470;
    --success: #166534;
    --neutral-status: #4b5563;
    --shadow: 0 14px 35px rgba(31, 41, 55, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

a {
    color: var(--brand-dark);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover, a:focus { color: var(--brand); }

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--brand);
}

.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.92);
}

.site-header__inner, .site-footer__inner, .container {
    width: min(100% - 2rem, 960px);
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 5.5rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.site-brand:hover, .site-brand:focus,
.site-footer__brand:hover, .site-footer__brand:focus { color: var(--ink); }

.site-brand__mark {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: contain;
}

.site-brand__dot { color: var(--brand); }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.25rem;
}

.site-nav a {
    position: relative;
    padding: 0.5rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0.18rem;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.site-nav a:hover::after, .site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav a[aria-current="page"] { color: var(--ink); }

.container {
    min-height: calc(100vh - 12rem);
    padding: 4.5rem 0 5rem;
}

h1, h2, h3 {
    margin-top: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

h1 { max-width: 14ch; font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
h3 { font-size: 1.5rem; }
p { max-width: 65ch; }

.eyebrow, .card-kicker {
    margin: 0 0 0.7rem;
    color: var(--brand-dark);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 5rem;
    padding: 3rem 0 0;
}

.hero h1 { position: relative; z-index: 1; margin-bottom: 1.5rem; }

.hero__lede {
    max-width: 45rem;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.hero__actions, .contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 2.9rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--brand);
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover, .button:focus-visible { transform: translateY(-2px); }

.button--primary { color: var(--surface); background: var(--brand); }
.button--primary:hover, .button--primary:focus-visible { color: var(--surface); background: var(--brand-dark); }
.button--secondary { color: var(--brand-dark); background: transparent; }
.button--secondary:hover, .button--secondary:focus-visible { color: var(--brand-dark); background: rgba(180, 83, 9, 0.08); }

.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading h2 { margin-bottom: 0; }
.section-heading__rule { flex: 1; height: 1px; background: var(--line); }

.page-intro {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.page-intro h1 { margin-bottom: 1rem; }
.page-intro > p:last-child { max-width: 42rem; color: var(--muted); font-size: 1.1rem; }

.about-layout {
    display: grid;
    grid-template-columns: minmax(13rem, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.profile-portrait {
    width: 100%;
    max-width: 22rem;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.profile-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card {
    position: relative;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    animation: rise-in 420ms ease both;
}

.card:hover { border-color: rgba(180, 83, 9, 0.45); }
.card h2, .card h3 { margin-bottom: 0.7rem; }
.card-title { color: var(--ink); text-decoration: none; }
a.card-title:hover, a.card-title:focus { color: var(--brand-dark); }

.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-meta { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.88rem; }
.card-kicker { margin-bottom: 0.5rem; }
.text-link, .back-link { font-weight: 700; }
.back-link { display: inline-block; margin-bottom: 2rem; text-decoration: none; }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0;
    margin: 1rem 0;
    list-style: none;
}

.tag-list li {
    padding: 0.25rem 0.55rem;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 0.82rem;
}

.status-badge, .open-source-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-badge--ongoing, .open-source-badge { color: var(--success); }
.status-badge--completed { color: var(--neutral-status); }

.project-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0; }
.empty-state { padding: 2rem; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.reading-column { max-width: 44rem; margin: 0 auto; }
.reading-column h1 { max-width: 18ch; }
.prose { font-size: 1.08rem; }
.prose p { max-width: 68ch; margin: 0 0 1.35rem; }
.resume-download { margin: 0 0 3rem; }
.resume-section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.resume-section + .resume-section { margin-top: 0; }
.contact-card { max-width: 42rem; }
.contact-icons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--brand-dark);
    border: 1px solid var(--line);
    border-radius: 4px;
    text-decoration: none;
}
.contact-icon:hover, .contact-icon:focus-visible { color: var(--brand); border-color: var(--brand); }
.contact-icon svg { width: 1.35rem; height: 1.35rem; }

.site-footer { padding: 2.5rem 0; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.site-footer__copy { margin: 0; color: var(--muted); font-size: 0.85rem; text-align: left; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    .site-header__inner { align-items: flex-start; flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
    .site-nav { justify-content: flex-start; gap: 0.75rem 1rem; }
    .container { padding: 3rem 0 4rem; }
    .hero { margin-bottom: 3.5rem; padding-top: 1rem; }
    .about-layout {
        display: block;
    }

    .profile-portrait {
        max-width: 18rem;
        margin: 0 auto 2.5rem;
    }

    .site-footer__inner { display: flex; align-items: stretch; flex-direction: column; gap: 1rem; }
    .contact-icons { justify-content: flex-end; order: 1; }
    .site-footer__copy { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
