@import url(
  'https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Space+Grotesk:wght@600;700&display=swap'
);


:root {

  --ink: #111111;

  --paper: #fffdf7;

  --chrome: #d8d8d8;

  --yellow: #f6d365;

  --blue: #9fd3ff;

  --pink: #f7b3cb;

  --green: #b8e7c5;

  --lav: #c8b7ff;

  --surface: #ffffff;

  --muted: #666666;

  --desktop-bg: #111111;

  --hard-shadow: #111111;

  --dot: #111111;

  --placeholder: #eeeeea;

  --placeholder-dot: #aaaaaa;

  --nav-height: 80px;

  --line: 3px solid var(--ink);

}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f0e8;
  --paper: #111315;
  --chrome: #26292d;
  --surface: #181b1f;
  --muted: #aaa9a4;
  --desktop-bg: #08090a;
  --hard-shadow: #d8d3c8;
  --dot: #686b70;
  --placeholder: #20242a;
  --placeholder-dot: #575c63;
  --yellow: #735f29;
  --blue: #294e68;
  --pink: #704052;
  --green: #365b47;
  --lav: #514778;
}


* {

  box-sizing: border-box;

}


html {

  scroll-behavior: smooth;

}


body {

  margin: 0;

  background: #111;

  color: #111;

  font-family:
    "DM Sans",
    sans-serif;

}


a {

  color: inherit;

}


/* ================================
   NAVBAR
================================ */

.topbar {

  position: sticky;

  top: 0;

  z-index: 20;

  max-width: 1500px;

  margin: auto;

  padding: 10px 22px;

  display: flex;

  align-items: center;

  gap: 34px;

  background: var(--chrome);

  border: var(--line);

}


.logo {

  display: grid;

  place-items: center;

  width: 54px;

  height: 54px;

  padding: 3px;

  overflow: hidden;

  background: #111;

  border-radius: 8px;

  text-decoration: none;

  font-weight: 700;

}

.logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


nav {

  display: flex;

  gap: 30px;

  flex-wrap: wrap;

}


nav a {

  font:

    700 19px
    "Space Grotesk";

  text-decoration: none;

}


nav a:hover {

  text-decoration: underline;

}

nav a.doom-link:hover,
nav a.doom-link:focus-visible {
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  nav a.doom-link:hover {
    animation: doom-link-flicker 180ms steps(2, end) 1;
  }
}

@keyframes doom-link-flicker {
  50% { opacity: 0.45; }
}


/* ================================
   MAIN
================================ */

main {

  max-width: 1500px;

  margin: auto;

  background: var(--paper);

  border-left: var(--line);

  border-right: var(--line);

}


/* ================================
   GENERAL SECTION
================================ */

.section {

  padding:

    88px
    clamp(
      22px,
      7vw,
      105px
    );

  border-bottom: var(--line);

}


/* retro dot background */

.pattern {

  background-color: #ffffff;

  background-image:

    radial-gradient(
      #111 0.7px,
      transparent 0.7px
    );

  background-size:

    5px
    5px;

}


/* ================================
   HERO
================================ */

.hero {

  min-height:

    calc(
      100vh - 77px
    );

  display: grid;

  grid-template-columns:

    1fr
    0.9fr;

  gap: 60px;

  align-items: center;

}


.hero h1 {

  font:

    700
    clamp(
      64px,
      8vw,
      128px
    )
    / 0.95
    "Space Grotesk";

  letter-spacing: -0.06em;

  margin: 0;

}


.kicker,
.file {

  font:

    700 13px
    "Space Grotesk";

  text-transform: uppercase;

  letter-spacing: 0.1em;

}


.lead {

  font-size: 21px;

  line-height: 1.55;

  max-width: 650px;

}


/* ================================
   BUTTON
================================ */

.btn {

  display: inline-block;

  padding:

    14px
    20px;

  background:

    var(--chrome);

  border:

    var(--line);

  box-shadow:

    6px 6px
    0 #111;

  text-decoration: none;

  font-weight: 700;

}


/* ================================
   RETRO WINDOW
================================ */

.window {

  background: #ffffff;

  border: var(--line);

  box-shadow:

    9px
    9px
    0 #111;

}


.windowbar {

  min-height: 56px;

  padding:

    12px
    18px;

  background:

    var(--chrome);

  border-bottom:

    var(--line);

  display: flex;

  justify-content:

    space-between;

  align-items: center;

  font:

    700 15px
    "Space Grotesk";

}


/* ================================
   PROFILE
================================ */

.profilebox {

  padding: 34px;

  text-align: center;

  background:

    var(--yellow);

}


.profilebox img {

  width: 210px;

  height: 210px;

  border-radius: 0;

  object-fit: cover;

  border:

    var(--line);

  background: white;

}


.profilebox h2 {

  font:

    700 30px
    "Space Grotesk";

}


/* ================================
   QUICK LINKS
================================ */

.quick {

  grid-column:

    1 / -1;

}


.quickgrid {

  display: grid;

  grid-template-columns:

    repeat(
      4,
      1fr
    );

  border:

    var(--line);

}


.quickgrid a {

  padding: 20px;

  background:

    var(--chrome);

  font-weight: 700;

  text-decoration: none;

  border-right:

    var(--line);

}


.quickgrid a:last-child {

  border-right: 0;

}


.quickgrid a:hover {

  background:

    var(--yellow);

}


/* ================================
   TITLE
================================ */

.title {

  font:

    700
    clamp(
      52px,
      6vw,
      90px
    )
    / 0.95
    "Space Grotesk";

  letter-spacing:

    -0.06em;

  margin:

    0
    0
    50px;

}


/* ================================
   EXPERIENCE TIMELINE
================================ */

.timeline {

  max-width: 1080px;

  margin: auto;

}


.timeline article {

  display: grid;

  grid-template-columns:

    120px
    28px
    82px
    1fr;

  gap: 16px;

  min-height: 150px;

  position: relative;

}


.timeline article::before {

  content: "";

  position: absolute;

  left: 133px;

  top: 20px;

  bottom: -20px;

  width: 2px;

  background:

    #bbbbbb;

}


.timeline article:last-child::before {

  display: none;

}


.timeline time {

  text-align: right;

  font-weight: 700;

  color: #777;

  padding-top: 8px;

}


.timeline i {

  width: 14px;

  height: 14px;

  border-radius: 50%;

  background: #111;

  margin: 10px auto;

  z-index: 2;

}


.timeline img {

  width: 80px;

  height: 80px;

  object-fit: contain;

  background: white;

  border:

    1px solid #dddddd;

}


.timeline h3 {

  font:

    700 27px
    "Space Grotesk";

  margin:

    0
    0
    3px;

}


.timeline p {

  font-size: 17px;

  line-height: 1.5;

}


/* ================================
   PROJECTS
================================ */

.cards {

  display: grid;

  grid-template-columns:

    repeat(
      2,
      1fr
    );

  gap: 50px;

}


.cover {

  aspect-ratio:

    16 / 7;

  display: grid;

  place-items: center;

  border-bottom:

    var(--line);

  font-weight: 700;

}


.blue {

  background:

    var(--blue);

}


.pink {

  background:

    var(--pink);

}


.green {

  background:

    var(--green);

}


.lavender {

  background:

    var(--lav);

}


.body {

  padding: 28px;

}


.body h3 {

  font:

    700 30px
    "Space Grotesk";

  margin:

    0
    0
    12px;

}


.body p {

  font-size: 17px;

  line-height: 1.5;

}


.body strong {

  display: block;

  margin-top: 12px;

}


/* ================================
   CERTIFICATES
================================ */

.files {

  background: white;

  border:

    var(--line);

}


.files div {

  padding:

    20px
    24px;

  border-bottom:

    var(--line);

  display: flex;

  justify-content:

    space-between;

  font-weight: 700;

}


.files div:last-child {

  border-bottom: 0;

}


.files span {

  color:

    #777777;

  font-weight:

    400;

}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.certificate-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.certificate-card .windowbar {
  min-width: 0;
  align-items: flex-start;
}

.certificate-card .windowbar b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.certificate-body {
  flex: 1;
  padding: 22px 24px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 18px;
  background: #fff;
}

.certificate-body h3 {
  grid-column: 1 / -1;
  margin: 0;
  font: 700 22px / 1.25 "Space Grotesk";
  overflow-wrap: anywhere;
}

.certificate-body span {
  color: #666;
  font-weight: 700;
}

.certificate-body a {
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--chrome);
  font: 700 14px "Space Grotesk";
  text-decoration: none;
}

.certificate-body a:hover,
.certificate-body a:focus-visible {
  background: var(--yellow);
}


/* ================================
   DOCUMENTS
================================ */

.doc {

  max-width:

    620px;

}


.doc a {

  display: block;

  padding:

    30px;

  font:

    700 22px
    "Space Grotesk";

  text-decoration:

    none;

}


.doc a:hover {

  background:

    var(--yellow);

}


/* ================================
   CONTACT
================================ */

.contact {

  background:

    var(--yellow);

  text-align:

    center;

}


.contact p:last-child {

  font:

    700 22px
    "Space Grotesk";

}


/* ================================
   TABLET
================================ */

@media
(max-width: 900px) {

  .hero {

    grid-template-columns:

      1fr;

  }


  .quickgrid,
  .cards {

    grid-template-columns:

      1fr 1fr;

  }


  .timeline article {

    grid-template-columns:

      90px
      24px
      60px
      1fr;

  }


  .timeline article::before {

    left: 101px;

  }


  .timeline img {

    width: 58px;

    height: 58px;

  }


}


/* ================================
   MOBILE
================================ */

@media
(max-width: 620px) {

  .topbar {

    position:

      relative;

    align-items:

      flex-start;

  }


  .section {

    padding:

      58px
      18px;

  }


  .hero h1 {

    font-size:

      62px;

  }


  .quickgrid,
  .cards {

    grid-template-columns:

      1fr;

  }


  .timeline article {

    grid-template-columns:

      68px
      18px
      1fr;

  }


  .timeline article::before {

    left:

      76px;

  }


  .timeline img {

    grid-column:

      3;

  }


  .timeline article > div {

    grid-column:

      3;

  }


}


/* 2026 portfolio refinements */

body {
  cursor: default;
  overflow-x: hidden;
}

a,
button,
[role="button"] {
  cursor: pointer;
}

input,
textarea {
  cursor: text;
}

.profilebox img {
  width: 170px;
  height: 170px;
  object-position: center 38%;
}

.profilebox h2 {
  margin: 22px 0 8px;
}

.profile-title {
  margin: 0 0 7px;
  font: 700 17px "Space Grotesk";
}

.profile-meta {
  margin: 0;
  color: #5f5f5f;
  font-size: 15px;
}

.competitions-section {
  background: #fff;
}

.competition-list {
  border: var(--line);
  background: #fff;
}

.competition-list article {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  padding: 30px;
  border-bottom: var(--line);
}

.competition-list article:last-child {
  border-bottom: 0;
}

.competition-list span {
  font: 700 clamp(44px, 5vw, 72px) / 0.9 "Space Grotesk";
  letter-spacing: -0.06em;
}

.competition-list h3 {
  margin: 0 0 8px;
  font: 700 25px "Space Grotesk";
}

.competition-list p {
  max-width: 850px;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.project .windowbar {
  justify-content: flex-start;
  gap: 13px;
}

.project-blue .windowbar { background: var(--blue); }
.project-pink .windowbar { background: var(--pink); }
.project-green .windowbar { background: var(--green); }
.project-lavender .windowbar { background: var(--lav); }

.project .cover {
  background: #f4f4f1;
  color: #6c6c6c;
}

.project-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.project-actions a {
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: #fff;
  font: 700 14px "Space Grotesk";
  text-decoration: none;
}

.project-actions a:hover {
  background: var(--chrome);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skills-grid article {
  min-width: 0;
  padding: 28px;
  border: var(--line);
  box-shadow: 6px 6px 0 #111;
}

.skills-grid h3 {
  margin: 0 0 12px;
  font: 700 24px "Space Grotesk";
}

.skills-grid p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.skill-blue { background: var(--blue); }
.skill-pink { background: var(--pink); }
.skill-green { background: var(--green); }
.skill-yellow { background: var(--yellow); }
.skill-lavender { background: var(--lav); }

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .competition-list article {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 24px 20px;
  }

  .competition-list span { font-size: 46px; }
  .window { box-shadow: 6px 6px 0 #111; }
  .profilebox { padding: 28px 18px; }
  .profilebox img { width: 165px; height: 165px; }
}

/* Horizontal project desktop strip */

.cards {
  display: flex;
  grid-template-columns: none;
  gap: 34px;
  width: 100%;
  padding: 4px 10px 20px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--chrome);
  overscroll-behavior-inline: contain;
}

.cards::-webkit-scrollbar { height: 9px; }
.cards::-webkit-scrollbar-track { background: var(--chrome); }
.cards::-webkit-scrollbar-thumb { background: var(--ink); }

.project-card {
  flex: 0 0 min(78vw, 1100px);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* Clickable archive rows */

.files a {
  padding: 20px 24px;
  border-bottom: var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.files a:last-child { border-bottom: 0; }
.files a:hover,
.files a:focus-visible { background: var(--yellow); }
.files a[data-state="missing"] span { color: #666; font-weight: 400; }

/* Reusable document chrome colors */

.doc-yellow { background: var(--yellow); }
.doc-blue { background: var(--blue); }
.doc-pink { background: var(--pink); }
.doc-green { background: var(--green); }
.doc-lavender { background: var(--lav); }

@media (max-width: 620px) {
  .project-card { flex-basis: 88vw; }

  .cards {
    gap: 20px;
    padding-bottom: 16px;
  }

  .files a {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}


/* Rich project content and deferred local artwork */

.project-yellow .windowbar {
  background: var(--yellow);
}

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-bottom: var(--line);
  background: #eeeeea;
}

.project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.project-media img[hidden],
.highlight-image-wrap img[hidden] {
  display: none !important;
}

.project-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #555;
  background-color: #eeeeea;
  background-image: radial-gradient(#aaa 0.7px, transparent 0.7px);
  background-size: 6px 6px;
  font: 700 15px "Space Grotesk";
  letter-spacing: 0.12em;
}

.project-placeholder span {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.project-media.has-image .project-placeholder {
  display: none;
}

.project .body {
  padding: 24px 28px 26px;
}

.project .body h3 {
  margin-bottom: 5px;
  font-size: clamp(25px, 2.2vw, 31px);
  line-height: 1.08;
}

.project-subtitle {
  margin: 0 0 13px !important;
  color: #555;
  font: 700 16px "Space Grotesk";
}

.project-copy p {
  margin: 0 0 9px;
  font-size: 15.5px;
  line-height: 1.42;
}

.project-copy p:last-child {
  margin-bottom: 0;
}

.project-tech {
  margin: 14px 0 0 !important;
  padding: 9px 10px;
  border-left: 4px solid var(--ink);
  background: #f0f0ed;
  font: 700 13.5px / 1.35 "Space Grotesk";
}

.project-result {
  margin-top: 11px !important;
  font-size: 14px;
  line-height: 1.35;
}

.project-actions {
  flex-wrap: wrap;
  margin-top: 17px;
  padding-top: 13px;
}

.external-arrow {
  display: inline-block;
  margin-left: 0.15em;
  font-size: 1.08em;
  font-weight: 900;
  line-height: 1;
}

.experience-link {
  display: inline-block;
  margin: 0 0 25px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .projects-track {
    align-items: flex-start;
  }

  .is-scroll-driven .project-card .project-media {
    height: clamp(135px, 20vh, 210px);
    aspect-ratio: auto;
  }
}

@media (min-width: 769px) and (max-height: 820px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .project-card .project-media {
    height: 115px;
  }

  .is-scroll-driven .project .body {
    padding: 17px 22px 19px;
  }

  .is-scroll-driven .project .body h3 {
    font-size: 23px;
  }

  .is-scroll-driven .project-copy p {
    font-size: 14px;
    line-height: 1.3;
  }

  .is-scroll-driven .project-tech {
    margin-top: 8px !important;
    padding: 6px 8px;
    font-size: 12px;
  }

  .is-scroll-driven .project-result {
    margin-top: 7px !important;
    font-size: 12.5px;
  }
}

/* Larger portrait with a little more breathing room. */

.profilebox { padding: 40px 34px; }

.profilebox img {
  width: 220px;
  height: 220px;
  max-width: 100%;
  object-fit: cover;
  object-position: center 35%;
}

@media (max-width: 620px) {
  .profilebox { padding: 30px 18px; }
  .profilebox img { width: 210px; height: 210px; }
}


/* Scroll-driven projects: vertical fallback first, pinned enhancement on desktop. */

.projects-scroll-section {
  padding: 88px clamp(22px, 7vw, 105px);
  border-bottom: var(--line);
  background: var(--paper);
  scroll-margin-top: 0;
}

.projects-heading .title {
  margin-bottom: 34px;
}

.projects-viewport {
  min-width: 0;
}

.projects-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
  width: 100%;
  padding: 4px 10px 20px 4px;
  overflow: visible;
  scroll-snap-type: none;
  scrollbar-width: none;
  transform: none;
}

.projects-track::-webkit-scrollbar {
  display: none;
}

.projects-track .project-card {
  width: auto;
  min-width: 0;
  scroll-snap-align: none;
}

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .projects-scroll-section.is-scroll-driven {
    position: relative;
    height: var(--projects-scroll-height, 100vh);
    padding: 0;
  }

  .is-scroll-driven .projects-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: clamp(82px, 10vh, 105px) clamp(22px, 7vw, 105px) 28px;
    overflow: hidden;
    background: var(--paper);
  }

  .is-scroll-driven .projects-heading .title {
    margin-bottom: clamp(18px, 3vh, 30px);
    font-size: clamp(48px, 5vw, 72px);
  }

  .is-scroll-driven .projects-viewport {
    width: 100%;
    overflow: hidden;
  }

  .is-scroll-driven .projects-track {
    display: flex;
    width: max-content;
    gap: clamp(40px, 4vw, 60px);
    padding: 4px 12px 16px 4px;
    overflow: visible;
    will-change: transform;
  }

  .is-scroll-driven .project-card {
    flex: 0 0 min(72vw, 920px);
    width: min(72vw, 920px);
  }

  .is-scroll-driven .project-card .cover {
    height: clamp(150px, 25vh, 260px);
    aspect-ratio: auto;
  }
}

@media (min-width: 769px) and (max-height: 720px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .projects-sticky {
    padding-top: 78px;
  }

  .is-scroll-driven .projects-heading .file {
    margin: 0 0 6px;
  }

  .is-scroll-driven .projects-heading .title {
    margin-bottom: 14px;
    font-size: 46px;
  }

  .is-scroll-driven .project-card .cover {
    height: 130px;
  }

  .is-scroll-driven .project-card .body {
    padding: 20px 24px;
  }

  .is-scroll-driven .project-card .body h3 {
    font-size: 25px;
  }

  .is-scroll-driven .project-card .body p {
    margin: 8px 0;
  }

  .is-scroll-driven .project-actions {
    margin-top: 14px;
    padding-top: 12px;
  }
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .projects-scroll-section {
    height: auto !important;
  }

  .projects-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .projects-track {
    grid-template-columns: 1fr;
    transform: none !important;
  }
}

/* Shared pinned-horizontal behavior for Projects and Highlights. */

.highlights-scroll-section {
  padding: 88px clamp(22px, 7vw, 105px);
  border-bottom: var(--line);
  background: var(--paper);
  scroll-margin-top: 0;
}

.highlight-image-wrap .highlight-image--contain {
  object-fit: contain;
  object-position: center center;
  background: #000;
}

.highlight-card .highlight-caption {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.highlight-caption p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .pinned-horizontal-section.is-scroll-driven {
    position: relative;
    height: var(--pinned-scroll-height, 100vh);
    padding: 0;
  }

  .is-scroll-driven > .pinned-horizontal-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .is-scroll-driven .pinned-horizontal-viewport {
    width: 100%;
    overflow: hidden;
  }

  .is-scroll-driven .pinned-horizontal-track {
    will-change: transform;
  }

  .highlights-scroll-section.is-scroll-driven .highlights-sticky {
    padding: clamp(58px, 8vh, 82px) clamp(22px, 7vw, 105px) 24px;
    background-color: var(--paper);
  }

  .is-scroll-driven .highlights-heading .title {
    margin: 0 0 14px;
    font-size: clamp(48px, 5vw, 72px);
  }

  .is-scroll-driven .highlights-intro {
    margin: 0 0 clamp(18px, 3vh, 28px);
  }

  .is-scroll-driven .highlights-rail {
    width: max-content;
    padding: 4px 12px 16px 4px;
    gap: clamp(40px, 4vw, 60px);
    overflow: visible;
    scroll-behavior: auto;
    scroll-snap-type: none;
    scrollbar-width: none;
  }

  .is-scroll-driven .highlights-rail::-webkit-scrollbar {
    display: none;
  }

  .is-scroll-driven .highlight-card {
    width: max(360px, min(72vw, 900px, calc(133.333vh - 493px)));
    flex: 0 0 max(360px, min(72vw, 900px, calc(133.333vh - 493px)));
    scroll-snap-align: none;
  }

  .is-scroll-driven .highlight-caption {
    height: 110px;
    min-height: 110px;
  }
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .highlights-scroll-section {
    height: auto !important;
  }

  .highlights-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .highlights-track {
    transform: none !important;
  }
}

@media (max-width: 620px) {
  .highlights-scroll-section {
    padding: 58px 18px;
  }
}

html[data-theme="dark"] .highlights-scroll-section,
html[data-theme="dark"] .highlights-scroll-section.is-scroll-driven .highlights-sticky {
  background-color: var(--paper);
}

/* Career highlights rail and retro lightbox. */

.highlights-intro {
  max-width: 720px;
  margin: -28px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.highlights-rail {
  width: 100%;
  padding: 6px 12px 22px 4px;
  display: flex;
  gap: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--chrome);
  overscroll-behavior-inline: contain;
}

.highlights-rail::-webkit-scrollbar {
  height: 9px;
}

.highlights-rail::-webkit-scrollbar-track {
  background: var(--chrome);
}

.highlights-rail::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.highlight-card {
  flex: 0 0 min(46vw, 650px);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.highlight-card:hover,
.highlight-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 12px 12px 0 var(--hard-shadow);
}

.highlight-card .windowbar {
  min-height: 56px;
  justify-content: flex-start;
  gap: 12px;
}

.highlight-card .windowbar b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-open {
  width: 100%;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.highlight-open:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: -6px;
}

.highlight-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: var(--line);
  background-color: var(--placeholder);
  background-image: radial-gradient(var(--placeholder-dot) 0.7px, transparent 0.7px);
  background-size: 6px 6px;
}

.highlight-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.highlight-image-wrap.has-image .highlight-placeholder {
  display: none;
}

.highlight-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 700 16px "Space Grotesk";
  letter-spacing: 0.14em;
}

.highlight-caption {
  min-height: 92px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  background: var(--surface);
}

.highlight-caption h3 {
  margin: 0;
  font: 700 clamp(19px, 1.7vw, 25px) / 1.2 "Space Grotesk";
}

.highlight-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: clamp(14px, 4vw, 50px);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.84);
}

.highlight-lightbox[hidden] {
  display: none !important;
}

.highlight-lightbox-window {
  width: min(92vw, 1100px);
  max-height: 90vh;
  margin: 0;
}

.highlight-lightbox-window .windowbar {
  gap: 18px;
}

.highlight-lightbox-window .windowbar b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-close {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: 700 12px "Space Grotesk";
}

.highlight-lightbox-content {
  min-height: 260px;
  max-height: calc(90vh - 62px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface);
}

.highlight-lightbox-content img {
  max-width: 100%;
  max-height: calc(90vh - 62px);
  display: block;
  object-fit: contain;
}

.highlight-lightbox-content img[hidden] {
  display: none !important;
}

.lightbox-placeholder {
  padding: 40px;
  color: var(--muted);
  font: 700 18px "Space Grotesk";
  letter-spacing: 0.1em;
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .highlight-card {
    flex-basis: 62vw;
  }
}

@media (max-width: 620px) {
  .highlights-intro {
    margin-top: -24px;
  }

  .highlights-rail {
    gap: 20px;
    padding-right: 8px;
  }

  .highlight-card {
    flex-basis: calc(100vw - 52px);
  }

  .highlight-caption {
    min-height: 86px;
    padding: 17px 18px;
  }

  .highlight-lightbox {
    padding: 12px;
  }

  .highlight-lightbox-window {
    width: calc(100vw - 30px);
  }
}

@media (max-width: 620px) {
  .projects-scroll-section {
    padding: 58px 18px;
  }

  .projects-track {
    gap: 30px;
    padding-right: 6px;
  }
}


/* Logo-led competition archive */

.competition-list article {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
}

.competition-logo {
  width: 92px;
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 2px solid var(--ink);
  background: #f3f3f0;
}

.competition-logo img {
  width: 78px;
  height: 78px;
  display: block;
  object-fit: contain;
}

.competition-list article > div:last-child {
  min-width: 0;
}

.competition-list article > div:last-child p + p {
  margin-top: 10px;
}

/* Document archive grid */

.documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.doc-card {
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.doc-card .windowbar {
  min-width: 0;
  align-items: flex-start;
}

.doc-card .windowbar b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.doc-body {
  flex: 1;
  padding: 22px 24px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 18px;
  background: #fff;
}

.doc-body p {
  grid-column: 1 / -1;
  margin: 0;
  font: 700 21px / 1.25 "Space Grotesk";
  overflow-wrap: anywhere;
}

.doc-body span {
  color: #666;
  font-size: 14px;
}

.doc-card .doc-body a {
  display: inline-block;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--chrome);
  font: 700 14px "Space Grotesk";
  text-decoration: none;
}

.doc-card .doc-body a:hover,
.doc-card .doc-body a:focus-visible {
  background: var(--yellow);
}

/* Compact contact and local mail composer */

.contact-compact {
  padding-top: 58px;
  padding-bottom: 64px;
  background: var(--paper);
  text-align: left;
}

.contact-compact .title {
  margin-bottom: 30px;
  font-size: clamp(48px, 5vw, 72px);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 42px;
}

.contact-links {
  display: grid;
  border: var(--line);
  background: #fff;
}

.contact-links a {
  padding: 17px 20px;
  border-bottom: var(--line);
  font: 700 18px "Space Grotesk";
  text-decoration: none;
}

.contact-links a:last-child {
  border-bottom: 0;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  background: var(--blue);
}

.mail-window {
  max-width: 720px;
}

.contact-form {
  padding: 24px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: #fff;
}

.contact-form label {
  font: 700 15px "Space Grotesk";
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px "DM Sans";
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.form-status {
  grid-column: 2;
  min-height: 20px;
  margin: 0;
  color: #8b2131;
  font-size: 14px;
  font-weight: 700;
}

.contact-submit {
  grid-column: 2;
  justify-self: start;
  margin-top: 0;
}

@media (max-width: 780px) {
  .certificate-grid,
  .documents-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .mail-window {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .competition-list article {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
  }

  .competition-logo {
    width: 72px;
    min-height: 76px;
    padding: 5px;
  }

  .competition-logo img {
    width: 62px;
    height: 62px;
  }

  .doc-body {
    grid-template-columns: 1fr;
  }

  .doc-body p,
  .doc-body span,
  .doc-card .doc-body a {
    grid-column: 1;
  }

  .doc-card .doc-body a {
    justify-self: start;
    margin-top: 6px;
  }

  .contact-compact {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .form-status,
  .contact-submit {
    grid-column: 1;
  }
}

/* Final responsive profile-frame sizing. */

.profilebox {
  padding: 42px 36px;
}

.profilebox img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .profilebox img {
    width: 225px;
    height: 225px;
  }
}

@media (max-width: 620px) {
  .profilebox {
    padding: 30px 18px;
  }

  .profilebox img {
    width: 195px;
    height: 195px;
  }
}

/* Theme control, equal project geometry, and full dark palette. */

.theme-toggle {
  flex: 0 0 auto;
  min-width: 78px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--hard-shadow);
  font: 700 12px "Space Grotesk";
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--yellow);
}

.theme-icon {
  font-size: 17px;
  line-height: 1;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card > .windowbar {
  flex: 0 0 56px;
}

.project-card .project-media {
  flex: 0 0 auto;
}

.project-card .body {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--surface);
}

.project-card .project-actions {
  margin-top: auto;
}

.external-arrow {
  font-size: 1.18em;
  font-weight: 900;
  transform: translateY(0.02em);
  text-shadow: 0.35px 0 currentColor, -0.35px 0 currentColor;
}

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .projects-track {
    align-items: stretch;
  }

  .is-scroll-driven .project-card {
    width: min(74vw, 920px);
    height: min(650px, calc(100vh - 175px));
    flex-basis: min(74vw, 920px);
  }

  .is-scroll-driven .project-card .project-media {
    height: 180px;
  }
}

@media (min-width: 769px) and (max-height: 820px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .project-card {
    height: calc(100vh - 155px);
  }

  .is-scroll-driven .project-card .project-media {
    height: 105px;
  }

  .is-scroll-driven .project-card .body {
    overflow: hidden;
  }
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .project-card {
    height: auto;
  }

  .project-card .body {
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .topbar {
    gap: 16px;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar nav {
    order: 3;
    flex: 1 0 100%;
    gap: 14px 20px;
  }

  .theme-toggle {
    min-width: 70px;
  }
}

html[data-theme="dark"] body {
  background: var(--desktop-bg);
  color: var(--ink);
}

html[data-theme="dark"] main,
html[data-theme="dark"] .projects-scroll-section,
html[data-theme="dark"] .is-scroll-driven .projects-sticky,
html[data-theme="dark"] .contact-compact {
  background: var(--paper);
}

html[data-theme="dark"] .pattern {
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 0.7px, transparent 0.7px);
}

html[data-theme="dark"] .window,
html[data-theme="dark"] .files,
html[data-theme="dark"] .competition-list,
html[data-theme="dark"] .competitions-section,
html[data-theme="dark"] .timeline img,
html[data-theme="dark"] .doc-body,
html[data-theme="dark"] .certificate-body,
html[data-theme="dark"] .contact-links,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .project-actions a,
html[data-theme="dark"] .certificate-body a,
html[data-theme="dark"] .viewer-action {
  background: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .window,
html[data-theme="dark"] .skills-grid article,
html[data-theme="dark"] .viewer-window {
  box-shadow: 9px 9px 0 var(--hard-shadow);
}

html[data-theme="dark"] .btn {
  box-shadow: 6px 6px 0 var(--hard-shadow);
}

html[data-theme="dark"] .logo {
  background: var(--ink);
  color: var(--paper);
}

html[data-theme="dark"] .profile-meta,
html[data-theme="dark"] .project-subtitle,
html[data-theme="dark"] .doc-body span,
html[data-theme="dark"] .certificate-body span,
html[data-theme="dark"] .timeline time,
html[data-theme="dark"] .files span {
  color: var(--muted);
}

html[data-theme="dark"] .timeline article::before {
  background: var(--muted);
}

html[data-theme="dark"] .timeline i {
  background: var(--ink);
}

html[data-theme="dark"] .competition-logo,
html[data-theme="dark"] .project-tech {
  background: var(--chrome);
}

html[data-theme="dark"] .project-media,
html[data-theme="dark"] .project-placeholder {
  background-color: var(--placeholder);
}

html[data-theme="dark"] .project-placeholder {
  color: var(--muted);
  background-image: radial-gradient(var(--placeholder-dot) 0.7px, transparent 0.7px);
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  background: var(--chrome);
  color: var(--ink);
}

html[data-theme="dark"] .form-status {
  color: #f0a8b6;
}

/* Artwork-first project cards. Outer card geometry stays fixed while the body expands inward. */

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven .project-card {
    position: relative;
    overflow: hidden;
  }

  .is-scroll-driven .project-card .project-media {
    position: absolute;
    inset: 56px 0 0;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    border-bottom: 0;
  }

  .is-scroll-driven .project-body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    height: 210px;
    min-height: 0;
    padding: 14px 22px 16px;
    overflow: hidden;
    border-top: var(--line);
    background: var(--surface);
    transition: height 0.25s ease;
  }

  .is-scroll-driven .project-body h3 {
    margin-bottom: 3px;
    font-size: clamp(23px, 2vw, 29px);
  }

  .is-scroll-driven .project-subtitle {
    margin-bottom: 7px !important;
    font-size: 14px;
  }

  .is-scroll-driven .project-copy p:first-child {
    display: -webkit-box;
    margin-bottom: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .is-scroll-driven .project-copy p:not(:first-child),
  .is-scroll-driven .project-tech,
  .is-scroll-driven .project-result {
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition:
      max-height 0.2s ease,
      margin 0.2s ease,
      opacity 0.16s ease;
  }

  .is-scroll-driven .project-tech {
    padding-top: 0;
    padding-bottom: 0;
    border-left-width: 0;
  }

  .is-scroll-driven .project-actions {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 10px;
  }

  .is-scroll-driven .project-card:hover .project-body,
  .is-scroll-driven .project-card:focus-within .project-body {
    height: 56%;
    overflow: hidden;
  }

  .is-scroll-driven .project-card:hover .project-copy p:first-child,
  .is-scroll-driven .project-card:focus-within .project-copy p:first-child {
    display: block;
    overflow: visible;
  }

  .is-scroll-driven .project-card:hover .project-copy p:not(:first-child),
  .is-scroll-driven .project-card:hover .project-tech,
  .is-scroll-driven .project-card:hover .project-result,
  .is-scroll-driven .project-card:focus-within .project-copy p:not(:first-child),
  .is-scroll-driven .project-card:focus-within .project-tech,
  .is-scroll-driven .project-card:focus-within .project-result {
    max-height: 180px;
    visibility: visible;
    opacity: 1;
  }

  .is-scroll-driven .project-card:hover .project-copy p:not(:first-child),
  .is-scroll-driven .project-card:focus-within .project-copy p:not(:first-child) {
    margin-top: 8px !important;
  }

  .is-scroll-driven .project-card:hover .project-tech,
  .is-scroll-driven .project-card:focus-within .project-tech {
    margin-top: 10px !important;
    padding: 9px 10px;
    border-left-width: 4px;
  }

  .is-scroll-driven .project-card:hover .project-result,
  .is-scroll-driven .project-card:focus-within .project-result {
    margin-top: 8px !important;
  }
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .project-card .project-media {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 16 / 7;
    border-bottom: var(--line);
  }

  .project-body {
    position: static;
    height: auto;
    overflow: visible;
    border-top: 0;
    transition: none;
  }

  .project-copy p,
  .project-tech,
  .project-result {
    max-height: none;
    visibility: visible;
    opacity: 1;
  }
}

/* Final nav-offset viewport-fit overrides (kept last to supersede legacy sizing). */

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven > .pinned-horizontal-sticky {
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    height: calc(100dvh - var(--nav-height));
    padding: 16px clamp(22px, 7vw, 105px) 14px;
    display: flex;
    flex-direction: column;
  }

  .is-scroll-driven .pinned-horizontal-header {
    flex: 0 0 auto;
    margin-bottom: clamp(10px, 1.8vh, 18px);
  }

  .is-scroll-driven .pinned-horizontal-header .file {
    margin: 0 0 4px;
  }

  .is-scroll-driven .pinned-horizontal-header .title {
    margin: 0;
    font-size: clamp(46px, 5vw, 68px);
    line-height: 0.95;
  }

  .is-scroll-driven .highlights-intro {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.35;
  }

  .is-scroll-driven .pinned-horizontal-viewport {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
  }

  .is-scroll-driven .pinned-horizontal-track {
    height: 100%;
    min-height: 0;
    padding-top: 4px;
    padding-bottom: 12px;
    align-items: stretch;
  }

  .is-scroll-driven .project-card {
    height: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .is-scroll-driven .project-body,
  .is-scroll-driven .project-card:hover .project-body,
  .is-scroll-driven .project-card:focus-within .project-body {
    overflow: hidden;
  }

  .is-scroll-driven .project-card:hover .project-body,
  .is-scroll-driven .project-card:focus-within .project-body {
    height: min(68%, 420px);
  }

  .highlights-scroll-section.is-scroll-driven .highlights-sticky {
    padding: 16px clamp(22px, 7vw, 105px) 14px;
  }

  .is-scroll-driven .highlight-card {
    width: min(72vw, 900px);
    height: calc(100% - 16px);
    max-height: calc(100% - 16px);
    flex: 0 0 min(72vw, 900px);
  }

  .is-scroll-driven .highlight-open {
    height: calc(100% - 56px);
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .is-scroll-driven .highlight-image-wrap {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .is-scroll-driven .highlight-caption {
    height: 110px;
    min-height: 110px;
    flex: 0 0 110px;
  }
}

@media (min-width: 769px) and (max-height: 820px) and (prefers-reduced-motion: no-preference) {
  .is-scroll-driven > .pinned-horizontal-sticky {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .is-scroll-driven .pinned-horizontal-header {
    margin-bottom: 9px;
  }

  .is-scroll-driven .pinned-horizontal-header .title {
    font-size: clamp(42px, 4.5vw, 58px);
  }

  .is-scroll-driven .highlights-intro {
    margin-top: 7px;
    font-size: 14px;
  }

  .is-scroll-driven .highlight-caption {
    height: 96px;
    min-height: 96px;
    flex-basis: 96px;
  }

  .is-scroll-driven .project-body {
    height: 190px;
  }
}

/* Experience metadata and final small-screen audit. */

.experience-meta {
  margin: 0.25rem 0 0.65rem !important;
  color: var(--muted);
  font-size: 0.95rem !important;
  font-weight: 600;
  line-height: 1.35 !important;
}

.experience-logo {
  grid-column: 3;
  width: 80px;
  height: 80px;
}

.timeline article > .experience-content {
  grid-column: 4;
}

@media (max-width: 900px) and (min-width: 621px) {
  .experience-logo {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    gap: 10px;
    padding: 8px 12px;
  }

  .logo {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .theme-toggle {
    min-height: 42px;
    margin-left: auto;
  }

  .topbar nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    padding: 2px 0 4px;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .topbar nav a {
    min-height: 40px;
    padding: 8px 10px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    font-size: 15px;
  }

  .section,
  .projects-scroll-section,
  .highlights-scroll-section {
    padding: 56px 18px;
  }

  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .hero > *,
  .profile-window,
  .quick,
  .competition-list,
  .certificate-grid,
  .documents-grid,
  .skills-grid,
  .contact-grid {
    min-width: 0;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(52px, 15vw, 84px);
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: 18px;
  }

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

  .profilebox img {
    width: clamp(180px, 48vw, 200px);
    height: clamp(180px, 48vw, 200px);
  }

  .title {
    font-size: clamp(43px, 12vw, 66px);
    overflow-wrap: anywhere;
  }

  .timeline article {
    min-height: 0;
    padding: 0 0 38px;
    display: grid;
    grid-template-columns: 20px 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 10px 12px;
  }

  .timeline article::before {
    left: 6px;
    top: 12px;
    bottom: -8px;
  }

  .timeline time {
    grid-column: 2 / -1;
    grid-row: 1;
    padding: 0;
    text-align: left;
    font-size: 14px;
  }

  .timeline i {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 3px 0 0;
  }

  .timeline img,
  .timeline .experience-logo {
    grid-column: 2;
    grid-row: 2;
    width: 64px;
    height: 64px;
  }

  .timeline article > div,
  .timeline article > .experience-content {
    grid-column: 3;
    grid-row: 2;
    min-width: 0;
  }

  .timeline article > .experience-logo {
    grid-column: 2;
  }

  .timeline h3 {
    font-size: clamp(21px, 6vw, 26px);
    overflow-wrap: anywhere;
  }

  .timeline p {
    font-size: 16px;
  }

  .competition-list article {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 16px;
  }

  .competition-logo {
    width: 68px;
    min-height: 68px;
  }

  .competition-logo img {
    width: 58px;
    height: 58px;
  }

  .projects-track {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    width: 100%;
    padding-right: 0;
    overflow: visible;
  }

  .projects-track .project-card {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }

  .project-card .windowbar,
  .project-body,
  .project-actions,
  .project-actions a {
    min-width: 0;
  }

  .project-actions {
    flex-wrap: wrap;
  }

  .highlights-rail {
    width: 100%;
    max-width: 100%;
    gap: 20px;
    padding-right: 8px;
  }

  .highlight-card {
    flex: 0 0 min(88vw, 560px);
    max-width: calc(100vw - 44px);
  }

  .certificate-grid,
  .documents-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .windowbar b,
  .doc-body p,
  .certificate-body h3,
  .contact-links a {
    overflow-wrap: anywhere;
  }

  .contact-form input,
  .contact-form textarea {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .topbar {
    position: sticky;
    align-items: center;
  }

  .section,
  .projects-scroll-section,
  .highlights-scroll-section {
    padding-right: 14px;
    padding-left: 14px;
  }

  .profilebox {
    padding: 26px 14px;
  }

  .profilebox h2 {
    font-size: 25px;
  }

  .timeline article {
    grid-template-columns: 18px 58px minmax(0, 1fr);
    gap: 9px 10px;
  }

  .timeline img,
  .timeline .experience-logo {
    width: 58px;
    height: 58px;
  }

  .highlight-card {
    flex-basis: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .contact-form {
    padding: 16px;
  }

  .contact-submit {
    width: 100%;
    text-align: center;
  }
}
