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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #1a1a1a;
    background-color: #fafaf7;
    line-height: 1.6;
    padding: 2rem;
    max-width: 720px;
    margin: 0 auto;
}

header {
    margin-bottom: 4rem;
}

nav {
    display: flex;
    gap: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e0;
}

nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
}

nav a:hover {
    color: #888;
}

main {
    margin-bottom: 4rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

main p {
    font-size: 1.1rem;
    color: #555;
}

footer {
    padding-top: 2rem;
    border-top: 1px solid #e5e5e0;
    font-size: 0.85rem;
    color: #888;
}
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

main p {
    margin-bottom: 1rem;
}

article {
    margin-bottom: 2.5rem;
}

article p em {
    color: #888;
    font-style: italic;
    font-size: 0.95rem;
}

main a {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: #c0c0c0;
    text-underline-offset: 3px;
}

main a:hover {
    text-decoration-color: #1a1a1a;
}
.lang-switch {
    margin-left: auto;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border: 1px solid #d5d5d0;
    border-radius: 4px;
}

.lang-switch:hover {
    background-color: #1a1a1a;
    color: #fafaf7 !important;
}
.tagline {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.5;
    margin-top: 0.5rem;
    max-width: 540px;
}

/* H3 styling for nested headings (e.g., job titles inside About > Experience) */
h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

/* Muted (non-italic) date line under experience headings */
p.role-date {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* Homepage profile photo — circular, floated right so the intro text wraps around it */
.home::after {
    content: "";
    display: block;
    clear: both;
}

.home-photo {
    float: right;
    width: 240px;
    height: 240px;
    margin: 4.5rem 0 1rem 2rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 35%;
    /* Wrap text along the circle's curve, not its square box */
    shape-outside: circle(50%) border-box;
    shape-margin: 1.5rem;
}

@media (max-width: 600px) {
    .home-photo {
        float: none;
        display: block;
        width: 180px;
        height: 180px;
        margin: 0 auto 1.5rem;
    }
}

/* Homepage bio under tagline */
.home-bio {
    margin-top: 1.5rem;
}

/* Project entry styling */
.project {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ececea;
}

.project:last-child {
    border-bottom: none;
}

.project h2 {
    margin-top: 0;
}

.project-meta {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Placeholder content visual treatment */
.project-placeholder {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
    border-left: 2px solid #e5e5e0;
    padding-left: 0.75rem;
    margin-top: 0.5rem;
}

/* Certificate entries (similar visual rhythm to projects) */
.certificate {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ececea;
}

.certificate:last-child {
    border-bottom: none;
}

.certificate h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

/* Certificate with a clickable preview of its first page (opens the PDF) */
.certificate {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.certificate-preview {
    display: block;
    border: 1px solid #e6e0d2;
    background-color: #fff;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.certificate-preview:hover {
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

.certificate-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.certificate-body p {
    margin: 0.4rem 0 0;
}

@media (max-width: 600px) {
    .certificate {
        grid-template-columns: 1fr;
    }

    .certificate-preview {
        max-width: 240px;
    }
}
/* Highlight entries within About > Highlights — same rhythm as projects */
.highlight {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ececea;
}

.highlight:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.highlight h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

/* Keep multi-word nav labels on one line */
nav a {
    white-space: nowrap;
}

/* Travel page — map, pins, list */
#map {
    width: 100%;
    height: 550px;
    margin: 1.5rem 0;
    border: 1px solid #e5e5e0;
    border-radius: 4px;
}

/* Desktop breakout: widen the map past the body's 720px max-width.
   Only kicks in once the viewport is wide enough to fit 960px without
   horizontal scroll. Below this threshold the map stays at 100% of
   the body content area. */
@media (min-width: 960px) {
    #map {
        width: 960px;
        margin-left: calc((100% - 960px) / 2);
        margin-right: calc((100% - 960px) / 2);
    }
}

@media (max-width: 600px) {
    #map {
        height: 380px;
    }
}

/* SVG pins. Compound selector overrides Leaflet's default .leaflet-div-icon
   white box + gray border regardless of stylesheet order. */
.leaflet-div-icon.travel-pin,
.leaflet-div-icon.travel-pin-home {
    background: transparent;
    border: none;
}

/* Home glyph: soft drop shadow, as before. */
.leaflet-div-icon.travel-pin-home {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
    transition: transform 0.15s ease;
}

.travel-pin-home:hover {
    transform: scale(1.15);
}

/* Pushpin: only the head+stem group scales on hover — the drop shadow (drawn
   outside .pin-body) stays put. Scaling an inner element also avoids clobbering
   Leaflet's positioning transform on the marker root. */
.travel-pin .pin-body {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    transition: transform 0.15s ease;
}

.travel-pin:hover .pin-body {
    transform: scale(1.15);
}

.travel-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.travel-list li {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.travel-list li.no-post {
    color: #888;
}

/* Blog post page styling */
.post {
    margin-bottom: 4rem;
}

.post-back {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.post-back a {
    color: #888;
    text-decoration: none;
}

.post-back a:hover {
    color: #1a1a1a;
}

.post-meta {
    color: #888;
    font-size: 0.95rem;
    margin-top: -0.25rem;
    margin-bottom: 2rem;
}

/* Bulleted lists inside experience articles */
article ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
}

article ul li {
    margin-bottom: 0.4rem;
    line-height: 1.55;
}

/* Trip detail page — uses same base as .post */
.trip {
    margin-bottom: 4rem;
}

.trip .post-back,
.trip .post-meta {
    /* inherit from existing .post-back and .post-meta styles */
}

.trip h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Destination list on trip detail pages */
.trip-destinations {
    list-style: none;
    padding-left: 0;
}

.trip-destinations li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #ececea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-destinations li:last-child {
    border-bottom: none;
}

.dest-tag {
    font-size: 0.8rem;
    color: #888;
    text-transform: none;
    letter-spacing: 0.02em;
}

/* Contact — inline icon before a link label (e.g. GitHub) */
.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-link .icon {
    flex-shrink: 0;
}

/* Home — "Now" block: full-width bone-colored card with the current role */
.now {
    clear: both;
    margin-top: 3rem;
}


.now-card {
    border: 1px solid #e6e0d2;
    border-radius: 12px;
    background-color: #f3efe6;
    padding: 1.4rem 1.6rem;
}

.now-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.now-card h3 {
    margin-bottom: 0;
}

.now-role,
.now-date {
    color: #888;
    margin: 0;
}

.now-date {
    font-size: 0.95rem;
    white-space: nowrap;
}

.now-link {
    display: inline-block;
    margin-top: 1rem;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
}

.now-link:hover {
    color: #888;
}

/* Hobbies — grid of big linked cards to each hobby subpage */
.hobby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.hobby-card {
    display: flex;
    flex-direction: column;
    min-height: 160px;
    padding: 1.5rem;
    border: 1px solid #e6e0d2;
    background-color: #f3efe6;
    color: #1a1a1a;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.hobby-card:hover {
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

.hobby-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hobby-sub {
    color: #555;
    margin-top: 0.4rem;
}

@media (max-width: 600px) {
    .hobby-grid {
        grid-template-columns: 1fr;
    }

    .hobby-card {
        min-height: 140px;
    }
}
