/* ───────── English page: an editorial portfolio-résumé ─────────
   One grid runs down the whole page: a narrow label column and a
   reading column. Hairlines, serif display type, one dot of vermilion. */

.tpl--en {
  --col-label: 11rem;
  --col-gap: clamp(1.5rem, 5vw, 4.5rem);
  --measure: 40rem;
  font-feature-settings: 'cv11', 'ss01', 'calt';
  line-height: 1.65;
}
.tpl--en h1,
.tpl--en h2,
.tpl--en h3 {
  font-weight: 400;
  text-wrap: balance;
}
.tpl--en p,
.tpl--en li {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Header nav: eight short labels — tighten slightly on mid widths */
@media (max-width: 1040px) {
  :root[lang='en'] .site-nav {
    gap: var(--sp-4);
    font-size: var(--fs-xs);
  }
  :root[lang='en'] .site-header__inner {
    gap: var(--sp-4);
  }
}

/* ── Links ── */
.tpl--en .link {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 0.1em;
  transition: color 0.2s ease;
}
.tpl--en .link:hover {
  color: var(--accent-ink);
}
.tpl--en .arr {
  display: inline-block;
  margin-left: 0.25em;
  font-size: 0.85em;
  color: var(--ink-3);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}
.tpl--en a:hover .arr {
  transform: translate(2px, -2px);
  color: var(--accent);
}
.tpl--en .print-url {
  display: none;
}

/* ── Hero ── */
.tpl--en .hero {
  padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 6vw, 5rem);
}
.tpl--en .hero__hi {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.2;
  color: var(--ink-3);
  margin-bottom: 0.35em;
}
.tpl--en .hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 1.2rem + 11.5vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-left: -0.04em;
  overflow-wrap: break-word;
}
.tpl--en .hero__dot {
  color: var(--accent);
}
.tpl--en .hero__grid {
  display: grid;
  grid-template-columns: var(--col-label) minmax(0, 1fr);
  column-gap: var(--col-gap);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-strong);
}
.tpl--en .hero__meta {
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding-top: 0.5rem;
}
.tpl--en .hero__role {
  font-weight: 600;
  color: var(--ink);
}
.tpl--en .hero__loc {
  color: var(--ink-3);
  margin-top: 0.15rem;
}
.tpl--en .hero__pitch {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20em;
  text-wrap: balance;
}
.tpl--en .hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-6);
  margin-top: var(--sp-6);
}

/* ── Section frame ── */
.tpl--en .sec__grid {
  display: grid;
  grid-template-columns: var(--col-label) minmax(0, 1fr);
  column-gap: var(--col-gap);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
}
.tpl--en .sec__grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}
.tpl--en .sec__head {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
}
.tpl--en .sec__title {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink);
  padding-top: 0.45rem;
  text-wrap: wrap;
}
.tpl--en .sec__no {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}

/* ── About ── */
.tpl--en .prose {
  max-width: var(--measure);
  color: var(--ink-2);
}
.tpl--en .prose p + p {
  margin-top: var(--sp-4);
}
.tpl--en .prose .lede {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.35;
  color: var(--ink);
}

/* ── Experience ── */
.tpl--en .entry + .entry {
  margin-top: var(--sp-7);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--line);
}
.tpl--en .entry__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-5);
}
.tpl--en .entry__title,
.tpl--en .project__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.tpl--en .entry__org {
  margin-top: 0.3rem;
  font-weight: 500;
  color: var(--ink);
}
.tpl--en .entry__org span + .sep + span {
  font-weight: 400;
  color: var(--ink-3);
}
.tpl--en .sep {
  color: var(--ink-3);
}
.tpl--en .entry__dates,
.tpl--en .row__when {
  flex: none;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  white-space: nowrap;
}
.tpl--en .now {
  color: var(--ink);
  font-weight: 500;
}
.tpl--en .now::before {
  content: '';
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.12em;
}
.tpl--en .entry__summary {
  margin-top: var(--sp-4);
  max-width: var(--measure);
  color: var(--ink-2);
}
.tpl--en .bullets {
  margin-top: var(--sp-3);
  max-width: var(--measure);
}
.tpl--en .bullets li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink);
}
.tpl--en .bullets li + li {
  margin-top: 0.35rem;
}
.tpl--en .bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.7rem;
  border-top: 1px solid var(--ink-3);
}
.tpl--en .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--sp-5);
}
.tpl--en .stack .chip {
  background: transparent;
  white-space: normal;
}

/* ── Projects ── */
.tpl--en .projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--sp-7);
  row-gap: var(--sp-7);
}
.tpl--en .project {
  display: flex;
  flex-direction: column;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-strong);
}
.tpl--en .project__meta {
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--sp-3);
}
.tpl--en .project__summary {
  margin-top: var(--sp-3);
  color: var(--ink-2);
}
.tpl--en .project .bullets {
  font-size: var(--fs-sm);
}
.tpl--en .project .stack {
  margin-top: var(--sp-4);
}
.tpl--en .project__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: auto;
  padding-top: var(--sp-5);
}

/* ── Skills ── */
.tpl--en .skills__row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  column-gap: var(--sp-5);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}
.tpl--en .skills__row:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}
.tpl--en .skills__row:last-child {
  padding-bottom: 0;
}
.tpl--en .skills dt {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  padding-top: 0.1em;
}
.tpl--en .inline {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
}
.tpl--en .inline li:not(:last-child)::after {
  content: '·';
  margin-inline: 0.6em;
  color: var(--ink-3);
}

/* ── Rows (education, awards) ── */
.tpl--en .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-5);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
}
.tpl--en .row:first-child {
  border-top: 0;
  padding-top: 0.1rem;
}
.tpl--en .row:last-child {
  padding-bottom: 0;
}
.tpl--en .row__title {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.4;
}
.tpl--en .row__sub {
  margin-top: 0.15rem;
  color: var(--ink-2);
}
.tpl--en .row__note {
  margin-top: 0.15rem;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

/* ── Languages ── */
.tpl--en .langs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--sp-5) var(--sp-6);
}
.tpl--en .lang__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.2;
}
.tpl--en .lang__level {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

/* ── Contact ── */
.tpl--en .sec--contact .sec__grid {
  padding-bottom: clamp(1rem, 3vw, 2rem);
}
.tpl--en .sec--contact .sec__grid::before {
  border-top-color: var(--line-strong);
}
.tpl--en .contact__lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.2;
  color: var(--ink-3);
}
.tpl--en .contact__email {
  margin-top: 0.1em;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1rem + 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.tpl--en .contact__email a {
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}
.tpl--en .contact__email a:hover,
.tpl--en .contact__email a:focus-visible {
  color: var(--ink);
  background-size: 100% 2px;
}
.tpl--en .contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-6);
  margin-top: var(--sp-6);
}

/* ── Tablet & down: label column folds above the content ── */
@media (max-width: 860px) {
  .tpl--en .sec__grid,
  .tpl--en .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tpl--en .sec__head {
    position: static;
    margin-bottom: var(--sp-5);
  }
  .tpl--en .sec__title {
    padding-top: 0;
  }
  .tpl--en .sec__no {
    display: inline;
    margin-right: 0.75em;
  }
  .tpl--en .hero__meta {
    padding-top: 0;
    margin-bottom: var(--sp-5);
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6em;
  }
  .tpl--en .hero__loc {
    margin-top: 0;
  }
  .tpl--en .hero__loc::before {
    content: '·';
    margin-right: 0.6em;
  }
}
@media (max-width: 640px) {
  .tpl--en .projects {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--sp-6);
  }
  .tpl--en .entry__head,
  .tpl--en .row {
    flex-direction: column;
  }
  .tpl--en .entry__dates {
    order: -1;
    margin-bottom: 0.15rem;
  }
  .tpl--en .entry + .entry {
    margin-top: var(--sp-6);
    padding-top: var(--sp-6);
  }
  .tpl--en .skills__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.1rem;
  }
  .tpl--en .langs {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpl--en .arr,
  .tpl--en .contact__email a {
    transition: none;
  }
}

/* ── Print: a clean one-to-two page résumé ── */
@media print {
  @page {
    margin: 14mm 15mm;
  }
  .tpl--en {
    --col-label: 7.5rem;
    --col-gap: 1.25rem;
    --measure: none;
    --gutter: 0;
    --fs-xs: 8pt;
    --fs-sm: 9pt;
    --fs-md: 10pt;
    --fs-lg: 11pt;
    --fs-xl: 13pt;
    font-size: 10pt;
    line-height: 1.45;
  }
  .tpl--en .now::before {
    content: none;
  }
  .tpl--en .wrap {
    max-width: none;
    padding-inline: 0;
  }
  .tpl--en .hero {
    padding-block: 0 0.9rem;
  }
  .tpl--en .hero__hi,
  .tpl--en .arr,
  .tpl--en .sec__no,
  .tpl--en .sec--contact {
    display: none;
  }
  .tpl--en .hero__name {
    font-size: 30pt;
    line-height: 1;
    margin-left: 0;
  }
  .tpl--en .hero__grid {
    grid-template-columns: var(--col-label) minmax(0, 1fr);
    margin-top: 0.6rem;
    padding-top: 0.5rem;
  }
  .tpl--en .hero__meta {
    display: block;
    margin: 0;
    padding-top: 0.1rem;
    font-size: 8.5pt;
  }
  .tpl--en .hero__loc::before {
    content: none;
  }
  .tpl--en .hero__pitch {
    font-size: 14pt;
    line-height: 1.2;
    max-width: none;
  }
  .tpl--en .hero__links {
    margin-top: 0.4rem;
    gap: 0.1rem 1.25rem;
  }
  .tpl--en .link {
    background: none;
    padding: 0;
    font-size: 8.5pt;
    font-weight: 400;
  }
  .tpl--en .print-url {
    display: inline;
    color: var(--ink-3);
  }
  .tpl--en .sec__grid {
    grid-template-columns: var(--col-label) minmax(0, 1fr);
    padding-block: 0.7rem;
  }
  .tpl--en .sec__head {
    position: static;
    margin: 0;
  }
  .tpl--en .sec__title {
    font-size: 7.5pt;
    padding-top: 0.2rem;
  }
  .tpl--en .prose .lede {
    font-family: var(--font-sans);
    font-size: inherit;
    line-height: inherit;
    color: var(--ink-2);
  }
  .tpl--en .prose p + p {
    margin-top: 0.3rem;
  }
  .tpl--en .entry,
  .tpl--en .project,
  .tpl--en .row,
  .tpl--en .skills__row {
    break-inside: avoid;
  }
  .tpl--en .sec__head {
    break-after: avoid;
  }
  .tpl--en .entry + .entry {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }
  .tpl--en .entry__head,
  .tpl--en .row {
    flex-direction: row;
  }
  .tpl--en .entry__dates {
    order: 0;
    margin: 0;
    font-size: 8.5pt;
  }
  .tpl--en .row__when {
    font-size: 8.5pt;
  }
  .tpl--en .entry__title,
  .tpl--en .project__name {
    font-size: 15pt;
  }
  .tpl--en .entry__org {
    margin-top: 0.1rem;
  }
  .tpl--en .entry__summary,
  .tpl--en .project__summary {
    margin-top: 0.3rem;
  }
  .tpl--en .bullets {
    margin-top: 0.25rem;
  }
  .tpl--en .bullets li {
    padding-left: 1.1rem;
  }
  .tpl--en .bullets li + li {
    margin-top: 0.1rem;
  }
  .tpl--en .stack {
    margin-top: 0.35rem !important;
    gap: 0;
  }
  .tpl--en .stack .chip {
    border: 0;
    padding: 0;
    font-size: 8pt;
    color: var(--ink-3);
  }
  .tpl--en .stack .chip:not(:last-child)::after {
    content: '·';
    margin-inline: 0.45em;
  }
  .tpl--en .projects {
    display: block;
  }
  .tpl--en .project {
    display: block;
    padding-top: 0;
    border-top: 0;
  }
  .tpl--en .project + .project {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--line);
  }
  .tpl--en .project__meta {
    margin-bottom: 0.15rem;
    font-size: 8pt;
  }
  .tpl--en .project__links {
    padding-top: 0.3rem;
    gap: 0 1rem;
  }
  .tpl--en .skills__row {
    grid-template-columns: 8rem minmax(0, 1fr);
    padding-block: 0.2rem;
    border-top: 0;
  }
  .tpl--en .skills dt {
    font-size: inherit;
  }
  .tpl--en .row {
    padding-block: 0.35rem;
  }
  .tpl--en .langs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1.5rem;
  }
  .tpl--en .lang__name {
    font-family: var(--font-sans);
    font-size: inherit;
    font-weight: 600;
  }
  .tpl--en .lang__level {
    margin-top: 0;
    font-size: 8.5pt;
  }
}
