/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0c0c0c;
  --bg-2: #1a1a1a;
  --text: #e8e8e8;
  --text-dim: #bababa;
  --text-muted: #a3a3a3;
  --text-faint: #757575;
  --green: #56e62e;
  --border: #4f4f4f;
  --border-soft: #474747;
  --btn-bg: rgba(66, 66, 66, 0.25);
  --tag-bg: rgba(46, 46, 46, 0.5);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 25px;
  --max-w: 1420px;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ===== Shared buttons ===== */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text);
  transition: gap 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(66,66,66,0.45); border-color: #6e6e6e; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 43px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--btn-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: gap 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.connect-btn {
  background: rgba(66, 66, 66, 0.25);
  border-color: var(--border);
  color: var(--text);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.connect-btn:hover,
.connect-btn:focus-visible,
.connect-btn:active {
  background: rgba(66, 66, 66, 0.25);
  border-color: #ffffff;
  color: var(--text);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}
.pill-btn .arrow-icon {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
.pill-btn:hover { gap: 15px; background: rgba(66,66,66,0.45); border-color: #6e6e6e; }
.pill-btn:hover .arrow-icon { transform: rotate(180deg) translateX(2px); }
.connect-btn:hover { gap: 12px; background: rgba(66, 66, 66, 0.25); border-color: #ffffff; color: var(--text); box-shadow: 0 0 18px rgba(255, 255, 255, 0.35); }
.resume-btn:hover .arrow-icon { transform: rotate(180deg) translateX(2px); }

.header-nav .icon-btn:hover,
.header-nav .icon-btn:focus-visible,
.header-nav .icon-btn:active,
.header-nav .resume-btn:hover,
.header-nav .resume-btn:focus-visible,
.header-nav .resume-btn:active {
  background: var(--btn-bg);
  border-color: #ffffff;
  color: var(--text);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgb(24,24,24) 0%, rgba(23,23,23,0) 100%);
  padding-top: 10px;
}
.header-inner {
  width: 90%;
  max-width: 1300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 29px;
  color: #dedede;
  letter-spacing: 0.01em;
  text-shadow: 0 0 7px rgba(222, 222, 222, 0.3);
  transition: color 180ms ease, text-shadow 180ms ease;
}
.logo:hover .logo-text,
.logo:focus-visible .logo-text {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.65), 0 0 24px rgba(255, 255, 255, 0.2);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-nav .role-switcher {
  margin-right: 2px;
}
.resume-btn .arrow-icon { order: -1; transform: rotate(180deg); }
.resume-btn:hover .arrow-icon { transform: rotate(180deg) translateX(2px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #0b0b0b 0%, #0b0b0b 26%, rgba(11,11,11,0.86) 100%);
}
.bg-clouds {
  position: absolute;
  top: -50px; left: -10px; right: -270px; bottom: -270px;
  width: calc(100% + 280px);
  height: auto;
  object-fit: cover;
  opacity: 0.3;
}
.bg-circle {
  position: absolute;
  bottom: -82px;
  right: 149px;
  width: 999px;
  height: 999px;
  border: 1px solid #6e6e6e;
  border-radius: 50%;
  opacity: 0.34;
}
.circle-line {
  position: absolute;
  top: 50%;
  height: 1px;
  background: #6e6e6e;
  opacity: 0.6;
}
.circle-line.line-1 { left: -161px; right: -497px; transform: rotate(30deg); }
.circle-line.line-2 { left: -359px; right: -299px; transform: rotate(-36deg); }

.bg-cloud-small {
  position: absolute;
  top: 10px;
  right: -506px;
  width: 570px;
  height: auto;
  opacity: 0.4;
}
.bg-clouds-faint {
  position: absolute;
  top: -329px;
  left: -59px;
  width: 1456px;
  height: auto;
  opacity: 0.02;
}
.bg-upper-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,27,27,0) 69%, rgb(29,28,28) 100%);
  transform: rotate(180deg);
}
.hero-statue {
  position: absolute;
  bottom: 8px;
  right: 93px;
  width: 65%;
  max-width: 1000px;
  height: auto;
  object-fit: cover;
  opacity: 0;
  transform: translateY(257px);
  animation: statueIn 1.1s cubic-bezier(0,0.42,0.5,1) 0.7s forwards;
  z-index: 1;
}
.hero-cloud-1, .hero-cloud-2 {
  position: absolute;
  bottom: -110px;
  width: 775px;
  height: auto;
  opacity: 0;
  animation: cloudIn 0.9s cubic-bezier(0,0.41,0.5,1) 1.2s forwards;
}
.hero-cloud-1 { left: 39px; }
.hero-cloud-2 { right: 14px; width: 720px; }
.bg-lower-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,23,23,0) 22%, rgb(23,23,23) 91%);
  z-index: 2;
}

@keyframes statueIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cloudIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 70px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.role-switcher {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.role-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.62);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.role-btn.active {
  background: rgba(45, 87, 51, 0.78);
  color: #d7ead9;
  box-shadow: inset 0 0 0 1px rgba(117, 185, 123, 0.22), 0 0 14px rgba(31, 83, 39, 0.2);
}
.role-btn:hover,
.role-btn:focus-visible,
.role-btn:active {
  box-shadow: inset 0 0 0 1px #ffffff, 0 0 18px rgba(255, 255, 255, 0.35);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--tag-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  color: #fff;
  opacity: 0;
  animation: fadeInSpring 3.1s cubic-bezier(0.2,0.8,0.2,1) 0s forwards;
}
.status-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px 2px rgba(86,230,46,0.6);
  flex-shrink: 0;
}
.status-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.75;
}
.badge-text .muted { color: #a3a3a3; }
.status-line {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  color: #a3a3a3;
  opacity: 0;
  animation: fadeInSpring 3.1s cubic-bezier(0.2,0.8,0.2,1) 0.3s forwards;
}

@keyframes fadeInSpring {
  0% { opacity: 0; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

.hero-heading {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 59px;
  line-height: 1.15;
  color: var(--text-dim);
  max-width: 623px;
  letter-spacing: -0.02em;
}
.hero-heading .line { display: block; }
.hero-heading .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: #e2e2e2;
}

.hero-body-wrap {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 454px;
}
.hero-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.star {
  font-size: 37px;
  color: #e2e2e2;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.5);
  animation: starIn 1s cubic-bezier(0.12,0.23,0.5,1) 1s forwards;
}
@keyframes starIn {
  to { opacity: 1; transform: scale(1); }
}
.body-text {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  color: #b3b3b3;
}
.body-text .char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  transition: opacity 0.28s ease, filter 0.28s ease, transform 0.28s ease;
}
.body-text.reveal .char {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.cta-btn {
  align-self: flex-start;
  opacity: 0;
  transform: translateY(50px);
  animation: ctaIn 0.55s cubic-bezier(0.2,0.8,0.2,1) 0.35s forwards;
}
@keyframes ctaIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0.5;
}
.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.wheel {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: wheelMove 1.8s ease-in-out infinite;
}
@keyframes wheelMove {
  0%, 100% { transform: translateY(-6px); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.3; }
}

/* ===== Work Section ===== */
.work {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px 70px 120px;
  display: flex;
  flex-direction: column;
  gap: 70px;
}
.work-headings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.work-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.work-row.top-row { justify-content: flex-start; padding-left: 35px; }
.work-row.bottom-row { justify-content: flex-start; padding-left: 20px; }
.work-title {
  font-size: 59px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.work-title.sans {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--text-dim);
}
.work-title.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: #e2e2e2;
  text-shadow: 0 0 4px rgba(227,227,227,0.77);
}
.work-title.reveal-text {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
.work-title.reveal-text.in {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Project card */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  border-radius: 15px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.project-card.in { opacity: 1; transform: translateY(0); }
.project-card:hover .project-thumb img { transform: scale(1.03); }

.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1210 / 579;
  border-radius: 15px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26,26,26,0.83);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.phone-frame {
  width: 250px;
  height: 518px;
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.laptop-frame {
  width: 663px;
  height: 380px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.phone-screen, .laptop-screen {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  object-fit: cover;
}

.project-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--tag-bg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  color: #a3a3a3;
}
.tag-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px 2px rgba(86,230,46,0.6);
  flex-shrink: 0;
}
.project-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.project-name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 30px;
  color: #e3e3e3;
  letter-spacing: -0.01em;
}
.project-desc {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  color: #7d7d7d;
  line-height: 1.4;
  max-width: 1149px;
}

/* ===== Playground & About ===== */
.playground, .about {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 70px 120px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 45px;
}
.section-heading h2 {
  font-size: 59px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.section-heading .sans {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--text-dim);
}
.section-heading .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: #e2e2e2;
}
.experiment-list {
  display: flex;
  flex-direction: column;
}
.experiment {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 37px;
  color: var(--text);
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.experiment:first-child { border-top: 1px solid var(--border); }
.experiment:hover { color: #fff; padding-left: 8px; }
.experiment-number {
  align-self: start;
  padding-top: 3px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
}
.experiment-arrow {
  font-family: var(--sans);
  font-size: 27px;
}
.about-content {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  align-items: center;
  gap: 80px;
  min-height: 320px;
}
.about-portrait {
  width: 100%;
  max-width: 520px;
  justify-self: center;
  opacity: 0.9;
}
.about-copy { max-width: 430px; }
.about-copy h3 {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
}
.about-copy p {
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.45;
}
.swoosh {
  display: block;
  width: 100%;
  height: 60px;
  margin: 6px auto 0;
  overflow: visible;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  width: 100%;
  min-height: 806px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.37;
  transform: scale(1.16);
  transform-origin: center center;
}
.footer-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,23,23,0.02) 0%, rgb(23,23,23) 72%);
}
.footer-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 100px 0;
}
.footer-left {
  position: static;
  transform: none;
}
.footer-thanks {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  color: #808080;
  margin-bottom: 8px;
}
.footer-connect {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 32px;
  color: var(--text);
}
.footer-right {
  position: static;
  transform: none;
  text-align: left;
}
.footer-chat {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  color: #808080;
  margin-bottom: 15px;
}
.footer-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.footer-buttons .connect-btn,
.footer-buttons .resume-btn {
  height: 50px;
  padding: 0 24px;
  font-size: 16px;
}
.footer-buttons .icon-btn {
  border-color: #292929;
  background: rgba(41,41,41,0.25);
}
.footer-buttons .resume-btn {
  border-color: #292929;
  background: rgba(41,41,41,0.25);
}

/* ===== Responsive: Tablet (810px - 1419px) ===== */
@media (max-width: 1419px) {
  .hero-content { padding: 0 40px; transform: translateX(-45px); }
  .hero-heading { font-size: 52px; }
  .hero-statue { right: -140px; width: 70%; }
  .hero-cloud-1 { left: unset; right: -242px; bottom: -79px; }
  .hero-cloud-2 { left: -166px; right: unset; bottom: -69px; }
  .work { padding: 80px 40px 100px; }
  .work-row.top-row { padding-left: 40px; }
  .work-row.bottom-row { padding-left: 20px; }
  .work-title { font-size: 52px; }
  .project-name { font-size: 28px; }
  .project-desc { font-size: 20px; }
  .phone-frame { width: 220px; height: 456px; }
  .laptop-frame { width: 442px; height: 254px; }
  .playground, .about { padding-left: 40px; padding-right: 40px; }
  .section-heading h2 { font-size: 52px; }
  .footer-content { gap: 70px; padding: 80px 0; }
  .footer-thanks { font-size: 21px; }
  .footer-connect { font-size: 28px; }
  .footer-chat { font-size: 21px; }
}

/* ===== Responsive: Mobile (max 809px) ===== */
@media (max-width: 809px) {
  .header-inner { width: calc(100% - 24px); min-width: 0; }
  .logo { min-width: 0; }
  .logo-text { font-size: 20px; white-space: nowrap; }
  .icon-btn { width: 30px; height: 30px; }
  .icon-btn svg { width: 13px; height: 13px; }
  .pill-btn { height: 36px; padding: 0 16px; font-size: 13px; }
  .resume-btn { display: none; }
  .header-nav { gap: 4px; min-width: 0; flex-shrink: 1; }
  .header-nav .role-switcher { margin-right: 0; }
  .header-nav .role-btn { white-space: nowrap; justify-content: center; font-size: 9px; padding: 7px 8px; }

  /* Hero: copy on top, statue + clouds anchored below it (never behind the text).
     The hero grows with its content, so Network / Full Stack copy of any length fits. */
  .hero {
    --statue-w: min(100vw, 520px);
    --statue-h: calc(var(--statue-w) * 0.7532); /* statue.png is 3696 x 2784 */
    --statue-gap: 16px;                          /* statue offset from hero bottom */
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    background: #0b0b0b;
    /* reserve the statue's solid part (87% - its top 13% is transparent) + clearance under the copy */
    padding: 118px 0 calc(var(--statue-h) * 0.87 + var(--statue-gap) + 16px);
  }
  .hero-content { padding: 0 14px; transform: none; }
  .hero-top { gap: 8px; }
  .status-badge { padding: 8px 16px; font-size: 13px; gap: 10px; }
  .status-line { font-size: 12px; }
  .hero-heading { max-width: 100%; font-size: clamp(32px, 8.9vw, 45px); line-height: 0.98; }
  .hero-body-wrap { max-width: 100%; }
  .star { font-size: 28px; }
  .body-text { font-size: clamp(14px, 4vw, 17px); line-height: 1.45; }
  .hero-statue {
    right: -3vw;
    bottom: var(--statue-gap);
    width: var(--statue-w);
    max-width: none;
  }
  .hero-cloud-1, .hero-cloud-2 {
    width: clamp(380px, 115vw, 640px);
    max-width: none;
    bottom: -20px;
  }
  .hero-cloud-1 { left: clamp(-180px, -28vw, -95px); right: auto; }
  .hero-cloud-2 { right: clamp(-180px, -28vw, -95px); left: auto; }
  .bg-clouds {
    -webkit-mask-image: radial-gradient(ellipse at center, #000 28%, rgba(0, 0, 0, 0.72) 62%, transparent 100%);
    mask-image: radial-gradient(ellipse at center, #000 28%, rgba(0, 0, 0, 0.72) 62%, transparent 100%);
  }
  .bg-circle { right: -285px; bottom: -120px; width: 620px; height: 620px; }
  .bg-upper-shade {
    background: linear-gradient(180deg, rgba(28, 27, 27, 0.28) 0%, rgba(28, 27, 27, 0.12) 22%, rgba(28, 27, 27, 0) 42%);
    transform: none;
  }
  .bg-lower-shade { background: linear-gradient(180deg, rgba(23,23,23,0) 66%, rgb(23,23,23) 98%); }

  .work { padding: 60px 15px 80px; gap: 60px; }
  .work-row { gap: 8px; }
  .work-row.top-row { padding-left: 20px; }
  .work-row.bottom-row { padding-left: 20px; }
  .work-title { font-size: 36px; }
  .projects { gap: 15px; }
  .project-card { gap: 15px; }
  .tag { padding: 8px 14px; font-size: 13px; gap: 10px; }
  .project-name { font-size: 22px; }
  .project-desc { font-size: 16px; }
  .phone-frame { width: 180px; height: 373px; }
  .laptop-frame { width: 280px; height: 160px; }
  .project-thumb { aspect-ratio: 4 / 3; }

  .playground, .about { padding: 0 20px 80px; }
  .section-heading { flex-wrap: wrap; gap: 0 8px; margin-bottom: 28px; }
  .section-heading h2 { font-size: 36px; }
  .experiment { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 14px 0; font-size: 26px; }
  .experiment-number { font-size: 11px; }
  .experiment-arrow { font-size: 20px; }
  .about-content { grid-template-columns: 1fr; gap: 20px; }
  .about-portrait { max-width: 360px; }
  .about-copy h3 { font-size: 28px; }

  .site-footer { min-height: 641px; }
  .footer-content {
    width: 90%;
    max-width: 2100px;
    flex-direction: column;
    align-items: flex-start;
    gap: 285px;
    padding: 70px 20px;
  }
  .footer-left, .footer-right {
    position: static;
    transform: none;
  }
  .footer-right { align-self: stretch; text-align: left; }
  .footer-buttons { justify-content: center; }
  .footer-bg img { transform: none; }
  .footer-thanks { font-size: 16px; }
  .footer-connect { font-size: 20px; }
  .footer-chat { font-size: 17px; }
  .footer-buttons .resume-btn { display: inline-flex; }
}

/* ===== Responsive: Small phones (max 520px) =====
   Role labels and icons no longer fit on one row, so the role switcher
   drops to its own full-width row. */
@media (max-width: 520px) {
  .site-header { height: auto; padding: 12px 0 22px; align-items: flex-start; }
  .header-inner { flex-wrap: wrap; justify-content: flex-start; gap: 10px 6px; }
  .logo { margin-right: auto; }
  .header-nav { display: contents; }
  .header-nav .role-switcher { order: 3; flex: 1 0 100%; width: 100%; }
  .header-nav .role-btn { flex: 1 1 0; padding: 9px 8px; font-size: 12px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 15px; height: 15px; }
  .hero { padding-top: 124px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-statue, .hero-cloud-1, .hero-cloud-2,
  .status-badge, .status-line, .star, .cta-btn {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
