:root {
  --bg: #f5f2ea;
  --paper: #fbfaf6;
  --ink: #1d211f;
  --muted: #6e746f;
  --line: rgba(29, 33, 31, 0.14);
  --accent: #314f46;
  --accent-soft: #dce6df;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  z-index: 20;
}

.site-header {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  white-space: nowrap;
  font-family: "Libre Franklin", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 24px; }
.nav { display: flex; gap: 28px; font-size: .9rem; color: var(--muted); }
.lang-toggle { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .75rem; letter-spacing: .08em; padding: 8px 0; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.lang-option { transition: color .2s ease, opacity .2s ease; opacity: .5; }
.lang-option.active { color: var(--ink); opacity: 1; font-weight: 600; }
.lang-divider { opacity: .35; }
.nav a { transition: color .2s ease; }
.nav a:hover { color: var(--ink); }

main { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.section-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
}
.hero {
  grid-template-columns: 1.45fr .55fr;
  min-height: calc(100vh - 90px);
  align-items: center;
  gap: 80px;
  padding: 80px 0;
}
.eyebrow {
  margin: 0 0 24px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
}
.hero h1,
.section-content h2,
.projects-heading h2,
.contact-section h2,
.quote-section p {
  font-family: "Libre Franklin", sans-serif;
  font-weight: 500;
  letter-spacing: -.045em;
}
.hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.85rem, 5.25vw, 5.35rem);
  line-height: 1.035;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-text {
  max-width: 760px;
  margin: 38px 0 0;
  font-size: 1.08rem;
  color: var(--muted);
}
.hero-actions { display: flex; gap: 14px; margin-top: 34px; }
.button {
  padding: 13px 18px;
  border: 1px solid var(--ink);
  font-size: .9rem;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.ghost { border-color: var(--line); }

.hero-card {
  border-left: 1px solid var(--line);
  padding-left: 34px;
}
.portrait-frame {
  aspect-ratio: 4 / 5;
  background: var(--accent-soft);
  overflow: hidden;
  margin-bottom: 24px;
}
.portrait-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  color: var(--accent);
}
.hero-meta { display: grid; gap: 18px; font-size: .9rem; }
.hero-meta > div { display: grid; gap: 3px; }
.meta-label { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .12em; }
.inline-links { display: flex; gap: 14px; }
.inline-links a, .text-link, .project-copy a, .footer-links a { text-decoration: underline; text-decoration-color: rgba(29,33,31,.25); text-underline-offset: 4px; }

.content-section { padding: 130px 0; border-top: 1px solid var(--line); }
.section-index { font-size: .78rem; color: var(--muted); padding-top: 6px; }
.section-content h2, .projects-heading h2 {
  margin: 0 0 52px;
  max-width: 850px;
  font-size: clamp(2rem, 3.2vw, 3.55rem);
  line-height: 1.08;
}
.two-col-text { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 940px; font-size: 1.08rem; color: var(--muted); }
.two-col-text strong { color: var(--ink); }

.research-list { border-top: 1px solid var(--line); }
.research-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.research-number { color: var(--accent); font-family: "Libre Franklin"; font-weight: 600; }
.research-item h3 { margin: 0 0 7px; font-size: 1.35rem; font-weight: 500; }
.research-item p { margin: 0; color: var(--muted); max-width: 760px; }

.projects-section { border-top: 1px solid var(--line); }
.projects-heading { max-width: 980px; margin-bottom: 52px; }
.project-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; }
.project-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}
.project-card-large { grid-row: span 2; }
.project-visual { min-height: 260px; display: grid; place-items: center; overflow: hidden; background: var(--accent-soft); }
.project-card-large .project-visual { min-height: 520px; }
.project-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card-large .project-image-wrap img { min-height: 520px; }
.project-image-pair { grid-template-columns: 1fr 1fr; min-height: 260px; }
.project-image-pair img { width: 100%; height: 100%; min-width: 0; object-fit: cover; display: block; }
.project-links { display: flex; flex-wrap: wrap; gap: 18px; }
.gradient-one { background: radial-gradient(circle at 20% 20%, #8fa59a 0, transparent 30%), linear-gradient(135deg, #213c35, #9a7657); }
.gradient-two { background: linear-gradient(150deg, #342d45, #7d6d82 55%, #ccbfa4); }
.gradient-three { background: linear-gradient(145deg, #8b5e4c, #d3ad85 55%, #253a3b); }
.project-copy { padding: 26px; }
.project-copy h3 { margin: 5px 0 8px; font-size: 1.5rem; font-weight: 500; }
.project-copy p { color: var(--muted); }
.project-type { margin: 0; font-size: .73rem; text-transform: uppercase; letter-spacing: .12em; }

.publication-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.publication-list { border-top: 1px solid var(--line); }
.publication {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  gap: 25px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.pub-year { color: var(--accent); font-size: .82rem; padding-top: 4px; }
.publication h3 { margin: 0 0 7px; font-weight: 500; font-size: 1.16rem; }
.publication p { margin: 2px 0; color: var(--muted); font-size: .92rem; }
.pub-venue { font-style: italic; }
.pub-link { font-size: 1.25rem; }

.quote-section {
  padding: 132px 0;
  border-top: 1px solid var(--line);
}
.quote-section p {
  margin: 0;
  max-width: 960px;
  font-size: clamp(2rem, 3.65vw, 3.9rem);
  line-height: 1.09;
}
.quote-section em { font-style: normal; color: var(--accent); }

.contact-section {
  padding: 130px 0 100px;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  margin: 0 0 28px;
  max-width: 800px;
  font-size: clamp(2.05rem, 3.8vw, 3.9rem);
  line-height: 1.07;
}

/* Contact links */
.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-top: 4px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent);
  font-size: .95rem;
  line-height: 1.4;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}

.contact-icon {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex: 0 0 17px;
}

.email-icon {
  width: 16px;
  height: 16px;
}

.contact-link:hover {
  opacity: .72;
  transform: translateY(-1px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 52px;
  color: var(--muted);
  font-size: .9rem;
}
.footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .78rem;
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }

@media (max-width: 900px) {
  .nav { display: none; }
  .header-right { gap: 0; }
  .hero { grid-template-columns: 1fr; gap: 55px; min-height: auto; }
  .hero-card { border-left: 0; border-top: 1px solid var(--line); padding: 34px 0 0; display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 28px; }
  .portrait-frame { margin-bottom: 0; }
  .section-grid { grid-template-columns: 45px 1fr; }
  .two-col-text { grid-template-columns: 1fr; gap: 10px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-large { grid-row: auto; }
  .project-card-large .project-visual { min-height: 330px; }
}

@media (max-width: 620px) {
  .site-header, main, .footer { width: min(calc(100% - 30px), var(--max)); }
  .site-header { height: 72px; }
  .hero { padding: 58px 0 80px; }
  .hero h1 { font-size: clamp(2.5rem, 11.5vw, 3.65rem); line-height: 1.04; }
  .quote-section p { font-size: clamp(1.85rem, 8.8vw, 3rem); line-height: 1.1; }
  .contact-section h2 { font-size: clamp(1.95rem, 9.2vw, 3.2rem); }
  .hero-card { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; gap: 16px; }
  .section-index { display: none; }
  .content-section { padding: 90px 0; }
  .publication-heading { align-items: start; flex-direction: column; }
  .publication { grid-template-columns: 48px 1fr 25px; gap: 12px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { text-align: center; }
  .footer { flex-direction: column; }
}

/* v4: real portrait */
.portrait-photo { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 28%; }
.pub-link.muted { opacity: .35; cursor: default; }

/* v6 refinements: quieter typography, uncropped media, and project hierarchy */
.hero h1 {
  font-size: clamp(2.45rem, 4.55vw, 4.65rem);
  line-height: 1.06;
  max-width: 880px;
}
.section-content h2,
.projects-heading h2 {
  font-size: clamp(1.85rem, 2.75vw, 3.05rem);
  line-height: 1.12;
}
.contact-section h2 {
  font-size: clamp(1.9rem, 3vw, 3.15rem);
  line-height: 1.1;
}

/* Preserve the complete portrait rather than filling/cropping the frame. */
.portrait-frame {
  aspect-ratio: 3 / 4;
  padding: 10px;
  background: var(--accent-soft);
}
.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--paper);
}

/* Preserve screenshots in full. */
.project-image-contain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}
.project-image-pair-stacked {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  min-height: 0;
  background: #111;
}
.project-image-pair-stacked img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.project-card-large .project-image-pair-stacked {
  min-height: 0;
}

@media (max-width: 620px) {
  .hero h1 {
    font-size: clamp(2.15rem, 9.8vw, 3.05rem);
    line-height: 1.08;
  }
  .section-content h2,
  .projects-heading h2 {
    font-size: clamp(1.75rem, 8vw, 2.55rem);
  }
  .contact-section h2 {
    font-size: clamp(1.8rem, 8.4vw, 2.65rem);
  }
}

/* v7: portrait uses its native 300x464 aspect ratio, with no crop or forced frame. */
.portrait-frame {
  width: min(100%, 300px);
  aspect-ratio: 300 / 464;
  padding: 0;
  margin-bottom: 24px;
  background: transparent;
  overflow: hidden;
}
.portrait-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: initial;
  object-position: initial;
  background: transparent;
}

@media (max-width: 900px) {
  .portrait-frame {
    width: min(100%, 300px);
  }
}


/* v8: more restrained project imagery and a compact Jikan diptych. */
.project-visual.project-media-compact {
  min-height: 0;
  padding: 14px;
  background: var(--accent-soft);
  overflow: hidden;
}
.project-card-large .project-visual.project-media-compact {
  min-height: 0;
}
.project-visual.project-media-compact img,
.project-card-large .project-visual.project-media-compact img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 245px;
  object-fit: contain;
  display: block;
}
.project-visual.project-media-jikan img,
.project-card-large .project-visual.project-media-jikan img {
  max-height: 270px;
}

@media (max-width: 900px) {
  .project-visual.project-media-compact img,
  .project-card-large .project-visual.project-media-compact img {
    max-height: 230px;
  }
  .project-visual.project-media-jikan img,
  .project-card-large .project-visual.project-media-jikan img {
    max-height: 240px;
  }
}

@media (max-width: 620px) {
  .project-visual.project-media-compact {
    padding: 10px;
  }
  .project-visual.project-media-compact img,
  .project-card-large .project-visual.project-media-compact img,
  .project-visual.project-media-jikan img,
  .project-card-large .project-visual.project-media-jikan img {
    max-height: none;
  }
}


/* v9 — balanced portfolio layout; uses only original/user-supplied or paper-extracted figures. */

/* Smaller researcher portrait while preserving the native 300×464 ratio. */
.portrait-frame {
  width: min(100%, 220px);
  aspect-ratio: 300 / 464;
  margin: 0 auto 20px;
  padding: 0;
  background: transparent;
}
.portrait-photo {
  width: 100%;
  height: auto;
  display: block;
}

/* Three equally weighted project cards. */
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}
.project-card,
.project-card-large {
  grid-row: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.project-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-copy > a,
.project-copy .project-links {
  margin-top: auto;
  padding-top: 14px;
}

/* Consistent media window across all three projects. */
.project-visual.project-media-compact,
.project-card-large .project-visual.project-media-compact {
  height: 190px;
  min-height: 190px;
  padding: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-visual.project-media-compact img,
.project-card-large .project-visual.project-media-compact img,
.project-visual.project-media-jikan img,
.project-card-large .project-visual.project-media-jikan img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

/* Jikan is already a diptych made from the two original screenshots. */
.project-media-jikan {
  background: var(--paper);
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-visual.project-media-compact,
  .project-card-large .project-visual.project-media-compact {
    height: auto;
    min-height: 0;
  }
  .project-visual.project-media-compact img,
  .project-card-large .project-visual.project-media-compact img,
  .project-visual.project-media-jikan img,
  .project-card-large .project-visual.project-media-jikan img {
    width: 100%;
    height: auto;
  }
  .portrait-frame {
    width: min(58vw, 190px);
  }
}

/* v10 — real-figure presentation only. The Climate and Bubble assets are
   cropped versions of the original supplied/paper figures, removing only
   their side gutters/bars. No generated imagery is used. */
.project-card:not(.project-card-large) .project-visual.project-media-compact img {
  object-fit: cover;
}

/* v12 — academic credentials in the header are intentionally secondary. */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .48rem;
}
.brand-credentials {
  font-family: "Libre Franklin", sans-serif;
  font-size: .62em;
  font-weight: 500;
  letter-spacing: .015em;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 620px) {
  .brand { gap: .34rem; }
  .brand-credentials { font-size: .54em; }
}

/* v13 — align portrait with profile metadata and soften the profile column composition. */
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.portrait-frame {
  width: min(100%, 205px);
  margin: 0 0 22px 34px;
}
.hero-meta {
  width: 100%;
}
@media (max-width: 900px) {
  .portrait-frame {
    width: min(52vw, 190px);
    margin-left: 0;
  }
}

/* v14 — centered profile portrait and simpler About composition. */

/* Center the portrait within the full profile column, while keeping metadata left-aligned. */
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.portrait-frame {
  width: min(100%, 205px);
  margin: 0 auto 24px;
  align-self: center;
}
.hero-meta {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

/* About: one concise readable column instead of two competing columns. */
.about-text-single {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}
.about-text-single p {
  margin: 0;
}

@media (max-width: 900px) {
  .portrait-frame {
    width: min(52vw, 190px);
    margin-left: auto;
    margin-right: auto;
  }
  .hero-meta {
    max-width: none;
  }
}

/* v15 — expanded publications and award highlights. */
.pub-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.pub-title-row h3 { flex: 1 1 420px; }
.award-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 8px;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .award-badge { margin-top: 2px; }
}

/* v16 — internal HTML CV page */
.cv-page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 120px;
}
.cv-hero {
  max-width: 820px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.cv-hero h1 {
  margin: 8px 0 14px;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}
.cv-lead {
  max-width: 720px;
  font-size: 1.15rem;
  color: var(--muted);
}
.cv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
}
.cv-links a,
.cv-more a,
.cv-back a {
  text-decoration: underline;
  text-decoration-color: rgba(29,33,31,.25);
  text-underline-offset: 4px;
}
.cv-section {
  max-width: 920px;
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}
.cv-section h2 {
  margin: 0 0 30px;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -.035em;
}
.cv-section > p {
  max-width: 790px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}
.cv-entry,
.cv-pub {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.cv-entry:first-of-type,
.cv-pub:first-of-type { border-top: 0; }
.cv-year,
.cv-pub > span:first-child {
  color: var(--accent);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cv-entry h3 {
  margin: 0 0 7px;
  font-size: 1.08rem;
  font-weight: 600;
}
.cv-entry p,
.cv-pub div {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.cv-pub strong { color: var(--ink); font-weight: 500; }
.cv-more { margin-top: 24px !important; }
.cv-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.85;
}
.cv-skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px 28px;
}
.cv-skills div {
  display: grid;
  gap: 4px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.cv-skills span { color: var(--muted); }
.cv-back { margin-top: 48px; }
.cv-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}
@media (max-width: 700px) {
  .cv-page { width: min(100% - 28px, 1120px); padding-top: 64px; }
  .cv-entry, .cv-pub { grid-template-columns: 1fr; gap: 7px; }
  .cv-skills { grid-template-columns: 1fr; }
}

/* v17 — CV polish and portrait alignment */
.cv-hero h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.8rem);
  line-height: 1.04;
}

/* More comfortable spacing for the CV-page navigation. */
.cv-page + .site-footer {}
body .site-header .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
}
body .site-header .nav-links a {
  padding: 5px 0;
}

/* Move the homepage portrait slightly left without resizing/cropping it. */
.hero-card .portrait-frame {
  transform: translateX(-14px);
}
@media (max-width: 900px) {
  .hero-card .portrait-frame {
    transform: none;
  }
}

.cv-body .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cv-body .site-header .nav-links {
  gap: 16px 28px;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .cv-body .site-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .cv-body .site-header .nav-links {
    gap: 10px 18px;
    justify-content: flex-start;
  }
}

/* v20 — subtle inline-link emphasis, especially in About copy. */
.about-text-single a,
.about-en a,
.about-pt a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color .18s ease, opacity .18s ease;
}
.about-text-single a:hover,
.about-en a:hover,
.about-pt a:hover {
  text-decoration-color: var(--accent);
}

/* v21 — About hyperlinks: accent color only, no underline. */
.about-text-single a,
.about-en a,
.about-pt a,
.about-text-single a:hover,
.about-en a:hover,
.about-pt a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* v24 — slightly quieter hero statement. */
.hero h1 {
  font-size: clamp(2.05rem, 3.75vw, 3.85rem);
  line-height: 1.08;
  max-width: 820px;
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: clamp(1.95rem, 9vw, 2.85rem);
    line-height: 1.1;
  }
}

.disabled-link {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* v25 — intermediate tablet / foldable layout.
   Keeps desktop (>1100px) and existing <=900px rules unchanged. */
@media (min-width: 901px) and (max-width: 1100px) {

  .nav {
    display: none;
  }

  .header-right {
    gap: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: auto;
  }

  .hero-card {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 34px 0 0;
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 32px;
    align-items: start;
  }

  .portrait-frame {
    width: 180px;
    margin: 0;
    transform: none;
  }

  .hero-meta {
    max-width: none;
    margin: 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card-large {
    grid-row: auto;
  }
}

/* Fix for intermediate tablet / foldable screens */
@media (min-width: 700px) and (max-width: 1200px) {

  .hero {
    display: block;
    width: 100%;
  }

  .hero-main {
    width: 100%;
    max-width: none;
  }

  .hero h1 {
    width: 100%;
    max-width: 900px;
  }

  .hero-text {
    width: 100%;
    max-width: 760px;
  }

  .hero-actions {
    width: auto;
  }

  .hero-card {
    width: 100%;
    margin-top: 48px;
  }
}

/* Fix hero layout on intermediate tablet/foldable widths */
@media (min-width: 621px) and (max-width: 900px) {
  .hero.section-grid {
    grid-template-columns: 1fr;
  }
}
