:root {
  color-scheme: dark;
  --bg: #121825;
  --bg-deep: #0a1022;
  --surface: #152038;
  --accent: #173473;
  --accent-btn: #263b6a;
  --text: #fff;
  --muted: #484848;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Doto", "Courier New", monospace;
  --pad: clamp(20px, 6vw, 138px);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  height: auto;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
}
:focus-visible {
  outline: 2px solid #6f95ee;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---------- Custom scrollbar ---------- */
html {
  scrollbar-width: thin;
  scrollbar-color: #2f3d63 #0d1426;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0d1426;
}
::-webkit-scrollbar-thumb {
  background: #2f3d63;
  border-radius: 999px;
  border: 2px solid #0d1426;
}
::-webkit-scrollbar-thumb:hover {
  background: #41528a;
}
::-webkit-scrollbar-thumb:active {
  background: #4d61a8;
}
::-webkit-scrollbar-corner {
  background: #0d1426;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 50;
  padding: clamp(14px, 3vw, 46px) clamp(14px, 4.5vw, 65px) 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  background: var(--surface);
  border-radius: 50px;
  border: 0.2px solid var(--bg);
  padding: 0 clamp(18px, 3.5vw, 52px);
  height: 78px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 61px);
  backdrop-filter: blur(10px);
  position: relative;
}
.nav a {
  font-size: 16px;
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a svg {
  display: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: #f5f5f5;
  transition: width 0.25s;
}
.nav a.active::after {
  width: 100%;
}
@media (hover: hover) {
  .nav a:hover::after {
    width: 100%;
  }
}
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .nav a:hover::after {
    width: 0;
  }
}
.gh {
  pointer-events: auto;
  position: absolute;
  right: clamp(14px, 4.5vw, 65px);
  top: clamp(14px, 3vw, 46px);
  height: 78px;
  padding: 0 31px;
  background: var(--surface);
  border-radius: 50px;
  border: 0.2px solid var(--bg);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease,
              box-shadow 0.25s ease, transform 0.25s ease;
}
.gh svg {
  width: 39px;
  height: 39px;
  fill: #fff;
  transition: transform 0.25s ease;
}
.gh:hover {
  background: #1c2b4c;
  border-color: rgba(109, 143, 255, 0.5);
  box-shadow: 0 10px 24px rgba(47, 91, 196, 0.3);
  transform: translateY(-2px);
}
.gh:hover svg {
  transform: scale(1.08);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 982px;
  background: linear-gradient(180deg, #0a1022 0%, #0c1426 55%, var(--bg) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  width: 873px;
  height: 873px;
  left: 21%;
  top: -313px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.1;
  filter: blur(40px);
}
.hero-inner {
  position: relative;
  max-width: 1512px;
  margin: 0 auto;
  min-height: 982px;
  display: flex;
  align-items: center;
  padding: 80px 0 200px;
}
.hero-copy {
  min-width: 0;
  width: 44%;
  max-width: 560px;
  margin-left: calc(8% + 70px);
}
.hero h1 {
  margin: 0 0 26px;
  font-size: clamp(38px, 3.9vw, 56px);
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}
.hero h1 .name {
  color: #2f5bc4;
  color: var(--accent);
  filter: brightness(1.7);
}
.hello {
  position: relative;
  display: block;
  height: 1.05em;
}
.hello .greet {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  white-space: nowrap;
  font-family: "Ephesis", "Apple Chancery", "Segoe Script", cursive;
  font-weight: 400;
  color: var(--text);
  will-change: clip-path, opacity, transform;
}
@keyframes greetIn {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes greetOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-0.3em);
  }
}
.hero p {
  margin: 0;
  max-width: 590px;
  font-size: 14px;
}
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  margin-top: 38px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 55px;
  padding: 0 23px;
  border-radius: 30px;
  font-size: 14px;
  transition:
    transform 0.2s,
    filter 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}
.btn-primary {
  background: var(--accent-btn);
}
.btn-secondary {
  background: var(--surface);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-circle {
  position: absolute;
  width: 822px;
  height: 822px;
  left: 48.5%;
  top: 474px;
  border-radius: 50%;
  background: #949494;
}
.hero-photo {
  position: absolute;
  left: 61.3%;
  top: 264px;
  width: max(280px, 28.5%);
  max-width: 430px;
  aspect-ratio: 1;
  padding: 10px;
  background: #fff;
  border-radius: clamp(60px, 8vw, 118px);
  overflow: hidden;
  display: flex;
}
.hero-photo svg,
.hero-photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

/* ---------- Sections ---------- */
section {
  position: relative;
  z-index: 1;
}
.sec-title {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.04em;
  word-spacing: 0.35em;
}
.sec-title em {
  font-style: normal;
  color: var(--accent);
}
.rule {
  width: min(908px, calc(100% - 2 * var(--pad)));
  height: 0;
  border: 0;
  border-top: 0.2px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto;
}

.about {
  padding: 140px var(--pad) 120px;
  max-width: 1512px;
  margin: 0 auto;
}
.about-wrap {
  margin-left: min(75px, 3%);
}
.about p.lead {
  max-width: 600px;
  margin: 22px 0 0;
}
.edu {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 26px;
}
.edu li {
  display: flex;
  align-items: center;
  gap: 23px;
}
.edu-ico {
  flex: none;
  width: 59px;
  height: 46px;
  border: 1px solid #fff;
  border-radius: 42px;
  display: grid;
  place-items: center;
}
.edu-ico svg {
  width: 27px;
  height: 22px;
  fill: #fff;
}
.edu h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}
.edu small {
  display: block;
  font-size: 10px;
  line-height: 1.7;
}

.skills {
  padding: 70px var(--pad) 140px;
  text-align: center;
}
.skills .sec-title {
  margin-top: 70px;
}
.chips {
  max-width: 811px;
  margin: 60px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  justify-content: flex-start;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 45px;
  padding: 0 10px;
  border: 0.2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 16px;
  white-space: nowrap;
}
.chip i {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  overflow: hidden;
  font-style: normal;
}
.chip i img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chip-row-break {
  flex-basis: 100%;
  height: 0;
}

.projects {
  padding: 60px var(--pad) 130px;
  max-width: 1512px;
  margin: 0 auto;
}
.projects .rule {
  width: 100%;
  max-width: 908px;
}
.projects .sec-title {
  text-align: center;
  margin-top: 70px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 62px 92px;
  margin-top: 140px;
  max-width: 1240px;
  margin-inline: auto;
}
.card {
  background: var(--bg-deep);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 572px;
  width: 100%;
}
.shot {
  aspect-ratio: 572/301;
  background: linear-gradient(135deg, #8aa4f8 0%, #a9b6fb 50%, #bfc2fb 100%);
  position: relative;
  overflow: hidden;
  font-family: "Noto Sans Myanmar", var(--font);
  color: #1a1f4a;
  container-type: inline-size;
}
.shot .bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5.5cqw;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 0 3cqw;
  font: 700 1.4cqw var(--font);
}
.shot .bar b {
  margin-right: auto;
}
.shot .bar span {
  opacity: 0.7;
}
.shot h4 {
  position: absolute;
  left: 5cqw;
  top: 25cqw;
  margin: 0;
  font-weight: 700;
  font-size: 7cqw;
  line-height: 1.35;
}
.shot h4 span {
  display: block;
  margin-left: 5cqw;
  color: #3646b8;
}
.shot .pill {
  position: absolute;
  left: 5cqw;
  top: 16cqw;
  font: 400 1.5cqw var(--font);
  background: #fff;
  padding: 0.6cqw 1.6cqw;
  border-radius: 9cqw;
}
.shot .tile {
  position: absolute;
  right: 5cqw;
  width: 10cqw;
  height: 4cqw;
  background: #fff;
  border-radius: 1cqw;
  box-shadow: 0 0.5cqw 2cqw rgba(0, 0, 0, 0.08);
}
.shot .t1 {
  top: 18cqw;
}
.shot .t2 {
  top: 27cqw;
  right: 16cqw;
}
.shot .t3 {
  top: 36cqw;
}
.shot .dot {
  position: absolute;
  right: 22cqw;
  top: 26cqw;
  width: 6cqw;
  height: 6cqw;
  border-radius: 50%;
  background: #1d3a8a;
}
.shot--img {
  background: var(--bg-deep);
}
.shot--img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.card-body {
  padding: 30px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex: 1;
}
.card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.card p {
  margin: 0;
  font-size: 13px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  height: 32px;
  padding: 0 23px;
  border-radius: 30px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  white-space: nowrap;
}
.card hr {
  width: 100%;
  border: 0;
  border-top: 0.4px solid var(--muted);
  margin: 0;
}
.links {
  display: flex;
  gap: 20px;
  margin-top: auto;
}
.link {
  height: 35px;
  padding: 0 15px;
  border-radius: 22px;
  background: var(--bg);
  border: 0.2px solid rgba(255, 255, 255, 0.57);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  transition: background 0.2s;
}
.link:hover {
  background: var(--surface);
}
.link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.link svg.fill {
  fill: #fff;
  stroke: none;
}

/* ---------- Project Experiences ---------- */
.experiences {
  padding: 60px var(--pad) 130px;
  max-width: 1512px;
  margin: 0 auto;
}
.experiences .sec-title {
  text-align: center;
  margin-top: 70px;
}
.exp-subtitle {
  text-align: center;
  max-width: 620px;
  margin: 20px auto 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

/* --- Alternating vertical timeline --- */
.tl {
  position: relative;
  max-width: 1040px;
  margin: 70px auto 0;
}
.tl::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(47, 91, 196, 0.4) 4%,
    rgba(47, 91, 196, 0.4) 96%,
    transparent 100%
  );
}

/* --- Row: two halves + center gutter (line runs through the gap) --- */
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 72px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}
.tl-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.tl-item:last-child {
  margin-bottom: 0;
}
.tl-item:nth-child(odd) .tl-card {
  grid-column: 1;
}
.tl-item:nth-child(even) .tl-card {
  grid-column: 2;
}

/* --- Glowing node on the center line --- */
.tl-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #101a33;
  border: 2px solid rgba(109, 143, 255, 0.85);
  box-shadow: 0 0 10px rgba(47, 91, 196, 0.55),
              0 0 22px rgba(47, 91, 196, 0.25);
  transform: translateX(-50%);
  transition: border-color 0.3s, box-shadow 0.3s;
  z-index: 2;
}
.tl-item:hover::before {
  border-color: rgba(170, 192, 255, 1);
  box-shadow: 0 0 14px rgba(70, 110, 255, 0.75),
              0 0 30px rgba(47, 91, 196, 0.35);
}

/* --- Entry: unboxed editorial block with accent bracket --- */
.tl-card {
  display: block;
  position: relative;
  border-radius: 14px;
  padding: 28px 24px 24px;
}
.tl-item:nth-child(odd) .tl-card {
  border-right: 3px solid rgba(255, 255, 255, 0.16);
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  transition: border-color 0.3s ease;
}
.tl-item:nth-child(even) .tl-card {
  border-left: 3px solid rgba(255, 255, 255, 0.16);
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  transition: border-color 0.3s ease;
}

/* --- Hover: only the accent bracket + title underline light up --- */
.tl-card:hover h3 {
  text-decoration-color: rgba(109, 143, 255, 0.95);
}
.tl-item:nth-child(odd) .tl-card:hover {
  border-right-color: rgba(109, 143, 255, 0.9);
}
.tl-item:nth-child(even) .tl-card:hover {
  border-left-color: rgba(109, 143, 255, 0.9);
}

/* --- Node filler: tiny tick bridging accent bar to the glowing node --- */
.tl-item::after {
  content: "";
  position: absolute;
  top: 34px;
  width: 36px;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.3s;
}
.tl-item:nth-child(odd)::after { left: calc(50% - 1px); }
.tl-item:nth-child(even)::after { right: calc(50% - 1px); }
.tl-item:hover::after { background: rgba(255, 255, 255, 0.38); }

/* --- Card header: node-aligned time + bold title --- */
.tl-time {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(157, 183, 255, 0.5);
  margin-bottom: 10px;
}
.tl-card h3 {
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s ease;
}

/* --- Chips row with hairline divider --- */
.tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 0.4px solid rgba(255, 255, 255, 0.14);
}
.tl-chip {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 15px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  background: var(--surface);
  color: rgba(255, 255, 255, 0.62);
}
.tl-chip--role {
  background: rgba(47, 91, 196, 0.22);
  color: rgba(185, 205, 255, 0.95);
}

/* --- Description --- */
.tl-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
}

/* --- Mobile: line moves to the left edge, all cards stack right --- */
@media (max-width: 767px) {
  .tl::before {
    left: 9px;
    transform: none;
  }
  .tl-item {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding-left: 44px;
  }
  .tl-item:nth-child(odd) .tl-card,
  .tl-item:nth-child(even) .tl-card {
    grid-column: 1;
  }
  .tl-item::before {
    left: 9px;
  }
  .tl-item:nth-child(odd)::after,
  .tl-item:nth-child(even)::after {
    right: auto;
    left: 8px;
  }
  .tl-item:nth-child(odd) .tl-card {
    border-right: 0;
    border-left: 3px solid rgba(255, 255, 255, 0.16);
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
  }
  .tl-card {
    padding: 28px 18px 20px;
  }
  .tl-card h3 {
    font-size: 17px;
    margin-bottom: 13px;
  }
  .tl-card p {
    font-size: 13px;
  }
  .tl-chips {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  .tl-chip {
    height: 25px;
    padding: 0 12px;
    font-size: 10px;
  }
  .tl-time {
    font-size: 10px;
  }
}
.contact {
  padding: 60px var(--pad) 120px;
  max-width: 1512px;
  margin: 0 auto;
}
.contact .rule {
  max-width: 908px;
  width: 100%;
}
.contact .sec-title {
  text-align: center;
  margin-top: 100px;
}
.stage {
  position: relative;
  max-width: 1000px;
  margin: 80px auto 0;
  min-height: 520px;
}
.info {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 29px;
  padding: 15px;
  border: 1px dotted rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.2s;
}
a.info:hover {
  background: rgba(255, 255, 255, 0.07);
}
.info .ico {
  flex: none;
  width: 50px;
  height: 46px;
  border-radius: 9px;
  background: #fff;
  display: grid;
  place-items: center;
}
.info .ico svg {
  width: 24px;
  height: 24px;
}
.i-mail {
  left: 30%;
  top: 0;
}
.i-loc {
  left: 50%;
  top: 134px;
}
.i-ig {
  left: 68%;
  top: 272px;
  border-style: dotted;
}
.script {
  position: absolute;
  left: 0;
  top: 215px;
  font-family: "Ephesis", cursive;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.1;
  white-space: nowrap;
}
.other {
  margin-top: 40px;
  text-align: center;
}
.other h3 {
  display: inline-block;
  margin: 0;
  padding: 10px;
  border-top: 0.2px solid #fff;
  border-bottom: 0.2px solid #fff;
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 40px;
}
.socials a {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}
.socials a:hover {
  transform: translateY(-3px);
}
.socials svg {
  width: 55px;
  height: 55px;
  fill: #fff;
}

.footer {
  background: var(--surface);
  padding: 40px clamp(20px, 5vw, 78px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 20px;
  text-transform: capitalize;
}
.footer .sig {
  font-family: "Homemade Apple", cursive;
  text-transform: none;
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .hero,
  .hero-inner {
    min-height: 900px;
  }
  .hero-copy {
    margin-left: 5%;
    width: 46%;
    max-width: 480px;
  }
  .hero h1 {
    font-size: clamp(34px, 4.4vw, 52px);
  }
  .hero-circle {
    width: 640px;
    height: 640px;
    left: 46%;
    top: 430px;
  }
  .hero-photo {
    left: 56%;
    top: 240px;
    width: 36%;
  }
  .grid {
    gap: 40px;
    margin-top: 100px;
  }
  .stage {
    min-height: 480px;
  }
  .info {
    font-size: 20px;
  }
  /* Header: keep nav from crashing into the GitHub pill (applies to 993–1100 too) */
  .header {
    padding-left: clamp(16px, 2vw, 24px);
    padding-right: clamp(16px, 2vw, 24px);
  }
  .nav {
    gap: clamp(14px, 1.8vw, 26px);
    padding: 0 clamp(16px, 2vw, 34px);
  }
  .nav a {
    font-size: 15px;
  }
  .gh {
    right: clamp(16px, 2vw, 24px);
    padding: 0 22px;
    gap: 12px;
  }
  .gh span {
    font-size: 15px;
  }
  .gh svg {
    width: 32px;
    height: 32px;
  }
  html,
  body {
    overflow-x: hidden;
  }
}

/* ---------- Tablet (768–992): header + hero corrections ---------- */
@media (max-width: 992px) {
  /* Header: shrink nav & GitHub pill so they never overlap */
  .header {
    padding-left: clamp(16px, 2vw, 24px);
    padding-right: clamp(16px, 2vw, 24px);
  }
  .nav {
    gap: clamp(14px, 1.8vw, 26px);
    padding: 0 clamp(16px, 2vw, 34px);
  }
  .nav a {
    font-size: 15px;
  }
  .gh {
    right: clamp(16px, 2vw, 24px);
    padding: 0 22px;
    gap: 12px;
  }
  .gh span {
    font-size: 15px;
  }
  .gh svg {
    width: 32px;
    height: 32px;
  }

  /* Hero: grey circle proportionate and centred behind the photo,
     copy kept clear of the circle, no horizontal scroll */
  .hero-copy {
    margin-left: clamp(48px, 6vw, 70px);
    width: 40%;
    max-width: 440px;
  }
  .hero-circle {
    width: 480px;
    height: 480px;
    left: calc(61.3% - 99px); /* centres circle behind photo */
    top: 410px;
  }
  .hero-photo {
    left: 61.3%;
    top: 264px;
    width: max(280px, 28.5%);
  }
  html,
  body {
    overflow-x: hidden;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .header {
    padding-top: 12px;
    justify-content: space-between;
    gap: 8px;
    padding-inline: 12px;
  }
  .nav {
    height: 56px;
    padding: 0 16px;
    gap: 16px;
    flex: 1;
    justify-content: space-between;
    min-width: 0;
  }
  .nav a {
    font-size: 13px;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }
  .nav a span {
    display: none;
  }
  .nav a svg {
    display: block;
    width: 21px;
    height: 21px;
  }
  .nav a::after {
    bottom: -6px;
  }
  .gh {
    position: static;
    height: 56px;
    padding: 0 14px;
    gap: 0;
  }
  .gh span {
    display: none;
  }
  .gh svg {
    width: 30px;
    height: 30px;
  }

  .hero,
  .hero-inner {
    min-height: 0;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    padding: 120px 20px 0;
  }
  .hero-photo {
    position: relative;
    left: auto;
    top: auto;
    width: min(300px, 72vw);
    align-self: center;
    order: -1;
    margin-bottom: 36px;
    z-index: 2;
  }
  .hero-circle {
    display: none;
  }
  .hero-copy {
    position: relative;
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding-bottom: 80px;
    text-align: center;
  }
  .hero h1 {
    font-size: clamp(32px, 9vw, 36px);
    white-space: normal;
  }
  .btn {
    height: 50px;
  }
  .btns {
    justify-content: center;
  }

  .about {
    padding: 90px 20px 70px;
  }
  .about-wrap {
    margin-left: 0;
  }
  .skills {
    padding: 50px 20px 90px;
  }
  .skills .sec-title {
    margin-top: 50px;
  }
  .chips {
    margin-top: 40px;
    justify-content: center;
  }
  .chip {
    font-size: 14px;
    height: 40px;
  }
  .chip i {
    width: 24px;
    height: 24px;
  }
  .projects {
    padding: 50px 20px 80px;
  }
  .projects .sec-title {
    margin-top: 50px;
  }
  .grid {
    grid-template-columns: 1fr;
    margin-top: 60px;
    gap: 32px;
  }
  .card {
    max-width: none;
  }
  .card h3 {
    font-size: 22px;
    font-weight: 600;
  }
  .contact {
    padding: 50px 20px 80px;
  }
  .contact .sec-title {
    margin-top: 60px;
  }
  .stage {
    margin-top: 50px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .info,
  .script {
    position: static;
  }
  .info {
    font-size: 16px;
    gap: 16px;
    padding: 12px;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }
  .info .ico {
    width: 42px;
    height: 40px;
  }
  .script {
    order: -1;
    margin-bottom: 10px;
    font-size: 44px;
  }
  .other h3 {
    font-size: 15px;
  }
  .footer {
    font-size: 15px;
    justify-content: center;
    text-align: center;
  }
  /* experiences mobile */
  .experiences {
    padding: 40px 20px 60px;
  }
  .experiences .sec-title {
    margin-top: 40px;
  }
  .exp-subtitle {
    font-size: 13px;
  }
}
/* ---------- Mobile complete fix (<=820px) ---------- */
@media (max-width: 820px) {
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }
  .hero,
  .hero-inner,
  header,
  main,
  .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto;
  }
  .hero-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 24px;
    padding: 110px 0 70px;
  }
  .hero-circle {
    display: none !important;
  }
  .hero-photo {
    position: static !important;
    display: block !important;
    width: 200px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    left: auto;
    top: auto;
  }
  .hero-copy {
    position: static !important;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
  }
  .hero h1 {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 500;
  }
  .btns {
    display: flex !important;
    justify-content: center !important;
    gap: 12px;
    margin-top: 0;
    flex-wrap: wrap;
  }
  .btn {
    height: 48px;
    padding: 0 24px;
    font-weight: 400;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    height: auto;
    min-height: 56px;
    padding: 10px 16px;
  }
  .gh {
    height: 56px;
  }
  .script {
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 380px) {
  .nav a svg {
    width: 19px;
    height: 19px;
  }
  .nav {
    gap: 12px;
    padding: 0 10px;
  }
}
@media (max-width: 420px) {
  .hero-inner {
    padding-top: 100px;
  }
  .hero-copy {
    padding-bottom: 60px;
  }
  .hero p {
    font-size: 13px;
  }
  .btns {
    gap: 12px;
    margin-top: 0;
  }
  .btn {
    height: 46px;
    padding: 0 20px;
    gap: 8px;
    font-size: 13px;
  }
}
