/* ==========================================================================
   Fonts: Archivo (variable, 400–800), self-hosted, split by unicode range
   ========================================================================== */

/* vietnamese */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/archivo-vietnamese.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
    U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --accent: #ec3013;
  --accent-dark: #ae1800;   /* links, hover on accent buttons */
  --accent-ink: #7c1405;    /* text on the pale accent tint */
  --accent-tint: #ffc4b8;   /* selection, Films heading */
  --hover: #ffe0d9;         /* hover on links and summaries */
  --hover-row: #fff2ef;     /* hover on book and film rows */

  --bg: #f3f2f2;
  --surface-alt: #eae9e9;
  --line: #201e1d;          /* 2px rules between blocks */
  --line-soft: #d7d3d3;     /* rules inside an open entry, cover shadows, map land */
  --ink: #201e1d;
  --text-soft: #444141;
  --muted: #605d5d;
  --white: #ffffff;
}

/* ==========================================================================
   Base
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
a {
  color: var(--accent-dark);
  text-decoration: none;
}
a:hover {
  color: var(--ink);
  background: var(--hover);
}
::selection {
  background: var(--accent-tint);
}
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
img,
iframe,
svg {
  max-width: 100%;
}
iframe {
  border: 0;
  display: block;
}

.page {
  min-height: 100%;
  background: var(--bg);
}

/* Small grey label used all over: "4 jobs", "Own practice", "Cities", ... */
.meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Two-column layout (main + aside); collapses to one column under 860px */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}

.weather {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  min-height: 44px;
  font-size: 12.5px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: stretch;
}
.nav-link {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-left: 2px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.nav-link:hover {
  background: var(--hover);
}
.nav-link--cta {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
}
.nav-link--cta:hover {
  background: var(--accent-dark);
  color: var(--white);
}

.archive-note {
  padding: 8px 24px;
  border-bottom: 2px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  border-bottom: 2px solid var(--line);
}
.hero-main {
  padding: 40px 24px 28px;
  border-right: 2px solid var(--line);
}
.hero-kicker {
  margin: 0 0 18px;
}
.hero-name {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  margin: 26px 0 0;
  max-width: 46ch;
  font-size: 19px;
  line-height: 1.5;
  text-wrap: pretty;
}
.hero-sub {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}

.hero-index {
  display: flex;
  flex-direction: column;
}
.index-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 2px solid var(--line);
  color: var(--ink);
}
.index-link:hover {
  background: var(--hover);
  color: var(--ink);
}
.index-link__label {
  font-size: 20px;
  font-weight: 600;
}
.index-hint {
  flex: 1;
  min-height: 90px;
  padding: 16px 24px;
  background: var(--surface-alt);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}
.accent-plus {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  border-bottom: 2px solid var(--line);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 22px 24px 14px;
}
.section-head--tight {
  gap: 12px;
}
.section-head--places {
  gap: 12px;
  padding-bottom: 16px;
}

.section-title {
  display: inline-block;
  margin: 0;
  padding: 4px 10px 5px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.section-title--dark {
  background: var(--ink);
  color: var(--white);
}
.section-title--accent {
  background: var(--accent);
  color: var(--white);
}
.section-title--tint {
  background: var(--accent-tint);
  color: var(--accent-ink);
  box-shadow: inset 0 -4px 0 var(--accent);
}
.section-title--outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}

.section-intro {
  margin: 0;
}
.section-intro--prose {
  max-width: 54ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
}

.section-note {
  border-top: 2px solid var(--line);
  padding: 14px 24px 18px;
}
.section-note p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   Expandable entries (Work and Places)
   ========================================================================== */

.entry {
  border-top: 2px solid var(--line);
}
.entry-summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
}
.entry-summary:hover {
  background: var(--hover);
}
.entry--place .entry-summary {
  padding: 16px 24px;
}

.toggle {
  flex: none;
  width: 14px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.18s ease;
}
.entry--place .toggle {
  font-size: 17px;
}
details[open] .toggle {
  transform: rotate(45deg);
}

.entry-title {
  flex: 1 1 240px;
  min-width: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.entry--place .entry-title {
  flex: 1 1 200px;
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -0.02em;
}
.entry-meta {
  flex: none;
}

/* Work entry body */
.entry-body {
  border-top: 2px solid var(--line-soft);
}
.entry-main {
  padding: 18px 24px 26px;
  border-right: 2px solid var(--line-soft);
}
.entry-text {
  margin: 0;
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
.entry-text strong {
  font-weight: 700;
}
.entry-text--secondary {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--text-soft);
  text-wrap: wrap;
}
.entry-aside {
  padding: 18px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project {
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  font-size: 15px;
  font-weight: 600;
}
.aside-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* ==========================================================================
   Books and Films
   ========================================================================== */

.book-row {
  display: grid;
  grid-template-columns: 76px minmax(150px, 0.85fr) minmax(0, 1.9fr);
  gap: 0 24px;
  align-items: start;
  padding: 16px 24px;
  border-top: 2px solid var(--line);
}
.book-row--film {
  grid-template-columns: 62px minmax(150px, 0.85fr) minmax(0, 1.9fr);
}
.book-row--alt {
  background: var(--surface-alt);
}
.book-row:hover {
  background: var(--hover-row);
}

.cover {
  transition: transform 0.2s ease;
}
.cover--tilt-left {
  transform: rotate(-0.7deg);
}
.cover--tilt-right {
  transform: rotate(0.8deg);
}
/* Covers lift on hover; tilted book covers also straighten. */
.book-row:hover .cover {
  transform: translateY(-3px) rotate(0deg) scale(1.06);
}
.cover-img {
  display: block;
  width: 76px;
  height: 114px;
  object-fit: cover;
  box-shadow: 3px 3px 0 var(--line-soft);
}
.cover-img--poster {
  width: 62px;
  height: 93px;
}

.book-title {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.book-byline {
  margin: 0;
}
.note {
  margin: 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

/* ==========================================================================
   Places: map and country list
   ========================================================================== */

.map-panel {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--bg);
}
#mapwrap {
  position: relative;
  width: 100%;
  height: min(58vw, 440px);
}
#mapwrap svg {
  display: block;
  cursor: grab;
  user-select: none;
  /* vertical swipes still scroll the page; horizontal swipes turn the globe */
  touch-action: pan-y;
}
#mapwrap svg.is-dragging {
  cursor: grabbing;
}
#mapwrap .is-visited {
  cursor: pointer;
}
.map-msg {
  margin: 0;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0 24px 14px;
}
.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  vertical-align: -1px;
  margin-right: 6px;
}

.place-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.place-body {
  border-top: 2px solid var(--line-soft);
  padding: 16px 24px 24px;
}
.place-facts {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0 0 14px;
}
.place-cities {
  font-size: 14px;
}
.place-text {
  margin: 0;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
.places-foot {
  border-top: 2px solid var(--line);
  padding: 18px 24px 22px;
  background: var(--surface-alt);
}
.places-foot p {
  margin: 0;
  max-width: 48ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--accent);
  color: var(--white);
}
.contact-main {
  padding: 44px 24px 40px;
  border-right: 2px solid var(--white);
}
.contact-label {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.85;
}
.contact-main .contact-label {
  margin-bottom: 14px;
}
.contact-title {
  margin: 0 0 20px;
  max-width: 34ch;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
}
.button--solid {
  background: var(--white);
  color: var(--ink);
}
.button--solid:hover {
  background: var(--ink);
  color: var(--white);
}
.button--outline {
  border: 2px solid var(--white);
  color: var(--white);
}
.button--outline:hover {
  background: var(--white);
  color: var(--ink);
}
.contact-aside {
  padding: 44px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-about {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
.contact-sign {
  margin: auto 0 0;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.85;
}

/* ==========================================================================
   Responsive (breakpoints as in the original)
   ========================================================================== */

@media (max-width: 780px) {
  .book-row {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 6px 16px !important;
  }
  .book-row .note {
    grid-column: 2 / -1;
  }
  .book-row .cover-img {
    width: 62px !important;
    height: 93px !important;
  }
}
@media (max-width: 700px) {
  details summary {
    flex-wrap: wrap;
  }
  details summary > span:nth-child(2) {
    flex: 1 1 100% !important;
  }
}
@media (max-width: 430px) {
  .lead {
    font-size: 17px !important;
  }
  .book-row {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
@media (max-width: 620px) {
  .weather-cond {
    display: none;
  }
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr !important;
  }
  .split > * {
    border-right: 0 !important;
  }
  .hero-name {
    font-size: clamp(30px, 9vw, 46px) !important;
  }
  .site-header {
    flex-direction: column;
    gap: 0 !important;
  }
  .weather {
    border-bottom: 2px solid var(--line);
    padding: 10px 24px !important;
    min-height: 40px !important;
  }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav a {
    flex: none;
    min-height: 46px;
    padding: 0 14px !important;
    font-size: 12px !important;
    border-left: 0 !important;
    border-right: 2px solid var(--line);
  }
  .site-nav a:last-child {
    border-right: 0;
  }
  #mapwrap {
    height: 300px !important;
  }
}
