*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: 700;
}

body {
    background: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    margin: 0 5vw;
}

  .navbar {
      width: 90%;
      max-width: 1100px;
      margin: 0 auto;
      height: 80px;

      display: flex;
      align-items: center;

      border-bottom: 2px solid white;
  }

  .nav-links {
      display: flex;
      justify-content: space-between;
      align-items: center;

      width: 100%;
      gap: 0;
      padding: 0 20px;
  }
.logo {
    font-size: 20px;
    font-weight: bold;
    
}

.nav-links a {
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #8b5cf6;
}

.nav-links .active {
    color: #fff;
}
.hero {
    min-height: calc(100vh - 80px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 40px 20px;
}

.intro {
font-size: clamp(40px, 5vw, 70px);
    color: #aaa;
    margin-bottom: 10px;
}

.hero {
height: 60vw;
overflow: hidden;
}
.hero-name{
    font-size: 15vw;
    text-align: center;
    margin: 0;
}
.hero-title {
    text-align: center;
    font-size: 4vw;
}
.hero-description {
    text-align: center;
    max-width: 600px;
    margin: 30px auto ;
    font-size: 2vw;
}
.projects-section {
    min-height: 100vh;
    padding: 5rem 3rem;
    text-align: center;
}

.projects-title {
    font-size: 4vw;
    margin-bottom: 3rem;
    text-align: center;
}

.projects-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;

    gap: 2rem;
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
}

.project {
    width: 50%;
}

.project-image {
    width: 100%;

    border: 2px solid white;
    overflow: hidden;
}

.project-image img {
    display: block;

    width: 100%;
    height: 300px;

    object-fit: cover;

    filter: brightness(35%);
}

.project span {
    display: block;
    margin-top: 1rem;

    font-size: 1rem;
}

.project h3 {
    font-size: 2rem;
    margin-top: 0.5rem;
}

.project p {
    margin-top: 0.5rem;
}

.all-projects-button {
    display: inline-block;

    padding: 1rem 2rem;

    border: 2px solid white;
    border-radius: 5px;

    background-color: transparent;

    color: white;
    font-weight: 700;
    text-decoration: none;
}
 .about-section {
      background: #000;
      color: #fff;
  }

  .about-stage {
      min-height: 100vh;
      min-height: 100svh;
      width: 100%;
      padding: 2rem 0;

      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 2rem;

      position: relative;
      overflow: hidden;
  }

  .about-label {
      margin: 0 5vw;
      font-size: 0.85rem;
      letter-spacing: 0.2em;
      color: #aaa;
  }

  .about-statement {
      margin: auto 0;
      padding: 0 5vw;

      font-size: clamp(5rem, 10vw, 10rem);
      font-weight: 700;
      line-height: 1.1;
      letter-spacing: -0.055em;
     
  }


  .about-stage.is-animated .about-statement {
      flex-shrink: 0;
      width: max-content;
      padding: 0 100vw;
      white-space: nowrap;
     
  }

  .about-char {
      display: inline-block;
  }

  .about-letter {
      display: inline-block;
      transform-origin: 50% 80%;
  }

  .about-space {
      display: inline-block;
      width: 0.28em;
  }

  .about-description {
      max-width: 540px;
      margin: 0 5vw;

      font-size: 1rem;
      font-weight: 400;
      line-height: 1.6;
      color: #aaa;
  }
.contact-section {
    min-height: calc(100vh - 80px);

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 3rem;
}

.contact-box {
    width: 100%;
    max-width: 800px;

    padding: 4rem;

    border: 2px solid white;

    text-align: center;
}

.contact-box h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.contact-box p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-links a {
    padding: 1rem 2rem;

    border: 2px solid white;

    color: white;
    font-weight: 700;
}
.cv{
    text-decoration: underline;
}
  .cv-section {
      max-width: 1100px;
      margin: 0 auto;
      padding: 60px 24px 100px;
  }

  .cv-title {
      font-size: clamp(4rem, 10vw, 7rem);
      text-align: center;
      margin-bottom: 60px;
  }

  .cv-content {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      align-items: center;
      gap: 60px;
  }

  .cv-column h2 {
      font-size: clamp(1.8rem, 3vw, 2.5rem);
      margin-bottom: 24px;
  }

  .cv-column p {
      font-size: 1.1rem;
      font-weight: 400;
      line-height: 1.8;
      margin-bottom: 16px;
  }

  .cv-image {
      width: 100%;
      max-width: 420px;
      justify-self: end;

      border: 2px solid white;
      overflow: hidden;
  }

  .cv-image img {
      display: block;
      width: 100%;
      aspect-ratio: 4 / 5;
      object-fit: cover;
      object-position: center;
  }

  @media (max-width: 700px) {
      .cv-content {
          grid-template-columns: 1fr;
          gap: 32px;
      }

      .cv-project-list {
          grid-template-columns: minmax(0, 1fr);
          gap: 16px;
      }

      .cv-image {
          justify-self: center;
      }

      .cv-title {
          margin-bottom: 40px;
      }
  }

  .cv-skills {
      margin-top: 80px;
  }

  .cv-skills h2,
  .cv-education h2 {
      font-size: clamp(1.5rem, 3vw, 2rem);
      margin-bottom: 24px;
  }

  .cv-skills table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
  }

  .cv-skills th,
  .cv-skills td {
      border: 1px solid white;
      padding: 20px;
      line-height: 1.6;
      vertical-align: top;
  }

  .cv-skills thead {
      background: #fff;
      color: #000;
  }

  .cv-skills tbody th {
      width: 35%;
  }

  .cv-skills td {
      font-weight: 400;
  }

  .cv-projects {
      margin-top: 48px;
  }

  .cv-projects h2 {
      margin: 0 0 20px;
      font-size: clamp(1.5rem, 3vw, 2rem);
  }

  .cv-project-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 20px 32px;
      margin: 0;
      padding: 0;
      list-style: none;
  }

  .cv-project-list li {
      padding-top: 14px;
      border-top: 1px solid #b8b1a5;
  }

  .cv-project-list h3 {
      margin: 0 0 6px;
      font-size: 1.05rem;
  }

  .cv-project-list p,
  .cv-contact p {
      margin: 0;
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.5;
  }

  .cv-contact {
      margin-top: 18px;
  }

  .cv-contact + .cv-contact {
      margin-top: 0;
  }

  .cv-contact a {
      text-decoration: underline;
      text-underline-offset: 3px;
  }

  .cv-contact span {
      font-weight: 800;
  }

  .cv-github {
      margin-top: 0;
  }

  .cv-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
      margin-top: 32px;
  }

  .cv-github a {
      display: inline-block;
      border: 2px solid white;
      padding: 16px 24px;

      transition: background-color 0.3s, color 0.3s;
  }

  .cv-github a:hover,
  .cv-github a:focus-visible {
      background: white;
      color: black;
  }

  .cv-education {
      margin-top: 60px;
      padding-top: 32px;
      border-top: 2px solid white;
  }

  .cv-education h3 {
      font-size: 1.3rem;
      margin-bottom: 12px;
  }

  .cv-language p {
      font-size: 1.1rem;
      font-weight: 400;
      color: #aaa;
  }

    .cv-skills h2,
  .cv-language h2 {
      font-size: clamp(1.5rem, 3vw, 2rem);
      margin-bottom: 24px;
  }
   .cv-language {
      margin-top: 60px;
      padding-top: 32px;
      border-top: 2px solid white;
  }

  .cv-language h3 {
      font-size: 1.3rem;
      margin-bottom: 12px;
  }

  .cv-language p {
      font-size: 1.1rem;
      font-weight: 400;
      color: #aaa;
  }

  @media (max-width: 600px) {
      .cv-skills th,
      .cv-skills td {
          padding: 12px;
          overflow-wrap: anywhere;
      }
  }

  .cv-page {
      background: #eee8da;
      color: #191919;
      min-height: 100vh;
  }

  .cv-page .cv-image,
  .cv-page .cv-github a,
  .cv-page .cv-education {
      border-color: #191919;
  }

  .cv-page .cv-skills th,
  .cv-page .cv-skills td {
      border-color: #b8b1a5;
  }

  .cv-page .cv-skills thead {
      background: #191919;
      color: #eee8da;
  }

  .cv-page .cv-education p {
      color: #555149;
  }

  .cv-page .cv-github a {
      background: transparent;
      color: #191919;
  }

  .cv-page .cv-github a:hover,
  .cv-page .cv-github a:focus-visible {
      background: #191919;
      color: #eee8da;
  }

  .cv-download {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 16px 24px;
      border: 2px solid #b65c32;
      background: #b65c32;
      color: #fff;
      font: inherit;
      font-weight: 800;
      text-decoration: none;
      cursor: pointer;
      transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
  }

  .cv-download:hover,
  .cv-download:focus-visible {
      background: #914724;
      border-color: #914724;
      color: #fff;
      transform: translateY(-2px);
  }

  .cv-download:focus-visible {
      outline: 2px solid #191919;
      outline-offset: 4px;
  }

  @media print {
      @page {
          size: A4;
          margin: 12mm;
      }

      html,
      body,
      body:has(.cv-page) {
          background: #eee8da !important;
          color: #191919 !important;
          print-color-adjust: exact;
          -webkit-print-color-adjust: exact;
      }

      body:has(.cv-page) .site-header,
      body:has(.cv-page) .site-footer,
      .cv-actions {
          display: none !important;
      }

      .cv-page {
          min-height: 0 !important;
          background: #eee8da !important;
          color: #191919 !important;
      }

      .cv-section {
          max-width: none;
          margin: 0;
          padding: 0;
      }

      .cv-title {
          margin: 0 0 12mm;
          font-size: 52pt;
      }

      .cv-content {
          grid-template-columns: minmax(0, 1fr) 34mm;
          align-items: start;
          gap: 8mm;
      }

      .cv-image {
          width: 34mm;
          max-width: 34mm;
          justify-self: end;
          border-color: #191919 !important;
      }

      .cv-title {
          margin-bottom: 5mm;
          font-size: 34pt;
      }

      .cv-column p,
      .cv-contact p {
          margin-bottom: 2mm;
          font-size: 8.2pt;
          line-height: 1.28;
      }

      .cv-contact {
          margin-top: 3mm;
      }

      .cv-skills {
          margin-top: 6mm;
      }

      .cv-skills th,
      .cv-skills td {
          padding: 5px 7px;
          font-size: 8pt;
          line-height: 1.3;
      }

      .cv-projects {
          margin-top: 6mm;
      }

      .cv-projects h2 {
          margin-bottom: 3mm;
          font-size: 12pt;
      }

      .cv-project-list {
          gap: 3mm 8mm;
      }

      .cv-project-list li {
          padding-top: 2mm;
      }

      .cv-project-list h3 {
          margin-bottom: 1mm;
          font-size: 8.5pt;
      }

      .cv-project-list p {
          font-size: 7.5pt;
          line-height: 1.25;
      }

      .cv-skills table,
      .cv-skills tr,
      .cv-education,
      .cv-language {
          break-inside: avoid;
          page-break-inside: avoid;
      }

      .cv-education,
      .cv-language {
          border-color: #191919 !important;
          margin-top: 6mm;
          padding-top: 3mm;
      }

      .cv-education h2,
      .cv-language h2 {
          margin-bottom: 2mm;
          font-size: 12pt;
      }

      .cv-education-content,
      .cv-language {
          gap: 5mm;
      }

      .cv-education h3,
      .cv-education p,
      .cv-language p {
          margin-bottom: 1mm;
          font-size: 8pt;
      }

      .cv-education .cv-technologies h3 {
          margin: 0 0 2mm;
          font-size: 8pt;
      }

      .cv-education .cv-learning {
          justify-content: flex-start;
          gap: 2mm;
      }

      .cv-education .cv-learning img {
          width: 9mm;
          height: 9mm;
      }

      .cv-flags {
          font-size: 14pt;
      }

      .cv-education .cv-learning img {
          print-color-adjust: exact;
          -webkit-print-color-adjust: exact;
      }
  }
    body:has(.cv-page) header,
  body:has(.cv-page) .navbar {
      background: #fff;
      color: #000;
  }

  
  body:has(.cv-page) .navbar {
      border: 2px solid #000000;
  }

  
  body:has(.cv-page) .nav-links a {
      color: #000;
  }

  body:has(.cv-page) .nav-links a:hover {
      color: #555;
  }

  
  .cv-page .cv-image {
      border: 2px solid #000;
  }

  body:has(.cv-page) .nav-links a {
      font-weight: 800;
  }

  .cv-page p,
  .cv-page td,
  .cv-page th,
  .cv-page a {
      font-weight: 900;
  }
    body:has(.cv-page) header,
  body:has(.cv-page) .navbar {
      background: #f5f1e8;
  }
  .home-page {
      background: #000;
      color: #fff;
  }

  
  .home-page .hero,
  .home-page .projects-section {
      background: #000;
      color: #fff;
  }


  .home-page .about-section {
      background: #000;
  }


  .home-page .about-stage,
  .home-page .contact-section {
      background: #fff;
      color: #000;
      border-radius: 36px;
  }

  .home-page .about-statement {
      color: #000;
  }

  .home-page .about-label,
  .home-page .about-description {
      color: #2b2961;
  }


  .home-page .project-image,
  .home-page .all-projects-button,
  .home-page .contact-box {
      border-color: currentColor;
  }


  .home-page .contact-links a {
      background: transparent;
      color: #000;
      border-color: #000;

      transition:
          background-color 0.3s,
          color 0.3s;
  }

  .home-page .contact-links a:hover,
  .home-page .contact-links a:focus-visible {
      background: #000;
      color: #fff;
  }
   body:has(.home-page) header {
      background: #000;
      padding: 24px 20px;
  }


  body:has(.home-page) .navbar {
      width: 100%;
      max-width: 720px;
      min-height: 64px;
      height: auto;
      margin: 0 auto;
      padding: 12px 24px;

      background: #fff;
      color: #000;
      border: none;
      border-radius: 999px;

      display: flex;
      align-items: center;
      justify-content: center;
  }


  body:has(.home-page) .nav-links {
      width: 100%;
      padding: 0;

      display: flex;
      align-items: center;
      justify-content: space-evenly;
      flex-wrap: wrap;
      gap: 8px 16px;
  }

  body:has(.home-page) .nav-links a {
      color: #000;
      font-size: 16px;
      font-weight: 700;
      padding: 8px 4px;
  }

  body:has(.home-page) .nav-links a:hover {
      color: #666;
  }

  @media (max-width: 600px) {
      body:has(.home-page) .navbar {
          padding: 10px 16px;
          border-radius: 28px;
      }

      body:has(.home-page) .nav-links {
          gap: 4px 12px;
      }

      body:has(.home-page) .nav-links a {
          font-size: 14px;
      }
  }

  body:has(.home-page) .nav-links {
      display: flex;
      flex-wrap: nowrap;
      justify-content: space-between;
      gap: clamp(6px, 2vw, 24px);
  }

  body:has(.home-page) .nav-links a {
      flex: 0 0 auto;
      width: auto;
      min-width: 0;
      margin: 0;
      padding: 8px 0;
      white-space: nowrap;
      font-size: clamp(12px, 2vw, 16px);
  }
  .home-page .contact-box {
      background: #fff;
      color: #000;
      border: 2px solid #000;
      border-radius: 32px;
      padding: clamp(32px, 6vw, 64px);
      animation: none;
      box-shadow: none;
  }

  .home-page .contact-box .contact-links a {
      background: transparent;
      color: #000;
      border-color: #000;
  }

  .home-page .contact-box .contact-links a:hover,
  .home-page .contact-box .contact-links a:focus-visible {
      background: #000;
      color: #fff;
  }

  @keyframes contact-float {
      0%, 100% {
          transform: translateY(0);
      }

      50% {
          transform: translateY(-5px);
      }
  }

  @media (prefers-reduced-motion: reduce) {
      .home-page .contact-box {
          animation: none;
      }
  }

  @media (max-width: 700px) {

      .navbar {
          width: calc(100% - 24px);
          height: auto;
          min-height: 64px;
          padding: 10px 12px;
      }

      body:has(.home-page) header {
          padding: 16px 12px;
      }

      body:has(.home-page) .navbar {
          width: 100%;
          min-height: 60px;
          padding: 10px 12px;
          border-radius: 999px;
      }

      .nav-links,
      body:has(.home-page) .nav-links {
          display: grid;
          grid-template-columns: repeat(5, minmax(0, 1fr));
          align-items: center;
          width: 100%;
          gap: 4px;
          padding: 0;
      }

      .nav-links a,
      body:has(.home-page) .nav-links a {
          width: auto;
          min-width: 0;
          margin: 0;
          padding: 10px 0;
          font-size: 12px;
          text-align: center;
          white-space: nowrap;
      }

      .hero {
          height: auto;
          min-height: calc(100svh - 100px);
          padding: 48px 20px;
          justify-content: center;
      }

      .hero-name {
          font-size: clamp(4rem, 22vw, 8rem);
          line-height: 1;
      }

      .hero-title {
          font-size: clamp(1.2rem, 5.5vw, 2.4rem);
          margin-top: 20px;
      }

      .hero-description {
          max-width: 100%;
          margin: 24px auto 0;
          font-size: 1rem;
          line-height: 1.6;
      }

      .about-stage {
          padding: 24px 0;
          gap: 24px;
      }

      .about-label,
      .about-description {
          margin-left: 20px;
          margin-right: 20px;
      }

      .about-description {
          font-size: 1rem;
          line-height: 1.6;
      }

      .projects-section {
          min-height: auto;
          padding: 64px 20px;
      }

      .projects-title {
          font-size: 2.5rem;
          margin-bottom: 32px;
      }

      .projects-container {
          flex-direction: column;
          align-items: stretch;
          gap: 36px;
      }

      .project {
          width: 100%;
      }

      .project-image img {
          height: auto;
          aspect-ratio: 4 / 3;
          object-fit: cover;
      }

      .project h3 {
          font-size: 1.7rem;
      }

      .all-projects-button {
          align-self: center;
          max-width: 100%;
          padding: 14px 20px;
          text-align: center;
      }

      /* CONTACT */
      .contact-section,
      .home-page .contact-section {
          min-height: auto;
          padding: 64px 16px;
      }

      .contact-box,
      .home-page .contact-box {
          padding: 32px 20px;
          border-radius: 24px;
      }

      .contact-box h1,
      .contact-box h2 {
          font-size: clamp(2rem, 9vw, 3rem);
          overflow-wrap: anywhere;
      }

      .contact-box p {
          font-size: 1rem;
          line-height: 1.5;
      }

      .contact-links {
          flex-direction: column;
          gap: 12px;
      }

      .contact-links a {
          display: block;
          width: 100%;
          padding: 14px 16px;
          text-align: center;
      }

     .cv-section {
          padding: 40px 20px 64px;
      }

      .cv-title {
          margin-bottom: 32px;
      }

      .cv-content {
          grid-template-columns: minmax(0, 1fr);
          gap: 32px;
      }

      .cv-image {
          width: 100%;
          max-width: 360px;
          justify-self: center;
      }

      .cv-column p {
          font-size: 1rem;
      }

      .cv-skills {
          margin-top: 48px;
      }

      .cv-skills table {
          table-layout: fixed;
      }

      .cv-skills th,
      .cv-skills td {
          padding: 12px;
          font-size: 0.9rem;
          overflow-wrap: anywhere;
      }

      .cv-github a {
          max-width: 100%;
          padding: 14px 18px;
          overflow-wrap: anywhere;
      }
  }

  .projects-page .projects-container {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
      gap: 48px 32px;
  }

  .projects-page .project {
      width: 100%;
      min-width: 0;
  }

  .projects-page .project summary {
      list-style: none;
      cursor: pointer;
  }

  .projects-page .project summary::-webkit-details-marker {
      display: none;
  }

  .projects-page .project summary:focus-visible {
      outline: 2px solid white;
      outline-offset: 8px;
  }

  .projects-page .project summary > span {
      display: block;
      margin: 0;
  }

  .projects-page .project .project-number {
      margin-top: 16px;
      font-size: 1rem;
  }

  .projects-page .project .project-name {
      margin-top: 8px;
      font-size: 2rem;
  }

  .projects-page .project .project-category {
      margin-top: 8px;
      font-size: 1rem;
  }

  .projects-page .project .project-toggle {
      margin-top: 20px;
      font-size: 0.9rem;
      text-decoration: underline;
      text-underline-offset: 4px;
  }

  .projects-page .project-toggle::after {
      content: "Project Details +";
  }

  .projects-page .project[open] .project-toggle::after {
      content: "Project Details −";
  }

  .projects-page .project-description {
      margin-top: 20px;
      padding: 20px;
      border: 1px solid white;
      border-radius: 12px;
      text-align: left;
  }

  .projects-page .project-description p {
      margin: 0;
      font-weight: 400;
      line-height: 1.7;
  }

  @media (max-width: 700px) {
      .projects-page .projects-container {
          grid-template-columns: minmax(0, 1fr);
          gap: 36px;
      }
  }
  
  header {
      padding: 24px 16px;
  }

  .navbar {
      width: 100%;
      max-width: 720px;
      min-height: 64px;
      height: auto;
      margin: 0 auto;
      padding: 12px 24px;

      display: flex;
      align-items: center;
      justify-content: center;

      background: #fff;
      color: #000;
      border: none;
      border-radius: 999px;
  }

  .nav-links {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      align-items: center;

      width: 100%;
      padding: 0;
      gap: 12px;
  }

  .nav-links a {
      display: block;
      width: auto;
      min-width: 0;
      margin: 0;
      padding: 10px 0;

      color: #000;
      font-size: 16px;
      font-weight: 700;
      text-align: center;
      white-space: nowrap;

      transition: color 0.2s;
  }

  .nav-links a.active {
      color: #000;
  }

  .nav-links a:hover {
      color: #666;
  }

  .nav-links a:focus-visible {
      outline: 2px solid #000;
      outline-offset: 3px;
      border-radius: 6px;
  }

  body:has(.cv-page) header {
      background: #f5f1e8;
  }

  @media (max-width: 600px) {
      header {
          padding: 16px 12px;
      }

      .navbar {
          min-height: 60px;
          padding: 10px 12px;
      }

      .nav-links {
          gap: 4px;
      }

      .nav-links a {
          font-size: 12px;
      }
      
  }

  .cv-learning-title {
    margin-top: 28px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.cv-learning {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.cv-learning li {
    padding: 10px 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-weight: 700;
}

.cv-language {
    margin-top: 48px;
}

.cv-language-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.cv-language-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.cv-flags {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    line-height: 1;
}
.cv-education-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.cv-education .cv-learning {
    display: grid;
    grid-template-columns: repeat(4, 52px);
    align-items: center;
    justify-content: start;
    gap: 12px;
}

.cv-education .cv-learning img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

@media (max-width: 700px) {
    .cv-education-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .cv-education .cv-learning {
        grid-template-columns: repeat(4, 52px);
    }
}
.cv-education-content,
.cv-language {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.cv-technologies {
    min-width: 0;
    text-align: center;
}

.cv-education .cv-technologies h3 {
    font-size: 1rem;
    margin-bottom: 20px;
}

.cv-education .cv-technologies .cv-learning {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.cv-education .cv-learning img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.cv-language {
    margin-top: 48px;
    padding-top: 32px;
}
.cv-language-info h2 {
    margin-bottom: 16px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.cv-page .cv-language-info p {
    color: #555149;
}

.cv-language .cv-flags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 2.5rem;
}

@media (max-width: 700px) {
    .cv-education-content,
    .cv-language {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
}

.home-page .project {
    min-width: 0;
}

.home-page .project summary {
    list-style: none;
    cursor: pointer;
}

.home-page .project summary::-webkit-details-marker {
    display: none;
}

.home-page .project summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 6px;
}

.home-page .project summary span {
    display: block;
    margin: 0;
}

.home-page .project .project-info {
    padding-top: 20px;
}

.home-page .project-name {
    display: block;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.home-page .project .project-type {
    margin-top: 10px;
    font-size: 1rem;
}

.home-page .project .project-toggle {
    margin-top: 18px;
    font-size: 0.9rem;
}

.home-page .project-toggle::after {
    content: " +";
}

.home-page .project[open] .project-toggle::after {
    content: " −";
}

.home-page .project-description {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid currentColor;
    border-radius: 16px;
    text-align: left;
}

.home-page .project-description p {
    margin: 0;
    font-weight: 400;
    line-height: 1.7;
}

.home-page .all-projects-button {
    margin-top: 40px;
}
header {
    display: grid;
    grid-template-columns:
        minmax(110px, 1fr)
        minmax(0, 720px)
        minmax(110px, 1fr);
    align-items: center;
    gap: 16px;
}

header .navbar {
    grid-column: 2;
}

.language-switch {
    grid-column: 3;
    justify-self: end;

    display: flex;
    gap: 4px;
    padding: 4px;

    background: #fff;
    border: 1px solid #000;
    border-radius: 999px;
}

.language-switch a {
    display: block;
    padding: 10px 12px;
    border-radius: 999px;

    color: #000;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.language-switch a[aria-current="true"] {
    background: #000;
    color: #fff;
}

.language-switch a:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

@media (max-width: 1000px) {
    header {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    header .navbar {
        grid-column: 1;
    }

    .language-switch {
        grid-column: 1;
        justify-self: end;
    }
}
.site-header {
    display: grid;
    grid-template-columns:
        minmax(110px, 1fr)
        minmax(0, 720px)
        minmax(110px, 1fr);
    align-items: center;
    gap: 16px;
    padding: 24px 16px;
}

.site-header > .navbar {
    grid-column: 2;
    grid-row: 1;
    position: static;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: 720px;
    margin: 0 auto;
}

.site-header > .language-switch {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;

    position: static;
    transform: none;
    display: flex;
    align-items: center;
    gap: 4px;

    width: max-content;
    min-width: 0;
    margin: 0;
    padding: 4px;
}

.site-header > .language-switch a {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 10px 12px;
}

@media (max-width: 1050px) {
    .site-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 16px 12px;
    }

    .site-header > .navbar {
        grid-column: 1;
        grid-row: 1;
    }

    .site-header > .language-switch {
        grid-column: 1;
        grid-row: 2;
    }
}
.cv-education .cv-technologies .cv-learning {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
    align-items: center;
    gap: 20px;
    max-width: 320px;
    margin: 0 auto;
}

.cv-education .cv-learning img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.projects-page .project .project-details-label {
    margin-top: 20px;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.projects-page .project-details-label::after {
    content: " +";
}

.projects-page .project[open] .project-details-label::after {
    content: " −";
}
.home-page .contact-redesign {
    min-height: auto;
    padding: clamp(48px, 8vw, 100px) 20px;
    background: #fff;
    color: #111;
}

.contact-redesign .contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;

    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px);

    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 32px;
    text-align: left;
}

.contact-redesign .contact-eyebrow {
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #666;
}

.contact-redesign h2 {
    margin-bottom: 24px;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.contact-redesign .contact-description {
    max-width: 380px;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: #555;
}

.contact-redesign .contact-actions {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.contact-redesign .contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 24px;

    background: #133e6b;
  color: #fff;
    border: 1px solid #e4e4e0;
    border-radius: 20px;

    transition:
        background-color 0.25s,
        color 0.25s,
        border-color 0.25s,
        transform 0.25s;
}

.contact-redesign .contact-card-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.contact-redesign .contact-card strong {
    display: block;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-redesign .contact-arrow {
    font-size: 1.8rem;
    line-height: 1;
}

.contact-redesign .contact-card:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-3px);
}

.contact-redesign .contact-card:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}

@media (max-width: 800px) {
    .contact-redesign .contact-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .contact-redesign .contact-description {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .home-page .contact-redesign {
        padding: 48px 16px;
    }

    .contact-redesign .contact-panel {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .contact-redesign .contact-card {
        padding: 20px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-redesign .contact-card {
        transition: none;
        transform: none;
    }
}
.home-page .contact-section.contact-simple {
    display: block;
    min-height: auto;
    padding: 88px 32px 16px;
    background: #fff;
    color: #000000;
    text-align: left;
    border-radius: 36px 36px 0 0 !important;
}

.contact-simple-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(56px, 8vw, 128px);
    row-gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.home-page .contact-simple-inner::after {
    content: "";
    grid-column: 1 / -1;
    width: min(100%, 1100px);
    justify-self: center;
    margin-top: 24px;
    border-top: 1px solid #ddd;
}

.contact-simple-copy {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
}

.contact-simple h2 {
    margin-bottom: 22px;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 900;
}

.contact-simple p {
    max-width: 500px;
    margin-left: 0;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 400;
    line-height: 1.8;
    color: #2b2961;
}

.contact-simple-links {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    gap: 20px;
    margin: 0;
}

.contact-simple-links .contact-link-card {
    display: flex;
    min-height: 108px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    border: 1px solid #d8d3c9;
    border-radius: 14px;
    background: #f5f1e8;
    color: #191919;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.contact-link-text {
    display: grid;
    gap: 7px;
}

.contact-link-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.contact-link-arrow {
    font-size: 1.6rem;
    font-weight: 900;
}

.contact-simple-links .contact-link-card:hover {
    transform: translateY(-2px);
    background: #191919;
    color: #fff;
}

.contact-simple-links a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

@media (max-width: 700px) {
    .contact-simple-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .contact-simple-copy {
        grid-column: 1;
        grid-row: 1;
        text-align: left;
    }

    .contact-simple-links {
        grid-column: 1;
        grid-row: 2;
    }

    .contact-simple p {
        margin-left: 0;
    }
}

.contact-bottom {
    margin-top: 64px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    font-weight: 400;
    color: #000000;
    font-weight: 700;
}

.site-footer {
    padding: 0 24px 24px;
    background: #000;
    color: #fff;
}

.site-footer-inner {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid currentColor;
    font-size: 0.85rem;
    font-weight: 700;
}

.home-page + .site-footer {
    background: #fff;
    color: #000;
}

.cv-page + .site-footer,
.projects-page + .site-footer,
.project-detail-page + .site-footer {
    background: #eee8da;
    color: #191919;
}

a.project-website {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;

    background-color: #a61b06;
    color: #ffffff;
    border: 1px solid #dca8a1;
    border-radius: 8px;

    font-weight: 700;
    text-decoration: none;

    transition: background-color 0.2s;
}

a.project-website:hover {
    background-color: #eac3bd;
    color: #702d28;
    text-decoration: none;
}

a.project-website:focus-visible {
    outline: 2px solid #702d28;
    outline-offset: 4px;
}
.project-description .project-website {
    background: #f3d9d5;
    color: #702d28;
    border: 1px solid #dca8a1;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 700;

    transition:
        background-color 0.2s,
        border-color 0.2s;
}

.project-description .project-website:hover {
    background: #eac3bd;
    border-color: #c58d85;
    text-decoration: none;
}

.project-description .project-website:focus-visible {
    outline: 2px solid #702d28;
    outline-offset: 4px;
}

/* Project cards, automatic previews, and their dedicated detail pages. */
.projects-page .projects-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    width: 100%;
    max-width: 1760px;
    gap: 88px clamp(28px, 3vw, 56px);
}

.projects-page .projects-section {
    padding: clamp(64px, 8vh, 100px) clamp(24px, 3vw, 56px) 120px;
}

.projects-page .projects-title {
    margin-bottom: clamp(48px, 6vw, 88px);
    font-size: clamp(3.5rem, 7vw, 6rem);
}

.projects-page .project {
    width: 100%;
    min-width: 0;
}

.projects-page .project:nth-child(even) {
    margin-top: 112px;
}

.project-preview-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-preview-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 8px;
}

.projects-page .project-image,
.home-page .project-image {
    display: block;
    width: 100%;
}

.project-carousel {
    overflow: hidden;
}

:is(.home-page, .projects-page) .project-carousel-track {
    display: flex;
    width: 100%;
    margin: 0;
    transition: transform 800ms cubic-bezier(0.22, 0.7, 0.2, 1);
    will-change: transform;
}

.project-carousel-track img {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.projects-page .project-carousel-track img {
    height: clamp(420px, 42vw, 680px);
}

.project-preview-link .project-name,
.project-preview-link .project-type,
.project-preview-link .project-toggle {
    display: block;
}

.project-preview-link .project-name {
    margin-top: 18px;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.project-preview-link .project-meta {
    display: block;
    margin-top: 10px;
}

.project-preview-link .project-type {
    font-size: 1rem;
}

.project-preview-link .project-toggle {
    margin-top: 14px;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.project-detail-page {
    min-height: 100vh;
    padding: 40px 24px 100px;
    background: #eee8da;
    color: #191919;
}

.project-detail-content {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.project-detail-back {
    display: inline-block;
    margin-bottom: 32px;
    font-weight: 800;
    text-underline-offset: 4px;
}

.project-detail-content > h1 {
    margin: 0 0 40px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
}

.project-detail-page .project-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.project-detail-page .project-gallery img {
    display: block;
    width: 100%;
    min-height: 220px;
    max-height: 620px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #191919;
}

.project-detail-description {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #191919;
}

.project-detail-description h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
    font-weight: 900;
}

.project-detail-description p {
    margin: 0;
    font-weight: 700;
    line-height: 1.8;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-technologies li {
    padding: 9px 13px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-weight: 800;
}

.project-detail-tech .project-website {
    margin-top: 0;
}

.project-detail-actions {
    display: inline-flex !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 8px !important;
    width: max-content !important;
    max-width: 100%;
    margin-top: 24px;
    margin-left: 0 !important;
    justify-self: start;
}

.project-detail-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: auto;
    flex: 0 0 auto !important;
    margin: 0 !important;
    white-space: nowrap;
    text-align: center;
    font-size: 0.9rem;
    padding: 12px 24px;
}

.project-action-arrow {
    display: inline-block;
    flex: 0 0 auto;
    line-height: 1;
    margin-right: 2px;
}

.project-source-link {
    display: block;
    padding: 12px 10px;
    border: 1px solid #191919;
    border-radius: 8px;
    background: #191919;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.project-source-link:hover {
    background: transparent;
    color: #191919;
}

.project-source-link:focus-visible {
    outline: 2px solid #191919;
    outline-offset: 4px;
}

body:has(.project-detail-page) {
    background: #eee8da;
    color: #191919;
}

body:has(.project-detail-page) .site-header {
    background: #f5f1e8;
}

body:has(.project-detail-page) .navbar {
    background: #f5f1e8;
}

@media (max-width: 700px) {
    .projects-page .projects-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .projects-page .project:nth-child(even) {
        margin-top: 24px;
    }

    .projects-page .projects-section {
        padding: 48px 20px 72px;
    }

    .project-carousel-track img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .projects-page .project-carousel-track img {
        height: auto;
    }

    .project-detail-page {
        padding: 28px 20px 64px;
    }

    .project-detail-content > h1 {
        margin-bottom: 28px;
    }

    .project-detail-page .project-gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .project-detail-page .project-gallery img {
        min-height: 0;
    }

    .project-detail-description {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        margin-top: 32px;
    }

    .project-detail-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100% !important;
        gap: 6px !important;
    }

    .project-detail-actions .project-website,
    .project-detail-actions .project-source-link {
        width: 100%;
        min-width: 0;
        padding: 10px 6px;
        gap: 4px;
        white-space: normal;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .project-detail-actions {
        gap: 4px !important;
    }

    .project-detail-actions .project-website,
    .project-detail-actions .project-source-link {
        padding: 9px 4px;
        font-size: 0.72rem;
    }
}
body:has(.projects-page) {
    background: #f5f1e8;
    color: #191919;
}

.projects-page {
    min-height: 100vh;
    background: #f5f1e8;
    color: #191919;
}

.projects-page .projects-section {
    background: #f5f1e8;
    color: #191919;
}

body:has(.projects-page) .site-header {
    background: #f5f1e8;
}

body:has(.projects-page) .navbar {
    background: transparent;
    color: #191919;
    border: 2px solid #191919;
}

body:has(.projects-page) .nav-links a {
    color: #191919;
    font-weight: 700;
}

.projects-page .projects-title,
.projects-page .project-name {
    font-weight: 900;
}

.projects-page .project p,
.projects-page .project span,
.projects-page .project a {
    font-weight: 700;
}

.projects-page .project-image,
.projects-page .project-description {
    border-color: #191919;
}

.projects-page .project summary:focus-visible {
    outline-color: #191919;
}
body:has(.projects-page),
.projects-page,
.projects-page .projects-section {
    background: #eee8da;
}

body:has(.projects-page) .site-header {
    background: #f5f1e8;
}

body:has(.projects-page) .navbar {
    background: #f5f1e8;
}
.home-page .project .project-meta,
.projects-page .project .project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 16px;
}

.project .project-meta .project-type,
.project .project-meta .project-toggle {
    margin: 0;
    font-size: 0.9rem;
}

.project .project-meta .project-website {
    margin: 0;
    padding: 8px 14px;
    font-size: 0.9rem;
}

.project .project-meta .project-toggle::after {
    content: " +";
}

.project[open] .project-meta .project-toggle::after {
    content: " −";
}

.home-page .project .project-meta,
.projects-page .project .project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 16px;
}

.project .project-meta .project-type,
.project .project-meta .project-toggle {
    margin: 0;
    font-size: 0.9rem;
}

.project .project-meta .project-website {
    margin: 0;
    padding: 8px 14px;
    font-size: 0.9rem;
}

.project .project-meta .project-toggle::after {
    content: " +";
}

.project[open] .project-meta .project-toggle::after {
    content: " −";
}

:is(.home-page, .projects-page) .project :is(strong, span, p, a, h3) {
    font-weight: 900;
}

body:has(.home-page, .cv-page, .projects-page) .site-header {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

body .site-header .navbar,
body .site-header .language-switch {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

body .site-header .nav-links a,
body .site-header .language-switch a {
    background: transparent;
    color: #000;
    border-radius: 0;
    font-weight: 700;
}

body .site-header .language-switch a[aria-current="true"] {
    background: transparent;
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.hero .hero-identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(100px, 28vw, 360px);
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.hero .hero-name {
    min-width: 0;
    margin: 0;
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.05;
    text-align: left;
}

.hero .hero-intro,
.hero .hero-profile {
    min-width: 0;
}

.hero .hero-intro .hero-title {
    margin: 16px 0 0;
    font-size: clamp(0.75rem, 2.2vw, 2rem);
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
}

.hero .hero-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border: none;
    border-radius: 0;
}

.hero-description span + span::before {
    content: " | ";
}

.home-page .project summary .project-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 300px;
    padding: 24px;
    background: #141414;
    color: #fff;
}

.home-page .project-placeholder strong {
    font-size: clamp(1.4rem, 5vw, 2rem);
    letter-spacing: 0.04em;
}

.home-page .project summary .project-placeholder span {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #bdbdbd;
}

@media (max-width: 700px) {
    body:has(.home-page) .site-header {
        gap: 0;
        padding: 8px 16px;
    }

    body:has(.home-page) .site-header .navbar {
        min-height: 44px;
        padding: 0;
    }

    body:has(.home-page) .site-header .nav-links {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
    }

    body:has(.home-page) .site-header .nav-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 8px 0;
        font-size: clamp(0.75rem, 3.3vw, 0.9rem);
    }

    body:has(.home-page) .site-header .language-switch {
        padding: 0;
        gap: 0;
    }

    body:has(.home-page) .site-header .language-switch a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }

    .home-page .hero {
        height: auto;
        min-height: 0;
        padding: 32px 20px 48px;
        gap: 28px;
    }

    .home-page .hero .hero-identity {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        max-width: 480px;
    }

    .home-page .hero .hero-name {
        max-width: 8ch;
        font-size: clamp(3rem, 15vw, 4.5rem);
        line-height: 0.98;
        letter-spacing: -0.04em;
        text-align: right;
    }

    .home-page .hero .hero-intro .hero-title {
        margin-top: 14px;
        font-size: clamp(0.95rem, 3.8vw, 1.15rem);
        line-height: 1.4;
        text-align: right;
    }

    .home-page .hero .hero-profile {
        width: min(82%, 300px);
        justify-self: end;
    }

    .home-page .hero-description {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 16px;
        width: 100%;
        max-width: 480px;
        margin: 0;
        padding-top: 20px;
        border-top: 1px solid #333;
        font-size: 0.875rem;
        line-height: 1.6;
        color: #ddd;
    }

    .home-page .hero-description span + span::before {
        content: none;
    }

    .home-page .about-stage {
        min-height: min(620px, 85svh);
        padding: 32px 0;
        gap: 24px;
    }

    .home-page .about-statement {
        font-size: clamp(3.5rem, 14vw, 5rem);
    }

    .home-page .about-label,
    .home-page .about-description {
        margin-left: 20px;
        margin-right: 20px;
    }

    .home-page .about-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .home-page .about-stage > div {
        padding: 0 20px;
    }

    .home-page .about-stage a.cv {
        display: inline-block;
        max-width: 100%;
        margin: 0;
        padding: 10px 0;
        line-height: 1.6;
        text-underline-offset: 4px;
    }

    .home-page .projects-section {
        padding: 48px 20px;
        min-height: 0;
        text-align: left;
    }

    .home-page .projects-title {
        margin-bottom: 28px;
        font-size: 2.25rem;
        text-align: left;
    }

    .home-page .projects-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .home-page .project-image img {
        height: auto;
        aspect-ratio: 4 / 3;
        filter: brightness(100%);
    }

    .home-page .project summary .project-placeholder {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .home-page .project .project-name {
        margin-top: 16px;
        font-size: clamp(1.25rem, 5.5vw, 1.65rem);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .home-page .project .project-info {
        padding-top: 0;
    }

    .home-page .project .project-type,
    .home-page .project .project-category {
        margin-top: 10px;
        font-size: 0.8rem;
        line-height: 1.65;
    }

    .home-page .project .project-toggle,
    .home-page .project .project-details-label {
        margin-top: 8px;
        padding: 10px 0;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .home-page .project .project-website {
        margin: 8px 0 0;
        padding: 12px 18px;
        min-height: 44px;
    }

    .home-page .project-description {
        padding: 18px;
    }

    .home-page .project-description p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .home-page .all-projects-button {
        display: block;
        width: 100%;
        margin: 32px 0 0;
        padding: 16px;
        font-size: 0.875rem;
        text-align: center;
    }

    .home-page .contact-section.contact-simple {
        padding: 40px 20px 24px;
    }

    .home-page .contact-simple h2 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    .home-page .contact-simple-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-top: 20px;
    }

    .home-page .contact-simple-links a {
        min-height: 44px;
        margin: 0;
        padding: 10px 0;
        font-size: 0.95rem;
    }

    .home-page .contact-bottom {
        margin-top: 24px;
        padding-top: 16px;
    }
}

@media (max-width: 700px) {
    .home-page .contact-simple-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .home-page .contact-simple-copy {
        grid-column: 1;
        grid-row: 1;
        text-align: left;
    }

    .home-page .contact-simple-links {
        display: grid;
        grid-column: 1;
        grid-row: 2;
        gap: 12px;
        margin-top: 0;
    }

    .home-page .contact-simple-links .contact-link-card {
        min-height: 78px;
        padding: 16px 18px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 7mm;
    }

    html,
    body,
    body:has(.cv-page),
    .cv-page {
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #eee8da !important;
        color: #191919 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    body:has(.cv-page) .site-header,
    body:has(.cv-page) .site-footer,
    body:has(.cv-page) .cv-actions {
        display: none !important;
    }

    .cv-section {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cv-title {
        margin: 0 0 6mm !important;
        font-size: 42pt !important;
        line-height: 1 !important;
    }

    .cv-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 27mm !important;
        align-items: start !important;
        gap: 7mm !important;
    }

    .cv-column p,
    .cv-contact p {
        margin: 0 0 2mm !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
    }

    .cv-contact {
        margin-top: 2mm !important;
    }

    .cv-image {
        display: block !important;
        width: 27mm !important;
        max-width: 27mm !important;
        margin: 0 !important;
        justify-self: end !important;
        border: 1px solid #191919 !important;
    }

    .cv-image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 5 !important;
        object-fit: cover !important;
    }

    .cv-skills {
        margin-top: 8mm !important;
    }

    .cv-skills th,
    .cv-skills td {
        padding: 8px 10px !important;
        font-size: 10pt !important;
        line-height: 1.3 !important;
    }

    .cv-projects {
        margin-top: 8mm !important;
    }

    .cv-projects h2 {
        margin: 0 0 4mm !important;
        font-size: 15pt !important;
    }

    .cv-project-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5mm 8mm !important;
    }

    .cv-project-list li {
        padding-top: 2mm !important;
        break-inside: avoid !important;
    }

    .cv-project-list h3 {
        margin: 0 0 1mm !important;
        font-size: 10pt !important;
    }

    .cv-project-list p {
        margin: 0 !important;
        font-size: 9pt !important;
        line-height: 1.25 !important;
    }

    .cv-education,
    .cv-language {
        margin-top: 8mm !important;
        padding-top: 4mm !important;
        break-inside: avoid !important;
    }

    .cv-education h2,
    .cv-language h2 {
        margin: 0 0 3mm !important;
        font-size: 15pt !important;
    }

    .cv-education-content,
    .cv-language {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 5mm !important;
    }

    .cv-education h3,
    .cv-education p,
    .cv-language p,
    .cv-education .cv-technologies h3 {
        margin: 0 0 2mm !important;
        font-size: 10pt !important;
        line-height: 1.25 !important;
    }

    .cv-education .cv-learning {
        display: grid !important;
        grid-template-columns: repeat(4, 9mm) !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 3mm !important;
    }

    .cv-education .cv-technologies h3 {
        text-align: center !important;
    }

    .cv-education .cv-learning img {
        width: 9mm !important;
        height: 9mm !important;
        justify-self: center !important;
        object-fit: contain !important;
    }

    .cv-flags {
        display: grid !important;
        grid-template-columns: repeat(2, 9mm) !important;
        justify-self: center !important;
        justify-items: center !important;
        align-items: center !important;
        gap: 3mm !important;
        font-size: 15pt !important;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language,
    .cv-project-list li,
    .cv-skills tr {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

/* Keep the navigation and Work layout simple and consistent on every page. */
body:has(.home-page) .site-header,
body:has(.projects-page) .site-header,
body:has(.cv-page) .site-header,
body:has(.project-detail-page) .site-header,
body:has(.contact-page) .site-header {
    display: flex !important;
    min-height: 76px;
    align-items: center;
    justify-content: flex-start !important;
    gap: 24px;
    padding: 14px clamp(20px, 4vw, 64px) !important;
    border: 0 !important;
    border-bottom: 1px solid #654238 !important;
}

body:has(.home-page) .site-header .navbar,
body:has(.projects-page) .site-header .navbar,
body:has(.cv-page) .site-header .navbar,
body:has(.project-detail-page) .site-header .navbar,
body:has(.contact-page) .site-header .navbar {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.site-header .nav-links {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    gap: clamp(14px, 2.2vw, 34px) !important;
    margin: 0 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    margin: 0 !important;
    padding: 8px 0 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em;
}

.site-header .language-switch {
    display: flex !important;
    gap: 14px !important;
    margin: 0 0 0 auto !important;
}

.projects-page .projects-section {
    min-height: 0 !important;
    padding: 24px clamp(22px, 5vw, 76px) 90px !important;
}

.projects-page .projects-title {
    margin: 0 auto 28px !important;
    padding: 0 0 16px !important;
    font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
    font-size: clamp(8rem, 19vw, 23rem) !important;
    font-stretch: condensed;
    font-weight: 900 !important;
    letter-spacing: -0.09em !important;
    line-height: 0.78 !important;
}

.projects-page .projects-title h1 {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
}

.projects-page .projects-container {
    gap: 64px clamp(24px, 5vw, 76px) !important;
}

.projects-page .project:nth-child(even) {
    margin-top: 54px !important;
}

.projects-page .project-image {
    aspect-ratio: 1.22 / 1 !important;
}

.projects-page .project-carousel-track img {
    height: 100% !important;
}

.projects-page .project-name {
    font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
    font-size: clamp(1.8rem, 3.2vw, 3.4rem) !important;
    letter-spacing: -0.045em !important;
    line-height: 1 !important;
}

.projects-page .project .project-meta {
    justify-content: flex-end !important;
    margin-top: 14px !important;
}

@media (max-width: 760px) {
    body:has(.home-page) .site-header,
    body:has(.projects-page) .site-header,
    body:has(.cv-page) .site-header,
    body:has(.project-detail-page) .site-header,
    body:has(.contact-page) .site-header {
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 12px 18px !important;
    }

    .site-header .nav-links {
        gap: 8px 16px !important;
    }

    .projects-page .projects-section {
        padding: 30px 20px 64px !important;
    }

    .projects-page .projects-title {
        margin-bottom: 28px !important;
        font-size: clamp(6rem, 24vw, 11rem) !important;
    }

    .projects-page .projects-container {
        gap: 40px !important;
    }

    .projects-page .project:nth-child(even) {
        margin-top: 0 !important;
    }
}

/* Last-pass visibility and CV layout fixes. */
body:has(.home-page) .site-header .nav-links a,
body:has(.projects-page) .site-header .nav-links a,
body:has(.cv-page) .site-header .nav-links a,
body:has(.project-detail-page) .site-header .nav-links a,
body:has(.contact-page) .site-header .nav-links a,
body:has(.home-page) .site-header .language-switch a,
body:has(.projects-page) .site-header .language-switch a,
body:has(.cv-page) .site-header .language-switch a,
body:has(.project-detail-page) .site-header .language-switch a,
body:has(.contact-page) .site-header .language-switch a {
    color: #ffede4 !important;
}

body:has(.home-page) .site-header .nav-links a:hover,
body:has(.projects-page) .site-header .nav-links a:hover,
body:has(.cv-page) .site-header .nav-links a:hover,
body:has(.project-detail-page) .site-header .nav-links a:hover,
body:has(.contact-page) .site-header .nav-links a:hover,
body:has(.home-page) .site-header .language-switch a[aria-current="true"],
body:has(.projects-page) .site-header .language-switch a[aria-current="true"],
body:has(.cv-page) .site-header .language-switch a[aria-current="true"],
body:has(.project-detail-page) .site-header .language-switch a[aria-current="true"],
body:has(.contact-page) .site-header .language-switch a[aria-current="true"] {
    color: #ff684b !important;
}

@media screen {
    .cv-page {
        background: #1b0d0a !important;
        color: #ffede4 !important;
    }

    .cv-section {
        width: min(100%, 1480px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: clamp(28px, 4vw, 60px) clamp(20px, 5vw, 76px) 80px !important;
    }

    .cv-title {
        margin: 0 0 clamp(30px, 4vw, 56px) !important;
        padding: 0 0 16px !important;
        border: 0 !important;
        border-bottom: 1px solid #654238 !important;
        background: transparent !important;
        color: #ffede4 !important;
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(6rem, 14vw, 12rem) !important;
        letter-spacing: -0.085em !important;
        line-height: 0.8 !important;
        text-align: left !important;
    }

    .cv-content {
        grid-template-columns: minmax(0, 1fr) clamp(180px, 22vw, 280px) !important;
        align-items: start !important;
        gap: clamp(26px, 5vw, 72px) !important;
    }

    .cv-column p,
    .cv-contact p {
        max-width: 68ch;
        margin: 0 0 12px !important;
        color: #ffede4 !important;
        font-size: clamp(0.98rem, 1.1vw, 1.1rem) !important;
        line-height: 1.65 !important;
    }

    .cv-image {
        width: 100% !important;
        max-width: 280px !important;
        border: 1px solid #654238 !important;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language {
        margin-top: 48px !important;
    }

    .cv-projects h2,
    .cv-education h2,
    .cv-language h2 {
        margin-bottom: 20px !important;
        color: #ffede4 !important;
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(1.8rem, 3.4vw, 3.5rem) !important;
        letter-spacing: -0.05em !important;
    }

    .cv-skills th,
    .cv-skills td {
        padding: 16px 20px !important;
        border-color: #654238 !important;
        background: #2b1712 !important;
        color: #ffede4 !important;
    }

    .cv-skills thead th {
        background: #ffede4 !important;
        color: #1b0d0a !important;
    }

    .cv-project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 40px !important;
    }

    .cv-project-list li,
    .cv-education,
    .cv-language {
        border-color: #654238 !important;
    }

    .cv-project-list h3,
    .cv-project-list p,
    .cv-education h3,
    .cv-education p,
    .cv-language p,
    .cv-contact a {
        color: #ffede4 !important;
    }
}

@media screen and (max-width: 760px) {
    .cv-content {
        grid-template-columns: 1fr !important;
    }

    .cv-image {
        width: min(100%, 250px) !important;
        justify-self: start !important;
    }

    .cv-project-list {
        grid-template-columns: 1fr !important;
    }
}

/* Final shared sizing so every page keeps the same navigation dimensions. */
.site-header {
    display: flex !important;
    width: 100% !important;
    min-height: 80px !important;
    height: 80px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    padding: 12px clamp(20px, 4vw, 64px) !important;
}

.site-header .navbar {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0 clamp(18px, 2.4vw, 36px) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    display: inline-flex !important;
    min-height: 44px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.site-header .language-switch {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
}

@media screen and (max-width: 760px) {
    .site-header {
        min-height: 72px !important;
        height: auto !important;
        flex-wrap: wrap !important;
        gap: 4px 14px !important;
        padding: 10px 18px !important;
    }

    .site-header .nav-links {
        gap: 0 16px !important;
    }

    .site-header .nav-links a,
    .site-header .language-switch a {
        min-height: 36px !important;
        font-size: 0.82rem !important;
    }
}

/* Square, high-contrast CV link in the About section. */
.home-page .about-stage a.cv {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    min-height: 58px !important;
    padding: 0 24px !important;
    border: 1px solid #ff684b !important;
    border-radius: 2px !important;
    background: #ff684b !important;
    color: #1b0d0a !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.home-page .about-stage a.cv::after {
    content: "↗";
    font-size: 1.1em;
}

.home-page .about-stage a.cv:hover,
.home-page .about-stage a.cv:focus-visible {
    border-color: #ffede4 !important;
    background: transparent !important;
    color: #ffede4 !important;
}

.home-page .about-stage a.cv:focus-visible {
    outline: 2px solid #ff684b;
    outline-offset: 4px;
}

/* One shared navbar size and spacing on every page. */
body:has(.home-page) .site-header,
body:has(.projects-page) .site-header,
body:has(.cv-page) .site-header,
body:has(.project-detail-page) .site-header,
body:has(.contact-page) .site-header {
    display: flex !important;
    width: 100%;
    min-height: 80px !important;
    height: 80px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    padding: 12px clamp(20px, 4vw, 64px) !important;
}

body:has(.home-page) .site-header .navbar,
body:has(.projects-page) .site-header .navbar,
body:has(.cv-page) .site-header .navbar,
body:has(.project-detail-page) .site-header .navbar,
body:has(.contact-page) .site-header .navbar {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body:has(.home-page) .site-header .nav-links,
body:has(.projects-page) .site-header .nav-links,
body:has(.cv-page) .site-header .nav-links,
body:has(.project-detail-page) .site-header .nav-links,
body:has(.contact-page) .site-header .nav-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0 clamp(18px, 2.4vw, 36px) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.home-page) .site-header .nav-links a,
body:has(.projects-page) .site-header .nav-links a,
body:has(.cv-page) .site-header .nav-links a,
body:has(.project-detail-page) .site-header .nav-links a,
body:has(.contact-page) .site-header .nav-links a,
body:has(.home-page) .site-header .language-switch a,
body:has(.projects-page) .site-header .language-switch a,
body:has(.cv-page) .site-header .language-switch a,
body:has(.project-detail-page) .site-header .language-switch a,
body:has(.contact-page) .site-header .language-switch a {
    display: inline-flex !important;
    min-height: 44px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

body:has(.home-page) .site-header .language-switch,
body:has(.projects-page) .site-header .language-switch,
body:has(.cv-page) .site-header .language-switch,
body:has(.project-detail-page) .site-header .language-switch,
body:has(.contact-page) .site-header .language-switch {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
}

@media screen and (max-width: 760px) {
    body:has(.home-page) .site-header,
    body:has(.projects-page) .site-header,
    body:has(.cv-page) .site-header,
    body:has(.project-detail-page) .site-header,
    body:has(.contact-page) .site-header {
        min-height: 72px !important;
        height: auto !important;
        flex-wrap: wrap !important;
        gap: 4px 14px !important;
        padding: 10px 18px !important;
    }

    body:has(.home-page) .site-header .nav-links,
    body:has(.projects-page) .site-header .nav-links,
    body:has(.cv-page) .site-header .nav-links,
    body:has(.project-detail-page) .site-header .nav-links,
    body:has(.contact-page) .site-header .nav-links {
        gap: 0 16px !important;
    }

    body:has(.home-page) .site-header .nav-links a,
    body:has(.projects-page) .site-header .nav-links a,
    body:has(.cv-page) .site-header .nav-links a,
    body:has(.project-detail-page) .site-header .nav-links a,
    body:has(.contact-page) .site-header .nav-links a,
    body:has(.home-page) .site-header .language-switch a,
    body:has(.projects-page) .site-header .language-switch a,
    body:has(.cv-page) .site-header .language-switch a,
    body:has(.project-detail-page) .site-header .language-switch a,
    body:has(.contact-page) .site-header .language-switch a {
        min-height: 36px !important;
        font-size: 0.82rem !important;
    }
}

@media screen {
    body:has(.home-page) .site-header .nav-links a,
    body:has(.projects-page) .site-header .nav-links a,
    body:has(.cv-page) .site-header .nav-links a,
    body:has(.project-detail-page) .site-header .nav-links a,
    body:has(.contact-page) .site-header .nav-links a,
    body:has(.home-page) .site-header .language-switch a,
    body:has(.projects-page) .site-header .language-switch a,
    body:has(.cv-page) .site-header .language-switch a,
    body:has(.project-detail-page) .site-header .language-switch a,
    body:has(.contact-page) .site-header .language-switch a {
        color: #ffede4 !important;
    }

    body:has(.home-page) .site-header .nav-links a:hover,
    body:has(.projects-page) .site-header .nav-links a:hover,
    body:has(.cv-page) .site-header .nav-links a:hover,
    body:has(.project-detail-page) .site-header .nav-links a:hover,
    body:has(.contact-page) .site-header .nav-links a:hover,
    body:has(.home-page) .site-header .language-switch a[aria-current="true"],
    body:has(.projects-page) .site-header .language-switch a[aria-current="true"],
    body:has(.cv-page) .site-header .language-switch a[aria-current="true"],
    body:has(.project-detail-page) .site-header .language-switch a[aria-current="true"],
    body:has(.contact-page) .site-header .language-switch a[aria-current="true"] {
        color: #ff684b !important;
    }

    .cv-section {
        padding: clamp(28px, 4vw, 60px) clamp(20px, 5vw, 76px) 80px !important;
    }

    .cv-title {
        margin: 0 0 clamp(32px, 5vw, 68px) !important;
        padding: 0 0 18px !important;
        border: 0 !important;
        border-bottom: 2px solid #654238 !important;
        background: transparent !important;
        color: #ffede4 !important;
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(7rem, 16vw, 15rem) !important;
        font-weight: 900 !important;
        letter-spacing: -0.09em !important;
        line-height: 0.78 !important;
        text-align: left !important;
    }

    .cv-content {
        grid-template-columns: minmax(0, 1fr) clamp(190px, 24vw, 310px) !important;
        align-items: start !important;
        gap: clamp(28px, 6vw, 84px) !important;
    }

    .cv-column p,
    .cv-contact p {
        max-width: 70ch;
        margin: 0 0 14px !important;
        font-size: clamp(1rem, 1.2vw, 1.12rem) !important;
        line-height: 1.65 !important;
    }

    .cv-image {
        width: 100% !important;
        max-width: 310px !important;
        border: 1px solid #654238 !important;
    }

    .cv-image img {
        width: 100%;
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language {
        margin-top: clamp(42px, 6vw, 76px) !important;
    }

    .cv-projects h2,
    .cv-education h2,
    .cv-language h2 {
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(2rem, 4.2vw, 4.5rem) !important;
        letter-spacing: -0.055em !important;
        line-height: 0.95 !important;
    }
}

@media screen and (max-width: 760px) {
    .cv-section {
        padding: 26px 18px 54px !important;
    }

    .cv-title {
        margin-bottom: 32px !important;
        font-size: clamp(6rem, 25vw, 9rem) !important;
    }

    .cv-content {
        grid-template-columns: 1fr !important;
    }

    .cv-image {
        width: min(100%, 260px) !important;
        justify-self: start !important;
    }
}

/* Homepage hero inspired by the supplied reference. */
body:has(.home-page) .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(20px, 4vw, 64px);
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

body:has(.home-page) .site-header .navbar {
    width: auto;
    max-width: none;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0;
}

body:has(.home-page) .site-header .nav-links {
    width: auto;
    justify-content: flex-start;
    gap: clamp(14px, 2.2vw, 36px);
}

body:has(.home-page) .site-header .nav-links a,
body:has(.home-page) .site-header .language-switch a {
    margin: 0;
    padding: 8px 0;
    color: #ffede4 !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body:has(.home-page) .site-header .nav-links a:hover,
body:has(.home-page) .site-header .language-switch a:hover {
    color: #ff684b !important;
}

body:has(.home-page) .site-header .language-switch {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

body:has(.home-page) .site-header .language-switch a[aria-current="true"] {
    color: #ff684b !important;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.home-page .hero-creative {
    --hero-ink: #1b0d0a;
    --hero-paper: #ffede4;
    --hero-accent: #ff684b;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    min-height: calc(100svh - 64px);
    height: auto;
    gap: 4vh;
    padding: clamp(24px, 4vw, 64px);
    overflow: hidden;
    background: var(--hero-ink);
    color: var(--hero-paper);
    text-align: left;
}

.creative-masthead,
.creative-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.creative-masthead {
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.creative-name {
    color: var(--hero-paper);
}

.creative-kicker,
.creative-note {
    color: color-mix(in srgb, var(--hero-paper) 72%, transparent);
}

.creative-headline {
    width: 100%;
    margin: auto 0;
    transform: scaleX(0.88);
    transform-origin: left center;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(3.5rem, 10.5vw, 12rem);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.creative-line {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0;
    white-space: nowrap;
}

.creative-solid {
    color: var(--hero-paper);
}

.creative-outline {
    margin-top: 0.08em;
    color: transparent;
    -webkit-text-stroke: clamp(1px, 0.12vw, 2px) var(--hero-accent);
    paint-order: stroke fill;
}

.creative-footer {
    min-height: 76px;
    color: var(--hero-accent);
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.creative-focus {
    max-width: 100%;
}

.creative-note {
    margin-left: auto;
    color: var(--hero-paper);
    text-align: right;
}

.creative-portrait {
    display: block;
    width: clamp(54px, 7vw, 92px);
    height: clamp(54px, 7vw, 92px);
    object-fit: cover;
    object-position: center 35%;
    border: 2px solid var(--hero-accent);
}

@media (max-width: 700px) {
    body:has(.home-page) .site-header {
        display: block;
        padding: 12px 16px;
    }

    body:has(.home-page) .site-header .navbar {
        width: 100%;
    }

    body:has(.home-page) .site-header .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 4px 12px;
    }

    body:has(.home-page) .site-header .nav-links a,
    body:has(.home-page) .site-header .language-switch a {
        min-height: 36px;
        padding: 8px 0;
        font-size: 0.68rem;
    }

    body:has(.home-page) .site-header .language-switch {
        justify-content: flex-end;
        margin-top: 4px;
    }

    .home-page .hero-creative {
        min-height: calc(100svh - 112px);
        gap: 24px;
        padding: 22px 18px 26px;
    }

    .creative-masthead {
        align-items: flex-start;
        font-size: 0.65rem;
    }

    .creative-kicker {
        max-width: 55%;
        text-align: right;
    }

    .creative-headline {
        font-size: clamp(2.8rem, 14vw, 4.25rem);
        line-height: 0.9;
        letter-spacing: -0.06em;
        transform: none;
    }

    .creative-line {
        width: auto;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .creative-solid {
        font-size: clamp(2rem, 10.5vw, 4rem);
        white-space: nowrap;
    }

    .creative-outline {
        margin-top: 0.18em;
    }

    .creative-footer {
        min-height: 56px;
        gap: 12px;
        font-size: 0.6rem;
        letter-spacing: 0.07em;
    }

    .creative-focus {
        max-width: 100%;
    }

    .creative-portrait {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
    }

    .creative-note {
        max-width: 28%;
    }
}

/* Homepage layout refresh */
.home-page > .profile-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    padding: 34px clamp(22px, 5vw, 76px) !important;
    border-bottom: 1px solid #c9c2b6 !important;
    background: #f5f1e8 !important;
    color: #191512 !important;
}

.home-page {
    overflow: hidden;
    background: #f5f1e8;
    color: #191512;
}

.home-page .profile-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 34px clamp(22px, 5vw, 76px);
    border-bottom: 1px solid #c9c2b6;
    background: #f5f1e8;
}

.profile-strip > div {
    min-width: 0;
    padding-right: 16px;
    border-right: 1px solid #c9c2b6;
}

.profile-strip > div:last-child {
    border-right: 0;
}

.profile-strip span {
    display: block;
    margin-bottom: 10px;
    color: #746c64;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.profile-strip p {
    margin: 0;
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    font-weight: 700;
    line-height: 1.45;
}

.home-page .about-section {
    min-height: auto;
    padding: clamp(72px, 12vw, 170px) clamp(22px, 9vw, 140px);
    background: #f5f1e8;
    color: #191512;
}

.home-page .about-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    align-items: end;
    gap: 28px 8vw;
    width: min(100%, 1450px);
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.home-page .about-label {
    grid-column: 1 / -1;
    margin: 0;
    color: #746c64;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
}

.home-page .about-statement {
    grid-column: 1 / -1;
    max-width: none;
    margin: 0;
    color: #1b0d0a;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
    font-size: clamp(3.2rem, 7vw, 7.5rem);
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 0.95;
    overflow-wrap: normal;
    text-transform: none;
}

.home-page .about-description {
    max-width: 58ch;
    margin: 0;
    color: #39332e;
    font-size: clamp(1rem, 1.35vw, 1.22rem);
    font-weight: 400;
    line-height: 1.8;
    text-align: left;
}

.home-page .about-stage > div {
    justify-self: end;
    align-self: end;
    margin: 0;
}

.home-page .about-stage a.cv {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0 22px;
    border: 1px solid #1b0d0a;
    border-radius: 999px;
    color: #1b0d0a;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.home-page .about-stage a.cv:hover,
.home-page .about-stage a.cv:focus-visible {
    background: #1b0d0a;
    color: #ffede4;
}

.home-page .projects-section {
    min-height: auto;
    padding: clamp(64px, 9vw, 120px) clamp(22px, 5vw, 76px);
    background: #1b0d0a;
    color: #ffede4;
    text-align: left;
}

.home-page .projects-title {
    width: min(100%, 1450px);
    margin: 0 auto clamp(32px, 5vw, 64px);
    font-size: clamp(2.8rem, 8vw, 8rem);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.9;
    text-align: left;
}

.home-page .projects-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(30px, 5vw, 76px);
    width: min(100%, 1450px);
    max-width: none;
    margin: 0 auto;
}

.home-page .project {
    width: 100%;
    margin: 0;
}

.home-page .project:nth-child(even) {
    margin-top: clamp(44px, 8vw, 120px);
}

.home-page .project-preview-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.home-page .project-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.12 / 1;
    border: 1px solid #ff684b;
    overflow: hidden;
}

.home-page .project-carousel-track {
    height: 100%;
}

.home-page .project-image img {
    width: 100%;
    height: 100%;
    filter: brightness(78%);
    object-fit: cover;
}

.home-page .project-name,
.home-page .project .project-info strong {
    display: block;
    margin-top: 20px;
    font-size: clamp(1.45rem, 2.8vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.home-page .project-preview-link:hover .project-name,
.home-page .project-preview-link:focus-visible .project-name {
    color: #ff684b;
}

.home-page .project-category,
.home-page .project .project-type {
    display: block;
    margin-top: 10px;
    color: #d7c9bf;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.home-page .project-details-label,
.home-page .project .project-toggle {
    display: inline-block;
    margin-top: 18px;
    border-bottom: 1px solid currentColor;
    font-size: 0.88rem;
    font-weight: 700;
}

.home-page .project-website {
    display: inline-flex;
    margin-top: 16px;
}

.home-page .all-projects-button {
    display: block;
    width: fit-content;
    margin: clamp(48px, 8vw, 110px) auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    font-size: clamp(1.45rem, 2.8vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.home-page + .site-footer {
    background: #f5f1e8;
    color: #191512;
}

body:has(.contact-page) {
    background: #f5f1e8;
    color: #191512;
}

.contact-page {
    display: flex;
    min-height: calc(100svh - 90px);
    align-items: center;
    background: #f5f1e8;
}

.contact-page .contact-section {
    width: 100%;
    min-height: 0;
    padding: clamp(48px, 9vw, 120px) clamp(22px, 9vw, 140px);
    background: #f5f1e8;
    color: #191512;
    text-align: left;
}

.contact-page .contact-simple-inner {
    width: min(100%, 1400px);
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: clamp(36px, 8vw, 120px);
}

.contact-page .contact-simple-copy h1 {
    margin-bottom: 24px;
    font-size: clamp(3.5rem, 9vw, 9rem);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 0.9;
}

.contact-page .contact-simple-copy p {
    max-width: 42ch;
    color: #39332e;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.8;
}

.contact-page .contact-simple-links {
    gap: 14px;
}

.contact-page .contact-simple-links .contact-link-card {
    min-height: 100px;
    border-radius: 4px;
    background: #1b0d0a;
    color: #ffede4;
}

.contact-page .contact-simple-links .contact-link-card:hover {
    background: #ff684b;
    color: #1b0d0a;
}

.contact-page + .site-footer {
    background: #f5f1e8;
    color: #191512;
}

@media screen {
    body:has(.cv-page) {
        background: #f5f1e8;
        color: #191512;
    }

    .cv-page {
        min-height: 100vh;
        background: #f5f1e8;
        color: #191512;
    }

    .cv-section {
        width: min(100%, 1500px);
        max-width: none;
        margin: 0 auto;
        padding: clamp(30px, 5vw, 76px);
    }

    .cv-title {
        margin: 0 0 clamp(32px, 5vw, 72px);
        padding: clamp(38px, 7vw, 100px) clamp(22px, 5vw, 72px);
        background: #1b0d0a;
        border-bottom: 5px solid #ff684b;
        color: #ffede4;
        font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
        font-size: clamp(5rem, 15vw, 14rem);
        font-weight: 900;
        letter-spacing: -0.035em;
        line-height: 0.82;
        text-align: left;
    }

    .cv-content {
        grid-template-columns: minmax(0, 1fr) clamp(190px, 26vw, 360px);
        align-items: center;
        gap: clamp(28px, 6vw, 88px);
    }

    .cv-column p,
    .cv-contact p {
        color: #302a25;
        font-size: clamp(1rem, 1.3vw, 1.2rem);
        font-weight: 700;
        line-height: 1.65;
    }

    .cv-contact a {
        color: #1b0d0a;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .cv-image {
        width: 100%;
        max-width: none;
        justify-self: end;
        border: 3px solid #1b0d0a;
    }

    .cv-image img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language {
        margin-top: clamp(48px, 7vw, 96px);
    }

    .cv-skills table {
        border-collapse: collapse;
    }

    .cv-skills th,
    .cv-skills td {
        padding: clamp(14px, 2vw, 26px);
        border: 1px solid #c9c2b6;
        color: #191512;
        font-size: clamp(0.95rem, 1.2vw, 1.12rem);
        line-height: 1.6;
    }

    .cv-skills thead {
        background: #1b0d0a;
        color: #ffede4;
    }

    .cv-skills thead th {
        color: #ffede4;
    }

    .cv-projects h2,
    .cv-education h2,
    .cv-language h2 {
        margin-bottom: 24px;
        font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
        font-size: clamp(2rem, 4vw, 4rem);
        font-weight: 900;
        letter-spacing: -0.025em;
    }

    .cv-project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 clamp(24px, 5vw, 72px);
    }

    .cv-project-list li {
        padding: 20px 0;
        border-top: 1px solid #c9c2b6;
    }

    .cv-project-list h3,
    .cv-education h3 {
        color: #1b0d0a;
        font-size: clamp(1.15rem, 1.7vw, 1.55rem);
        font-weight: 900;
    }

    .cv-project-list p,
    .cv-education p,
    .cv-language p {
        color: #39332e;
        font-size: 1rem;
        line-height: 1.6;
    }

    .cv-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 28px;
    }

    .cv-actions .cv-github a,
    .cv-actions .cv-download {
        display: inline-flex;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0 22px;
        border: 1px solid #1b0d0a;
        border-radius: 999px;
        background: #1b0d0a;
        color: #ffede4;
        font: inherit;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }

    .cv-actions .cv-download {
        border-color: #ff684b;
        background: #ff684b;
        color: #1b0d0a;
    }

    .cv-education,
    .cv-language {
        padding-top: clamp(28px, 4vw, 54px);
        border-top: 1px solid #1b0d0a;
    }

    .cv-education-content,
    .cv-language {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: clamp(24px, 5vw, 72px);
    }

    .cv-education .cv-learning {
        display: grid;
        grid-template-columns: repeat(4, minmax(44px, 64px));
        justify-content: start;
        gap: 18px;
    }

    .cv-education .cv-learning img {
        width: 100%;
        height: 56px;
        object-fit: contain;
    }

    .cv-language .cv-flags {
        display: flex;
        align-items: center;
        gap: 16px;
        font-size: 2rem;
    }
}

@media (max-width: 760px) {
    .home-page > .profile-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 16px !important;
        padding: 28px 20px !important;
    }

    .profile-strip > div:nth-child(2) {
        border-right: 0;
    }

    .home-page .about-section {
        padding: 74px 22px;
    }

    .home-page .about-stage {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .home-page .about-label,
    .home-page .about-statement,
    .home-page .about-description,
    .home-page .about-stage > div {
        grid-column: 1;
    }

    .home-page .about-statement {
        font-size: clamp(3.2rem, 12vw, 5.8rem);
    }

    .home-page .about-stage > div {
        justify-self: start;
    }

    .home-page .projects-section {
        padding: 64px 20px;
    }

    .home-page .projects-container {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .home-page .project:nth-child(even) {
        margin-top: 0;
    }

    .home-page .project-image {
        aspect-ratio: 1.1 / 1;
    }

    .contact-page {
        min-height: calc(100svh - 110px);
    }

    .contact-page .contact-section {
        padding: 64px 22px;
    }

    .contact-page .contact-simple-inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .contact-page .contact-simple-copy h1 {
        font-size: clamp(3.5rem, 17vw, 6rem);
    }

    .cv-section {
        padding: 22px 18px 48px;
    }

    .cv-title {
        margin-bottom: 30px;
        padding: 40px 20px;
        font-size: clamp(5rem, 23vw, 8rem);
    }

    .cv-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cv-image {
        width: min(100%, 300px);
        justify-self: start;
    }

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

    .cv-education-content,
    .cv-language {
        grid-template-columns: 1fr;
    }

    .cv-education .cv-learning {
        grid-template-columns: repeat(4, minmax(40px, 54px));
        gap: 14px;
    }

}

/* Projects page uses the same display style and palette as the homepage. */
body:has(.projects-page) {
    background: #eee8da;
    color: #191512;
}

body:has(.projects-page) .site-header {
    background: #f5f1e8 !important;
    color: #191512 !important;
}

body:has(.projects-page) .site-header .navbar,
body:has(.projects-page) .site-header .nav-links,
body:has(.projects-page) .site-header .language-switch {
    background: transparent !important;
    border: 0 !important;
}

body:has(.projects-page) .site-header .nav-links a,
body:has(.projects-page) .site-header .language-switch a {
    color: #191512 !important;
}

body:has(.projects-page) .site-header .language-switch a[aria-current="true"] {
    color: #a63720 !important;
}

.projects-page {
    min-height: calc(100svh - 90px);
    background: #eee8da;
    color: #191512;
}

.projects-page .projects-section {
    min-height: 100vh;
    padding: clamp(40px, 7vw, 100px) clamp(22px, 5vw, 76px) 110px;
    background: #eee8da;
    color: #191512;
}

.projects-page .projects-title {
    width: min(100%, 1450px);
    margin: 0 auto clamp(40px, 6vw, 88px);
    padding-bottom: 20px;
    border-bottom: 2px solid #191512;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
    font-size: clamp(5rem, 14vw, 13rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 0.82;
    text-align: left;
}

.projects-page .projects-title h1 {
    margin: 0;
    font: inherit;
}

.projects-page .projects-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(42px, 7vw, 110px) clamp(24px, 5vw, 76px);
    width: min(100%, 1450px);
    max-width: none;
    margin: 0 auto;
}

.projects-page .project {
    width: 100%;
}

.projects-page .project:nth-child(even) {
    margin-top: clamp(52px, 9vw, 132px);
}

.projects-page .project-image {
    aspect-ratio: 1.1 / 1;
    border: 1px solid #191512;
}

.projects-page .project-carousel-track img {
    height: 100%;
    min-height: 0;
    filter: brightness(88%);
    object-fit: cover;
}

.projects-page .project-name {
    display: block;
    margin-top: 20px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif;
    font-size: clamp(1.7rem, 3.4vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 0.98;
}

.projects-page .project .project-meta {
    justify-content: flex-end;
    gap: 10px 18px;
    margin-top: 16px;
}

.projects-page .project .project-type {
    color: #625a51;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.projects-page .project .project-toggle {
    font-size: 0.88rem;
    font-weight: 700;
    text-underline-offset: 4px;
}

.projects-page .project-website {
    display: inline-flex;
    margin-top: 16px;
}

.projects-page + .site-footer {
    background: #eee8da;
    color: #191512;
}

@media (max-width: 760px) {
    .projects-page .projects-section {
        min-height: 0;
        padding: 42px 20px 72px;
    }

    .projects-page .projects-title {
        margin-bottom: 38px;
        padding-bottom: 14px;
        font-size: clamp(5rem, 21vw, 8rem);
    }

    .projects-page .projects-container {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .projects-page .project:nth-child(even) {
        margin-top: 0;
    }

    .projects-page .project-image {
        aspect-ratio: 1.1 / 1;
    }

    .projects-page .project-carousel-track img {
        height: 100%;
    }
}

/* Shared dark visual system across every page. */
body:has(.home-page),
body:has(.projects-page),
body:has(.cv-page),
body:has(.project-detail-page),
body:has(.contact-page) {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

body:has(.home-page) .site-header,
body:has(.projects-page) .site-header,
body:has(.cv-page) .site-header,
body:has(.project-detail-page) .site-header,
body:has(.contact-page) .site-header {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

.site-header .navbar,
.site-header .language-switch {
    background: transparent !important;
    border-color: #ffede4 !important;
    color: #ffede4 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    color: #ffede4 !important;
}

.site-header .nav-links a:hover,
.site-header .language-switch a:hover,
.site-header .language-switch a[aria-current="true"] {
    color: #ff684b !important;
}

.home-page,
.home-page .profile-strip,
.home-page .about-section,
.home-page .projects-section,
.projects-page,
.projects-page .projects-section,
.cv-page,
.project-detail-page,
.contact-page,
.contact-page .contact-section {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

.home-page .profile-strip {
    border-color: #654238 !important;
}

.home-page .profile-strip > div {
    border-color: #654238 !important;
}

.home-page .profile-strip span,
.home-page .about-label {
    color: #ff684b !important;
}

.home-page .profile-strip p,
.home-page .about-description,
.contact-page .contact-simple-copy p {
    color: #ffede4 !important;
}

.home-page .about-statement,
.home-page .projects-title,
.projects-page .projects-title,
.cv-title,
.cv-projects h2,
.cv-education h2,
.cv-language h2,
.contact-page .contact-simple-copy h1,
.project-detail-content > h1,
.project-detail-description h2 {
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "DejaVu Sans Condensed", sans-serif !important;
    font-weight: 900 !important;
}

.home-page .about-statement {
    color: #ffede4 !important;
    font-size: clamp(3.5rem, 9.5vw, 10rem) !important;
    letter-spacing: -0.035em !important;
    line-height: 0.9 !important;
}

.home-page .about-stage a.cv,
.projects-page .project-name,
.projects-page .project .project-meta,
.cv-page,
.project-detail-page,
.contact-page {
    color: #ffede4;
}

.projects-page .projects-title {
    font-size: clamp(5rem, 14vw, 13rem) !important;
}

.projects-page .project-image,
.project-detail-page .project-gallery img {
    border-color: #ff684b !important;
}

.projects-page .project .project-type,
.project-detail-description p,
.project-detail-description h2,
.project-detail-content > h1,
.project-detail-back {
    color: #ffede4 !important;
}

.project-detail-page {
    padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 76px) 100px !important;
}

.project-detail-content {
    width: min(100%, 1450px) !important;
}

.project-detail-back {
    margin-bottom: clamp(28px, 5vw, 64px) !important;
    color: #ff684b !important;
}

.project-detail-content > h1 {
    margin-bottom: clamp(30px, 5vw, 64px) !important;
    font-size: clamp(3.5rem, 9vw, 9rem) !important;
    letter-spacing: -0.025em;
    line-height: 0.9 !important;
}

.project-detail-page .project-gallery {
    gap: clamp(12px, 2vw, 24px) !important;
}

.project-detail-description {
    border-color: #ff684b !important;
}

.project-detail-tech,
.project-technologies li {
    color: #ffede4 !important;
}

.project-technologies li {
    border-color: #654238 !important;
}

.project-detail-actions a,
.cv-actions .cv-github a,
.cv-actions .cv-download {
    border-color: #ff684b !important;
}

.project-detail-actions .project-website,
.cv-actions .cv-download {
    background: #a63720 !important;
    color: #fff3eb !important;
}

.project-detail-actions .project-source-link,
.cv-actions .cv-github a {
    background: #ffede4 !important;
    color: #1b0d0a !important;
}

.cv-page {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

.cv-title {
    background: #2b1712 !important;
    border-color: #ff684b !important;
    color: #ffede4 !important;
}

.cv-column p,
.cv-contact p,
.cv-project-list p,
.cv-education p,
.cv-language p,
.cv-contact a,
.cv-project-list h3,
.cv-education h3 {
    color: #ffede4 !important;
}

.cv-skills th,
.cv-skills td {
    border-color: #654238 !important;
    background: #2b1712 !important;
    color: #ffede4 !important;
}

.cv-skills thead,
.cv-skills thead th {
    background: #ffede4 !important;
    color: #1b0d0a !important;
}

.cv-project-list li,
.cv-education,
.cv-language {
    border-color: #654238 !important;
}

.cv-image {
    border-color: #ff684b !important;
}

.contact-page .contact-simple-links .contact-link-card {
    border-color: #654238 !important;
    background: #2b1712 !important;
    color: #ffede4 !important;
}

.contact-page .contact-simple-links .contact-link-card:hover {
    border-color: #ff684b !important;
    background: #a63720 !important;
    color: #fff3eb !important;
}

.home-page + .site-footer,
.projects-page + .site-footer,
.cv-page + .site-footer,
.contact-page + .site-footer,
.project-detail-page + .site-footer {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

@media (max-width: 760px) {
    .project-detail-page .project-gallery {
        grid-template-columns: 1fr !important;
    }

    .project-detail-content > h1 {
        font-size: clamp(3rem, 13vw, 5.5rem) !important;
    }
}

@media print {
    body:has(.cv-page),
    .cv-page {
        background: #eee8da !important;
        color: #191919 !important;
    }

    .cv-title {
        background: #eee8da !important;
        border-color: #191919 !important;
        color: #191919 !important;
    }

    .cv-column p,
    .cv-contact p,
    .cv-project-list p,
    .cv-education p,
    .cv-language p,
    .cv-contact a,
    .cv-project-list h3,
    .cv-education h3,
    .cv-skills th,
    .cv-skills td {
        background: transparent !important;
        color: #191919 !important;
    }

    .cv-skills thead,
    .cv-skills thead th {
        background: #191919 !important;
        color: #eee8da !important;
    }

    .cv-project-list li,
    .cv-education,
    .cv-language,
    .cv-image {
        border-color: #191919 !important;
    }
}

/* Final navigation and Work-page overrides. */
body:has(.home-page) .site-header,
body:has(.projects-page) .site-header,
body:has(.cv-page) .site-header,
body:has(.project-detail-page) .site-header,
body:has(.contact-page) .site-header {
    display: flex !important;
    min-height: 72px;
    align-items: center;
    justify-content: flex-start !important;
    padding: 12px clamp(20px, 4vw, 64px) !important;
}

body:has(.home-page) .site-header .navbar,
body:has(.projects-page) .site-header .navbar,
body:has(.cv-page) .site-header .navbar,
body:has(.project-detail-page) .site-header .navbar,
body:has(.contact-page) .site-header .navbar {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.site-header .nav-links {
    display: flex !important;
    justify-content: flex-start !important;
    gap: clamp(14px, 2.2vw, 34px) !important;
    margin: 0 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    margin: 0 !important;
}

.site-header .language-switch {
    margin: 0 0 0 auto !important;
}

.projects-page .projects-section {
    min-height: 0 !important;
    padding-top: 24px !important;
}

.projects-page .projects-title {
    margin-bottom: 28px !important;
    font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
    font-size: clamp(8rem, 19vw, 23rem) !important;
    letter-spacing: -0.09em !important;
    line-height: 0.78 !important;
}

.projects-page .projects-title h1 {
    font: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
}

.projects-page .projects-container {
    gap: 56px clamp(24px, 5vw, 76px) !important;
}

.projects-page .project:nth-child(even) {
    margin-top: 52px !important;
}

.projects-page .project-image {
    aspect-ratio: 1.22 / 1 !important;
}

.projects-page .project-carousel-track img {
    height: 100% !important;
}

.projects-page .project-name {
    font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
    font-size: clamp(1.8rem, 3.2vw, 3.4rem) !important;
    letter-spacing: -0.045em !important;
    line-height: 1 !important;
}

.projects-page .project .project-meta {
    justify-content: flex-end !important;
}

.projects-page .project-preview-link {
    color: #ffede4 !important;
}

.projects-page .project-preview-link:hover .project-name {
    color: #ff684b !important;
}

.projects-page .project .project-toggle {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #ffede4;
    border-radius: 999px;
    color: #ffede4 !important;
    text-decoration: none !important;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.projects-page .project .project-toggle:hover {
    border-color: #ff684b;
    background: #ff684b;
    color: #1b0d0a !important;
}

.projects-page .project-website {
    display: inline-flex !important;
    align-items: center;
    min-height: 42px;
    padding: 0 18px !important;
    border: 1px solid #a63720 !important;
    border-radius: 999px !important;
    background: #a63720 !important;
    color: #fff3eb !important;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.projects-page .project-website:hover,
.projects-page .project-website:focus-visible {
    border-color: #ff684b !important;
    background: #ff684b !important;
    color: #1b0d0a !important;
}

@media (max-width: 760px) {
    .projects-page .projects-section {
        padding-top: 30px !important;
    }

    .projects-page .projects-title {
        margin-bottom: 28px !important;
        font-size: clamp(6rem, 24vw, 11rem) !important;
    }

    .projects-page .projects-container {
        gap: 40px !important;
    }

    .projects-page .project:nth-child(even) {
        margin-top: 0 !important;
    }
}

/* Final overrides for readable navigation and a cleaner CV. */
body:has(.home-page) .site-header .nav-links a,
body:has(.projects-page) .site-header .nav-links a,
body:has(.cv-page) .site-header .nav-links a,
body:has(.project-detail-page) .site-header .nav-links a,
body:has(.contact-page) .site-header .nav-links a,
body:has(.home-page) .site-header .language-switch a,
body:has(.projects-page) .site-header .language-switch a,
body:has(.cv-page) .site-header .language-switch a,
body:has(.project-detail-page) .site-header .language-switch a,
body:has(.contact-page) .site-header .language-switch a {
    color: #ffede4 !important;
}

body:has(.home-page) .site-header .nav-links a:hover,
body:has(.projects-page) .site-header .nav-links a:hover,
body:has(.cv-page) .site-header .nav-links a:hover,
body:has(.project-detail-page) .site-header .nav-links a:hover,
body:has(.contact-page) .site-header .nav-links a:hover,
body:has(.home-page) .site-header .language-switch a[aria-current="true"],
body:has(.projects-page) .site-header .language-switch a[aria-current="true"],
body:has(.cv-page) .site-header .language-switch a[aria-current="true"],
body:has(.project-detail-page) .site-header .language-switch a[aria-current="true"],
body:has(.contact-page) .site-header .language-switch a[aria-current="true"] {
    color: #ff684b !important;
}

@media screen {
    .cv-section {
        width: min(100%, 1480px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: clamp(28px, 4vw, 60px) clamp(20px, 5vw, 76px) 80px !important;
    }

    .cv-title {
        margin: 0 0 42px !important;
        padding: 0 0 16px !important;
        border: 0 !important;
        border-bottom: 1px solid #654238 !important;
        background: transparent !important;
        color: #ffede4 !important;
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(6rem, 14vw, 12rem) !important;
        letter-spacing: -0.085em !important;
        line-height: 0.8 !important;
        text-align: left !important;
    }

    .cv-content {
        grid-template-columns: minmax(0, 1fr) clamp(180px, 22vw, 280px) !important;
        align-items: start !important;
        gap: clamp(26px, 5vw, 72px) !important;
    }

    .cv-column p,
    .cv-contact p {
        max-width: 68ch;
        margin: 0 0 12px !important;
        color: #ffede4 !important;
        font-size: clamp(0.98rem, 1.1vw, 1.1rem) !important;
        line-height: 1.65 !important;
    }

    .cv-image {
        width: 100% !important;
        max-width: 280px !important;
        border: 1px solid #654238 !important;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language {
        margin-top: 48px !important;
    }

    .cv-projects h2,
    .cv-education h2,
    .cv-language h2 {
        margin-bottom: 20px !important;
        color: #ffede4 !important;
        font-family: "DejaVu Sans Condensed", "Arial Narrow", sans-serif !important;
        font-size: clamp(1.8rem, 3.4vw, 3.5rem) !important;
        letter-spacing: -0.05em !important;
    }

    .cv-skills th,
    .cv-skills td {
        padding: 16px 20px !important;
        border-color: #654238 !important;
        background: #2b1712 !important;
        color: #ffede4 !important;
    }

    .cv-skills thead th {
        background: #ffede4 !important;
        color: #1b0d0a !important;
    }

    .cv-project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 40px !important;
    }

    .cv-project-list li,
    .cv-education,
    .cv-language {
        border-color: #654238 !important;
    }

    .cv-project-list h3,
    .cv-project-list p,
    .cv-education h3,
    .cv-education p,
    .cv-language p,
    .cv-contact a {
        color: #ffede4 !important;
    }
}

@media screen and (max-width: 760px) {
    .cv-content {
        grid-template-columns: 1fr !important;
    }

    .cv-image {
        width: min(100%, 250px) !important;
        justify-self: start !important;
    }

    .cv-project-list {
        grid-template-columns: 1fr !important;
    }
}

/* Keep the navbar dimensions identical on the homepage and inner pages. */
.site-header {
    display: flex !important;
    width: 100% !important;
    min-height: 72px !important;
    height: 72px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    padding: 12px clamp(20px, 4vw, 64px) !important;
}

.site-header .navbar {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0 clamp(18px, 2.4vw, 36px) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    display: inline-flex !important;
    min-height: 36px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1 !important;
}

.site-header .language-switch {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
}

@media screen and (max-width: 760px) {
    .site-header {
        min-height: 72px !important;
        height: auto !important;
        flex-wrap: wrap !important;
        gap: 4px 14px !important;
        padding: 10px 18px !important;
    }

    .site-header .nav-links {
        gap: 0 16px !important;
    }

    .site-header .nav-links a,
    .site-header .language-switch a {
        min-height: 36px !important;
        font-size: 0.82rem !important;
    }
}

/* Shared outlined button style, based on the Play Pong reference. */
.home-page .about-stage a.cv,
.home-page .project-toggle,
.home-page .project-website,
.projects-page .project-toggle,
.projects-page .project-website,
.project-detail-actions a,
.cv-actions .cv-github a,
.cv-actions .cv-download {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 20px !important;
    border: 1px solid #ff684b !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ffede4 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.home-page .about-stage a.cv:hover,
.home-page .about-stage a.cv:focus-visible,
.home-page .project-toggle:hover,
.home-page .project-website:hover,
.projects-page .project-toggle:hover,
.projects-page .project-website:hover,
.project-detail-actions a:hover,
.project-detail-actions a:focus-visible,
.cv-actions .cv-github a:hover,
.cv-actions .cv-download:hover,
.cv-actions .cv-download:focus-visible {
    border-color: #ff684b !important;
    background: #ff684b !important;
    color: #1b0d0a !important;
    text-decoration: none !important;
}

.home-page .all-projects-button {
    width: fit-content !important;
}

.project-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 600px) {
    .project-detail-actions a,
    .cv-actions .cv-github a,
    .cv-actions .cv-download {
        min-height: 44px !important;
        padding: 10px 14px !important;
        font-size: 0.82rem !important;
    }
}

/* Print the current CV design instead of the older beige print layout. */
@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body,
    body:has(.cv-page),
    .cv-page {
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #1b0d0a !important;
        color: #ffede4 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        font-size: 9pt !important;
    }

    body:has(.cv-page) .site-header,
    body:has(.cv-page) .site-footer,
    body:has(.cv-page) .cv-actions {
        display: none !important;
    }

    .cv-section {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cv-title {
        margin: 0 0 4mm !important;
        padding: 0 0 2mm !important;
        border-color: #ff684b !important;
        background: transparent !important;
        color: #ffede4 !important;
        font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif !important;
        font-size: 34pt !important;
        letter-spacing: -0.06em !important;
        line-height: 0.95 !important;
        text-align: left !important;
    }

    .cv-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 26mm !important;
        gap: 5mm !important;
        align-items: start !important;
    }

    .cv-column p,
    .cv-contact p {
        margin: 0 0 1.5mm !important;
        color: #ffede4 !important;
        font-size: 9pt !important;
        line-height: 1.25 !important;
    }

    .cv-contact { margin-top: 2mm !important; }
    .cv-image {
        display: block !important;
        width: 26mm !important;
        max-width: 26mm !important;
        margin: 0 !important;
        border: 1px solid #ff684b !important;
    }
    .cv-image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 5 !important;
        object-fit: cover !important;
    }

    .cv-skills,
    .cv-projects,
    .cv-education,
    .cv-language {
        margin-top: 4mm !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .cv-skills th,
    .cv-skills td {
        padding: 2mm 2.5mm !important;
        border-color: #654238 !important;
        background: #2b1712 !important;
        color: #ffede4 !important;
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }
    .cv-skills thead th {
        background: #ffede4 !important;
        color: #1b0d0a !important;
    }

    .cv-projects h2,
    .cv-education h2,
    .cv-language h2 {
        margin: 0 0 2mm !important;
        color: #ffede4 !important;
        font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif !important;
        font-size: 14pt !important;
        letter-spacing: -0.03em !important;
    }
    .cv-project-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 2mm 6mm !important;
    }
    .cv-project-list li {
        padding-top: 1.5mm !important;
        border-color: #654238 !important;
        break-inside: avoid !important;
    }
    .cv-project-list h3,
    .cv-education h3,
    .cv-education p,
    .cv-language p,
    .cv-project-list p {
        margin: 0 0 1mm !important;
        color: #ffede4 !important;
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }
    .cv-education-content,
    .cv-language {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 4mm !important;
        align-items: center !important;
    }
    .cv-education .cv-technologies h3 { margin-bottom: 2mm !important; }
    .cv-education .cv-learning {
        display: grid !important;
        grid-template-columns: repeat(4, 8mm) !important;
        justify-content: start !important;
        align-items: center !important;
        gap: 2mm !important;
    }
    .cv-education .cv-learning img {
        width: 8mm !important;
        height: 8mm !important;
        object-fit: contain !important;
    }
    .cv-flags {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 4mm !important;
        font-size: 13pt !important;
    }
}

/* Keep the shared navigation the same on every page. */
.site-header {
    display: flex !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 80px !important;
    min-height: 80px !important;
    padding: 12px clamp(20px, 4vw, 64px) !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.site-header .navbar {
    display: flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 clamp(18px, 2.4vw, 36px) !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .nav-links a,
.site-header .language-switch a {
    display: inline-flex !important;
    min-height: 44px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.site-header .language-switch {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
}

@media screen and (max-width: 760px) {
    .site-header {
        height: auto !important;
        min-height: 72px !important;
        flex-wrap: wrap !important;
        gap: 4px 14px !important;
        padding: 10px 18px !important;
    }

    .site-header .navbar {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .site-header .nav-links {
        flex-wrap: wrap !important;
        gap: 0 16px !important;
        width: 100% !important;
    }

    .site-header .nav-links a,
    .site-header .language-switch a {
        min-height: 36px !important;
        font-size: 0.82rem !important;
    }
}

.about-details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 28px;
    justify-self: stretch;
}

.about-copy nav {
    margin-top: 24px;
}

.home-page .about-stage > .about-details {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 28px;
}
.about-copy {
    text-align: left;
}
.home-page .about-copy nav .cv {
    margin: 0;
}
.about-photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 760px) {
    .home-page .about-stage > .about-details {
        grid-template-columns: minmax(0, 1fr) 110px;
        gap: 14px;
    }

    .about-photo {
        width: 100%;
    }
}

.home-page .creative-name,
.home-page .creative-kicker {
    color: #ffede4;
}

@media screen and (max-width: 760px) {
    body:has(.home-page) .site-header {
        display: flex !important;
        min-height: 64px !important;
        height: auto !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px 14px !important;
    }

    body:has(.home-page) .site-header .navbar {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    body:has(.home-page) .site-header .nav-links {
        flex-wrap: wrap !important;
        gap: 2px 10px !important;
    }

    body:has(.home-page) .site-header .nav-links a,
    body:has(.home-page) .site-header .language-switch a {
        min-height: 30px !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.04em !important;
    }

    body:has(.home-page) .site-header .language-switch {
        flex: 0 0 auto !important;
        gap: 8px !important;
    }

    .home-page .hero-creative {
        min-height: max(540px, calc(100vh - 64px));
        min-height: max(540px, calc(100svh - 64px));
        justify-content: space-between;
        gap: 16px;
        padding: 24px 18px 28px;
    }

    .home-page .creative-headline {
        margin: 0;
    }
}

/* Temporary palette preview: use the homepage brown on every page. */
body:has(.projects-page),
body:has(.cv-page),
body:has(.project-detail-page),
body:has(.contact-page),
.projects-page,
.projects-page .projects-section,
.cv-page,
.cv-section,
.project-detail-page,
.project-detail-content,
.contact-page,
.contact-page .contact-section,
.projects-page + .site-footer,
.cv-page + .site-footer,
.project-detail-page + .site-footer,
.contact-page + .site-footer {
    background: #1b0d0a !important;
    color: #ffede4 !important;
}

/* Work page: two large, aligned image blocks per row. */
.projects-page .projects-section {
    padding-right: clamp(20px, 2.5vw, 48px) !important;
    padding-left: clamp(20px, 2.5vw, 48px) !important;
}

.projects-page .projects-title,
.projects-page .projects-container {
    width: 100% !important;
    max-width: none !important;
}

.projects-page .projects-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
    column-gap: clamp(12px, 1vw, 20px) !important;
    row-gap: clamp(56px, 8vw, 112px) !important;
}

.projects-page .project:nth-child(even) {
    margin-top: 0 !important;
}

.projects-page .project {
    width: 100% !important;
    min-width: 0;
}

.projects-page .project-preview-link {
    margin: 0;
}

.projects-page .project-image {
    position: relative;
    display: block;
    height: auto !important;
    width: 100%;
    margin: 0;
    aspect-ratio: 4 / 3 !important;
}

.projects-page .project-carousel-track {
    position: absolute;
    inset: 0;
    height: 100%;
}

.projects-page .project-carousel-track img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

@media (max-width: 760px) {
    .projects-page .projects-container {
        grid-template-columns: minmax(0, 1fr) !important;
        row-gap: 42px !important;
    }

    .projects-page .project:nth-child(even) {
        margin-top: 0 !important;
    }

    .projects-page .project .project-image {
        aspect-ratio: 4 / 3 !important;
    }
}
