/* Layout: a topographic map. Generated contour field in the hero (index contours every 5th line),
   career drawn as an elevation profile, projects as marked trails using Romanian trail markings. */

/* Fonts: self-hosted Google Fonts (SIL Open Font License 1.1), Latin + Latin Extended subsets only. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(assets/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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(assets/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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-400-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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-500-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-500-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;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-italic-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-italic-400-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;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-400-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;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/source-serif-4-400-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;
}

:root {
  color-scheme: light;
  --paper: #EDF0E8;
  --paper-2: #E2E8DA;
  --surface: #F7F9F3;
  --ink: #1C2620;
  --muted: #59655C;
  --line: #C9D2C1;
  --contour: #A58663;
  --contour-index: #7D5C3A;
  --water: #2E6C9C;
  --trail: #C21F32;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --duo-lo: #5A7A68;
  --dw: 850;
  --dw2: 760;

  /* Type scale: three fixed text steps around the 17px body, two heading steps, three fluid display steps */
  --fs-xs: 0.75rem;      /* 12: map labels, nav, buttons, status pills */
  --fs-sm: 0.875rem;     /* 14: metadata, captions, secondary text */
  --fs-md: 1rem;         /* 16: inputs, list titles, card text */
  --fs-body: 1.0625rem;  /* 17: running text */
  --fs-lg: 1.25rem;      /* 20: camp titles */
  --fs-xl: 1.5rem;       /* 24: route titles */
  --fs-2xl: clamp(1.5rem, 3.3vw, 2.25rem);   /* section heads, legend numbers */
  --fs-lead: clamp(1.25rem, 2.5vw, 1.75rem); /* thesis */
  --fs-display: clamp(2.6rem, 7.2vw, 5.6rem);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;

  --tap: 44px; /* minimum touch target */
  --focus: var(--water); /* one focus colour everywhere; red stays reserved for errors and the current camp */
}

.sprite { position: absolute; width: 0; height: 0; }
.skip { position: absolute; left: var(--sp-4); top: -100px; z-index: 30; display: inline-flex; align-items: center; min-height: var(--tap); background: var(--ink); color: var(--paper); padding: 0 var(--sp-4); font-family: var(--mono); font-size: var(--fs-sm); text-decoration: none; }
.skip:focus { top: var(--sp-4); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--fs-body); line-height: 1.6; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(var(--sp-4), env(safe-area-inset-left, 0px));
  padding-right: max(var(--sp-4), env(safe-area-inset-right, 0px));
}
a { color: var(--water); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
.maplabel { font-family: var(--display); font-stretch: 125%; font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }
.coord { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Hero map */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
#topo { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.55) 38%, #000 70%);
          mask-image: linear-gradient(to right, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.55) 38%, #000 70%); }
.hero .wrap { position: relative; padding-block: var(--sp-4) var(--sp-8); }
.topline { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.topline nav { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.topline nav a { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--display); font-stretch: 125%; font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink); text-decoration: none; }
.topline nav a:hover { color: var(--trail); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.7fr); gap: var(--sp-7); align-items: end; margin-top: var(--sp-8); }
.hero h1 { font-family: var(--display); font-stretch: 125%; font-weight: var(--dw); font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.01em; text-transform: uppercase; margin-top: var(--sp-4); }
.thesis { font-size: var(--fs-lead); line-height: 1.33; margin-top: var(--sp-5); max-width: 32ch; }
.thesis em { font-style: italic; color: var(--trail); }
.sub { color: var(--muted); margin-top: var(--sp-4); max-width: 56ch; }
.ctas { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); font-family: var(--display); font-stretch: 112%; font-weight: 650; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; padding: 0 var(--sp-4); border: 1.5px solid var(--ink); color: var(--ink); background: var(--surface); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { border-color: var(--trail); }
.btn.primary:hover { background: var(--trail); border-color: var(--trail); color: #fff; }
.btn:active { background: var(--paper-2); }
.btn.primary:active { background: var(--ink); border-color: var(--ink); }

/* Map inset (photo) */
.inset { margin: 0; position: relative; border: 1.5px solid var(--ink); background: var(--surface); padding: var(--sp-2); max-width: 100%; }
.inset .pic { aspect-ratio: 4 / 5; max-width: 100%; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.inset .pic picture { display: contents; }
.inset .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.duotone { position: relative; isolation: isolate; }
.pic.duotone img { filter: saturate(0.55) sepia(0.12) contrast(1.02) brightness(1.04); }
.pic.duotone::after { content: ""; position: absolute; inset: 0; background: var(--duo-lo); mix-blend-mode: soft-light; opacity: 0.45; pointer-events: none; }
.inset .cap { display: flex; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-2); }

/* Legend strip */
.legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); margin-top: var(--sp-8); }
.legend > div { padding: var(--sp-4) var(--sp-4) var(--sp-1) 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.legend > div + div { padding-left: var(--sp-4); border-left: 1px solid var(--line); }
.legend .num { font-family: var(--display); font-stretch: 125%; font-weight: var(--dw); font-size: var(--fs-2xl); line-height: 1; font-variant-numeric: tabular-nums; }
.legend .what { font-size: var(--fs-sm); color: var(--muted); line-height: 1.35; }

/* Sections */
section.block { padding-block: var(--sp-9) var(--sp-2); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: var(--sp-3); margin-bottom: var(--sp-4); }
.head h2 { font-family: var(--display); font-stretch: 125%; font-weight: var(--dw); text-transform: uppercase; font-size: var(--fs-2xl); letter-spacing: 0.02em; }
.intro { color: var(--muted); max-width: 62ch; margin-bottom: var(--sp-6); }

/* Elevation profile: horizontal on wide screens, vertical (an ascent read bottom to top) on phones */
.profile-wrap { margin-bottom: var(--sp-7); }
.profile { width: 100%; height: auto; display: block; }
.profile-v { display: none; max-width: 440px; }
.profile .grid line { stroke: var(--line); stroke-dasharray: 2 5; }
.profile .grid line.base { stroke-dasharray: none; }
.profile .area { fill: var(--paper-2); }
.profile .ridge { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.profile .wp circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.profile .wp.now circle { fill: var(--trail); stroke: var(--trail); }
.profile .wp line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.profile text { fill: var(--ink); font-family: var(--mono); font-size: 13px; }
.profile text.co { font-family: var(--display); font-stretch: 112%; font-weight: var(--dw2); text-transform: uppercase; letter-spacing: 0.06em; }
.profile .axis text { fill: var(--muted); }

.camps { border-top: 1px solid var(--line); }
.camp { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--sp-6); padding-block: var(--sp-5); border-bottom: 1px solid var(--line); }
.camp .when { display: flex; flex-direction: column; gap: var(--sp-1); }
.camp .when .yr { font-family: var(--mono); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.camp h3 { font-family: var(--display); font-stretch: 112%; font-weight: var(--dw2); font-size: var(--fs-lg); }
.camp .org { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); margin: var(--sp-1) 0 var(--sp-3); }
.camp p { max-width: 68ch; }
.camp .lesson { font-style: italic; color: var(--muted); margin-top: var(--sp-3); }
.earlier { margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-sm); max-width: 74ch; }

/* Trail markers (Romanian marking system: band, cross, triangle, dot); colours are the official marking colours */
.mk { width: 24px; height: 24px; flex: none; display: block; }
.mk rect.bg { fill: #FFFFFF; stroke: #9AA39B; stroke-width: 1; }

/* Routes */
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.route { padding: var(--sp-5) var(--sp-5) var(--sp-5) 0; display: flex; flex-direction: column; gap: var(--sp-3); border-bottom: 1px solid var(--line); min-width: 0; }
.route:nth-child(2n) { padding-left: var(--sp-5); padding-right: 0; border-left: 1px solid var(--line); }
.route .rhead { display: flex; align-items: center; gap: var(--sp-3); justify-content: space-between; flex-wrap: wrap; }
.route .rlane { display: flex; align-items: center; gap: var(--sp-3); }
.route h3 { font-family: var(--display); font-stretch: 112%; font-weight: var(--dw2); font-size: var(--fs-xl); line-height: 1.15; }
.route p { font-size: var(--fs-md); }
.route .why { font-style: italic; color: var(--muted); }
.route .gear { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.route .gear b { font-weight: 500; color: var(--ink); }
.status { font-family: var(--mono); font-size: var(--fs-xs); padding: var(--sp-1) var(--sp-2); border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.status.open { color: var(--water); }
.status.marked { color: var(--ink); }
.status.build { color: var(--trail); border-style: dashed; }

.key { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.key span { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }
.key .mk { width: 20px; height: 20px; }

.route:last-child:nth-child(odd) { grid-column: 1 / -1; padding-left: 0; border-left: none; }
/* Other trails */
.trails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-6); }
.trails ul { list-style: none; margin: 0; padding: 0; }
.trails h3 { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--display); font-stretch: 112%; font-weight: var(--dw2); font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: var(--sp-3); border-bottom: 1.5px solid var(--ink); }
.trails .mk { width: 20px; height: 20px; }
.trails li { padding-block: var(--sp-3); border-bottom: 1px solid var(--line); }
.trails li strong { display: block; font-family: var(--display); font-stretch: 105%; font-weight: 650; font-size: var(--fs-md); }
.trails li span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.trails .col { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-6); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr); gap: var(--sp-7); border-top: 1.5px solid var(--ink); padding-top: var(--sp-5); }
.cform { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.field em { font-style: normal; text-transform: none; }
.field input, .field textarea { font: inherit; font-size: var(--fs-md); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-bottom: 1.5px solid var(--ink); padding: var(--sp-3); min-height: var(--tap); border-radius: 0; width: 100%; box-sizing: border-box; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--trail); border-bottom-width: 2px; }
.fielderr { font-family: var(--mono); font-size: var(--fs-sm); color: var(--trail); }
.fielderr::before { content: "▲ "; }
.hp { display: none; }
.formfoot { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.formfoot .btn { cursor: pointer; }
.formfoot .btn[disabled] { opacity: 0.6; cursor: progress; }
.formstatus { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); }
.formstatus.ok { color: var(--water); }
.formstatus.err { color: var(--trail); }
.cside { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.cside .v { font-family: var(--mono); margin-top: var(--sp-2); }
.cside p { font-size: var(--fs-sm); color: var(--muted); }
.cside p.v { color: var(--ink); }

footer { margin-top: var(--sp-9); border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-block: var(--sp-5) var(--sp-6); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); margin-top: var(--sp-7); gap: var(--sp-6); }
  .inset { max-width: 240px; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend > div:nth-child(3) { padding-left: 0; border-left: none; }
  .legend > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .routes { grid-template-columns: minmax(0, 1fr); }
  .route, .route:nth-child(2n) { padding: var(--sp-5) 0; border-left: none; }
  .trails { grid-template-columns: minmax(0, 1fr); }
  .camp { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .contact-grid, .row2 { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
}
/* the horizontal chart's 13-unit text drops below 12px under ~1000px wide, so narrower screens get the vertical one */
@media (max-width: 1000px) {
  .profile-h { display: none; }
  .profile-v { display: block; }
}

/* 404 */
.lost { border-bottom: none; }
.lost .wrap { min-height: 80vh; }
.lost .maplabel { display: block; margin-top: var(--sp-9); }
