:root {
    --cream:       #faf7f2;
    --warm-bg:     #f3ede3;
    --sand:        #e8ddd0;
    --terracotta:  #c0714f;
    --rust:        #a85a3a;
    --bark:        #4a3728;
    --text:        #2e2318;
    --muted:       #7a6a5a;
    --accent:      #6b8f71;
    --white:       #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--cream);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    min-height: 100vh;
}
strong {
  font-weight: 700;
}

/* ── NAV ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 4rem;
    background: rgba(250,247,242,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand);
}
.nav-logo {
    font-family: 'EB Garamond', serif;
    font-size: 1rem; color: var(--bark);
    text-decoration: none; letter-spacing: 0.01em;
    cursor: pointer;
}
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--muted);
    font-size: 0.85rem; font-weight: 400;
    letter-spacing: 0.06em; text-transform: uppercase;
    transition: color 0.2s; cursor: pointer;
    background: none; border: none; padding: 0;
}
.nav-links a:hover  { color: var(--terracotta); }
.nav-links a.active { color: var(--bark); font-weight: 500; }

/* ── PAGE VIEWS ── */
.page { display: none; animation: fadeUp 0.5s ease both; }
.page.active { display: block; }

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

/* ══════════════════════════════
    HOME
══════════════════════════════ */
#page-home {
    min-height: 100vh;
    display: flex; flex-direction: column;
    justify-content: center;
    padding: 7rem 4rem 4rem;
    position: relative; overflow: hidden;
}
#page-home::before {
    content: '';
    position: fixed; top: -160px; right: -160px;
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, #e8ddd055 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

.home-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    position: relative; z-index: 1;
}

.home-text h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600; line-height: 1.15;
    color: var(--bark); margin-bottom: 0.3rem;
}
.home-text h1 em { font-style: italic; color: var(--terracotta); }
.eyebrow {
    display: inline-block;
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
    padding: 0.28rem 0.85rem; border-radius: 20px;
    margin-bottom: 1.3rem;
}
.home-tagline {
    font-size: 1.05rem; color: var(--muted);
    margin: 1rem 0 2rem; max-width: 420px;
}
.home-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.home-photo {
    display: flex; justify-content: center;
    position: relative; z-index: 1;
}
.photo-frame {
    width: 320px; height: 400px;
    border-radius: 200px 200px 160px 160px;
    overflow: hidden;
    border: 6px solid var(--white);
    box-shadow: 0 20px 60px rgba(74,55,40,0.18);
    background: var(--sand);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--sand), var(--warm-bg));
    color: var(--muted); font-size: 0.82rem; text-align: center; gap: 0.5rem;
}
.photo-placeholder svg { opacity: 0.35; }

/* about block */
.home-about {
    max-width: 1100px; margin: 4rem auto 0;
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem;
    padding-top: 3rem; border-top: 1px solid var(--sand);
    position: relative; z-index: 1;
}
.about-stats { display: flex; flex-direction: column; gap: 1.3rem; }
.stat-card {
    background: var(--white);
    border-radius: 12px; padding: 1.2rem 1.4rem;
    border-left: 3px solid var(--terracotta);
}
.stat-num {
    font-family: 'EB Garamond', serif; font-size: 1.8rem;
    color: var(--terracotta); font-weight: 600;
}
.stat-label { font-size: 0.82rem; color: var(--muted); }
.about-text p { color: var(--muted); margin-bottom: 1.1rem; font-size: 1rem; }
.about-text p:first-child { color: var(--text); font-size: 1.1rem; font-weight: 400;}
.about-text a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 400;
}
.about-text a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════
    SHARED INNER PAGE
══════════════════════════════ */
.inner-page {
    max-width: 1100px; margin: 0 auto;
    padding: 8rem 4rem 5rem;
}
.page-header { margin-bottom: 3rem; }
.section-label {
    display: inline-block;
    font-size: 0.75rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 0.6rem;
}
.page-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 600; color: var(--bark);
}

/* ══════════════════════════════
    SKILLS
══════════════════════════════ */
.skills-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.skill-tag {
    background: var(--warm-bg); color: var(--bark);
    padding: 0.3rem 0.85rem; border-radius: 20px; font-size: 0.8rem;
}

/* ══════════════════════════════
    BUTTONS
══════════════════════════════ */
.btn {
    display: inline-block; text-decoration: none; cursor: pointer;
    padding: 0.72rem 1.5rem; border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem; font-weight: 500; transition: all 0.2s; border: none;
}
.btn-primary {
    background: var(--terracotta); color: white;
    box-shadow: 0 2px 12px rgba(192,113,79,0.28);
}
.btn-primary:hover { background: var(--rust); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--bark); color: var(--bark); background: transparent; }
.btn-outline:hover { background: var(--bark); color: white; transform: translateY(-2px); }

/* ══════════════════════════════
    RESEARCH PAGE
══════════════════════════════ */
.research-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem;
    margin-bottom: 3.5rem;
}
.research-overview{
  max-width: 750px;
  margin: 1.5rem auto 2.5rem auto;
  font-size: 1.05rem;
  line-height: 1.7;
}
.research-card {
    background: var(--white);
    border-radius: 14px; padding: 1.8rem;
    border: 1px solid var(--sand);
    transition: all 0.25s; position: relative; overflow: hidden;
}
.research-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--terracotta); transform: scaleX(0);
    transform-origin: left; transition: transform 0.3s;
}
.research-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(74,55,40,0.1); }
.research-card:hover::before { transform: scaleX(1); }
.card-icon { font-size: 1.8rem; margin-bottom: 0.9rem; }
.research-card h3 {
    font-family: 'EB Garamond', serif; font-size: 1.05rem;
    color: var(--bark); margin-bottom: 0.6rem;
}
.research-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

.pubs-title {
    font-family: 'EB Garamond', serif; font-size: 1.4rem;
    color: var(--bark); margin-bottom: 1.4rem;
    padding-top: 2rem; border-top: 1px solid var(--sand);
}
.pub-item {
    padding: 1.6rem 0; border-bottom: 1px solid var(--sand);
    display: grid; grid-template-columns: 48px 1fr; gap: 1.2rem; align-items: start;
}
.pub-year { font-family: 'EB Garamond', serif; font-size: 1.1rem; color: var(--terracotta); font-weight: 600; }
.pub-title { font-family: 'EB Garamond', serif; font-size: 1.2rem; color: var(--bark); margin-bottom: 0.25rem; }
.pub-authors { font-size: 1.05rem; color: var(--muted); }
.pub-journal  { font-size: 1rem; color: var(--accent); font-style: italic; }
.pub-links { display: flex; gap: 0.7rem; margin-top: 0.4rem; }
.pub-link {
    font-size: 0.76rem; text-decoration: none;
    color: var(--terracotta); border: 1px solid var(--terracotta);
    padding: 0.18rem 0.55rem; border-radius: 4px; transition: all 0.18s;
}
.pub-link:hover { background: var(--terracotta); color: white; }
.scholar-btn { margin-top: 2rem; text-align: center; }

/* ══════════════════════════════
    Bio PAGE
══════════════════════════════ */
.bio-journey {
    max-width: 1300px;
    margin: 0 auto;
    padding: 8rem 2rem 5rem;
}

.bio-journey > h2 {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    color: var(--bark);
    margin-bottom: 2.5rem;
}

.journey-grid {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Column 1, Photos */
.journey-photos {
display: flex;
flex-direction: column;
padding-top: 4px;       /* fine-tune to align with first timeline entry */
}

.city-photo-item {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 0;       /* controlled by spacers below */
}

.city-photo-spacer {
flex-shrink: 0;
}

.city-thumb {
width: 160px;
height: 110px;
object-fit: cover;
border-radius: 10px;
border: 1px solid var(--sand, #e8ddd0);
box-shadow: 0 4px 14px rgba(74,55,40,0.12);
display: block;
transition: transform 0.2s, box-shadow 0.2s;
}

.city-thumb:hover {
transform: scale(1.03);
box-shadow: 0 8px 22px rgba(74,55,40,0.18);
}

.city-photo-label {
font-size: 0.75rem;
color: var(--muted, #7a6a5a);
margin-top: 5px;
text-align: center;
font-style: italic;
}

/* Column 2, Timeline */
.journey-text {
    border-left: 4px solid var(--sand);
    padding-left: 28px;
}

.journey-item {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    margin-bottom: 8px;
    align-items: start;
    cursor: default;
    transition: background 0.2s, padding 0.2s;
    border-radius: 8px;
    padding: 8px 10px 8px 0;
}

.journey-item::before {
    content: "";
    position: absolute;
    left: -35px;
    top: 14px;
    width: 10px;
    height: 10px;
    background: var(--terracotta, #c0714f);
    border: 2px solid var(--cream, #faf7f2);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--terracotta, #c0714f);
    transition: transform 0.2s;
}

.journey-item.highlight,
.journey-item:hover {
    background: var(--warm-bg, #f3ede3);
    padding-left: 10px;
}
.journey-item.highlight::before,
.journey-item:hover::before {
    transform: scale(1.4);
}

.journey-year {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
    padding-top: 3px;
    white-space: nowrap;
}

.journey-content h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--bark, #4a3728);
}

.journey-content p {
    margin: 2px 0;
    font-size: 0.9rem;
    color: var(--muted, #7a6a5a);
}

.journey-location {
    color: var(--accent, #6b8f71) !important;
    font-size: 0.9rem !important;
}

/* ── Subcategory entries (indented, smaller) ── */
.journey-sub {
    margin-left: 28px;           /* indent under the main entry */
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 3px dashed var(--sand, #e8ddd0);
}

.sub-item {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    margin-bottom: 10px;
    align-items: start;
    padding: 6px 8px 6px 0;
    border-radius: 6px;
    cursor: default;
    transition: background 0.2s;
}

/* smaller hollow dot for sub-items */
.sub-item::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 12px;
    width: 7px;
    height: 7px;
    background: var(--cream);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.sub-item.highlight,
.sub-item:hover { background: var(--warm-bg); padding-left: 8px; }

.sub-year {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.9rem;
    padding-top: 2px;
    white-space: nowrap;
}

.sub-content h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bark);
}

.sub-content p {
    margin: 1px 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.sub-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--warm-bg);
    color: var(--accent);
    border: 1px solid var(--sand);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    margin-top: 3px;
}

/* spacer between main entries */
.journey-gap { height: 18px; }

/* Column 3, Map */
.europe-map {
    position: relative;
    width: 100%;
    line-height: 0;
    margin-top: 150px;
}

.europe-map img.map-base {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--sand, #e8ddd0);
}

.map-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* dots — hoverable */
.map-dot {
    transition: r 0.25s ease, filter 0.25s ease;
    pointer-events: all;
    cursor: pointer;
}
.map-dot.active {
    filter: drop-shadow(0 0 7px #c0714f);
}

/* label groups — hoverable */
.map-label-group {
    pointer-events: all;
    cursor: pointer;
}
.map-label-group text {
    font-size: 20px;
    font-weight: 600;
    fill: var(--bark, #4a3728);
    transition: fill 0.2s;
}
.map-label-group:hover text,
.map-label-group.active text {
    fill: var(--terracotta, #c0714f);
}

/* label hit-area rect (invisible, just for pointer events) */
.map-label-group rect {
    fill: transparent;
    pointer-events: all;
}

/* ══════════════════════════════
    GALLERY PAGE
══════════════════════════════ */
.gallery-intro { color: var(--muted); max-width: 560px; margin-bottom: 2.5rem; font-size: 0.95rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.gallery-item {
    border-radius: 12px; overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--sand);
    position: relative;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: 0 12px 32px rgba(74,55,40,0.15); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--muted); font-size: 0.78rem; gap: 0.4rem;
    background: linear-gradient(135deg, var(--sand), var(--warm-bg));
}
.gallery-placeholder svg { opacity: 0.3; }
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(46,35,24,0.75));
    color: white; font-size: 0.78rem; padding: 0.8rem 0.8rem 0.6rem;
    opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

/* lightbox */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(30,20,12,0.92); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
    position: absolute; top: 1.5rem; right: 2rem;
    color: white; font-size: 2rem; cursor: pointer; line-height: 1;
    background: none; border: none; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* ══════════════════════════════
    CONTACT PAGE
══════════════════════════════ */
.contact-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.contact-copy p { color: var(--muted); margin-bottom: 1rem; font-size: 1rem; }
.contact-copy p:first-child { color: var(--text); font-size: 1.05rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 2rem; }
.contact-link {
    display: flex; align-items: center; gap: 0.7rem;
    text-decoration: none; color: var(--bark);
    border: 1px solid var(--sand); background: var(--white);
    padding: 0.85rem 1.2rem; border-radius: 10px;
    font-size: 0.9rem; transition: all 0.2s;
}
.contact-link:hover { border-color: var(--terracotta); color: var(--terracotta); background: var(--cream); transform: translateX(4px); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-size: 0.82rem; font-weight: 500; color: var(--bark); margin-bottom: 0.2rem; display: block; }
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid var(--sand); border-radius: 8px;
    background: var(--white); color: var(--text);
    font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
    transition: border-color 0.2s; outline: none; resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--terracotta); }
.contact-form textarea { min-height: 130px; }

/* ══════════════════════════════
    FOOTER
══════════════════════════════ */
footer {
    text-align: center; padding: 1.6rem;
    color: var(--muted); font-size: 0.78rem;
    border-top: 1px solid var(--sand);
}

/* ══════════════════════════════
    RESPONSIVE
══════════════════════════════ */
@media (max-width: 1050px) {
    .journey-grid { grid-template-columns: 1fr 1fr; }
    nav { padding: 1rem 1.5rem; }
    .nav-links { gap: 1.2rem; }
}
@media (max-width: 900px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { gap: 1.2rem; }
    .home-hero { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
    .home-tagline { margin-left: auto; margin-right: auto; }
    .home-btns { justify-content: center; }
    .home-photo { order: -1; }
    .photo-frame { width: 200px; height: 250px; }
    .home-about { grid-template-columns: 1fr; gap: 2rem; }
    #page-home { padding: 6rem 1.5rem 3rem; }
    .inner-page { padding: 6rem 1.5rem 4rem; }
    .research-grid { grid-template-columns: 1fr; }
    .cv-layout { grid-template-columns: 1fr; }
    .contact-body { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 700px) {
.journey-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 0.9rem; }
    .nav-links a { font-size: 0.75rem; }
}