/* ==========================================================================
   Single-screen portfolio landing
   Brand: orange #f26522 · teal #035d5c
   ========================================================================== */

:root {
  color-scheme: light;
  --orange: #f26522;
  --orange-light: #ff8c4a;
  --orange-pale: #ffd4b8;
  --orange-glow: rgba(242, 101, 34, 0.35);
  --teal: #035d5c;
  --teal-light: #0a8a88;
  --teal-glow: rgba(3, 93, 92, 0.25);
  --ink: #1a1410;
  --ink-soft: #4a4038;
  --surface: rgba(255, 252, 248, 0.72);
  --surface-solid: #fffaf6;
  --border: rgba(242, 101, 34, 0.18);
  --shadow: 0 20px 50px rgba(26, 20, 16, 0.12);
  --radius: 14px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 3.5rem;
  --content-section-width: min(90rem, calc(100vw - 3rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-solid);
  -webkit-font-smoothing: antialiased;
}

body.is-dialog-open {
  overflow: hidden !important;
}

/* ---- Animated background ---- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    #fff8f3 0%,
    #ffe8d6 35%,
    #ffd9bc 55%,
    #e8f5f4 85%,
    #d4eeec 100%
  );
}

.bg__mesh {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(
      ellipse 60% 50% at 20% 30%,
      var(--orange-glow),
      transparent 55%
    ),
    radial-gradient(
      ellipse 50% 45% at 80% 70%,
      var(--teal-glow),
      transparent 50%
    ),
    radial-gradient(
      ellipse 40% 35% at 60% 15%,
      rgba(255, 180, 120, 0.25),
      transparent 45%
    );
  animation: mesh-drift 18s ease-in-out infinite alternate;
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.bg__orb--1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: -8%;
  right: -5%;
  background: var(--orange-light);
  animation: float-a 14s ease-in-out infinite;
}

.bg__orb--2 {
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  bottom: 5%;
  left: -8%;
  background: var(--teal-light);
  animation: float-b 16s ease-in-out infinite;
}

.bg__orb--3 {
  width: min(200px, 30vw);
  height: min(200px, 30vw);
  top: 45%;
  left: 42%;
  background: var(--orange-pale);
  animation: float-c 12s ease-in-out infinite;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(3, 93, 92, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 93, 92, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 45%,
    black 20%,
    transparent 75%
  );
}

@keyframes mesh-drift {
  from {
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    transform: translate(3%, -2%) rotate(2deg);
  }
}

@keyframes float-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-24px, 20px) scale(1.06);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -16px);
  }
}

@keyframes float-c {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 14px);
  }
}

/* ---- Layout ---- */
.landing {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  padding: 4rem 1.25rem 3rem;
}

.landing__brand {
  position: fixed;
  z-index: 50;
  top: 1rem;
  left: 1.25rem;
  display: grid;
  width: 6rem;
  height: 3.75rem;
  padding: 0.45rem;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(242, 101, 34, 0.2), rgba(3, 93, 92, 0.18)),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  box-shadow:
    0 12px 28px rgba(26, 20, 16, 0.2),
    0 3px 8px rgba(242, 101, 34, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px) saturate(1.2);
}

.landing__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  animation: fade-down 0.7s var(--ease) both;
}

.landing__footer {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  animation: fade-up 0.8s var(--ease) 0.5s both;
}

.landing__license-link {
  color: var(--teal);
  font: 700 0.68rem var(--font-display);
  text-decoration: none;
}

.landing__license-link:hover,
.landing__license-link:focus-visible {
  color: var(--orange);
  outline: none;
  text-decoration: underline;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: min(92rem, 100%);
  width: 100%;
  gap: 0.35rem;
}

.hero__visual {
  position: relative;
  margin-bottom: 0.35rem;
  animation: fade-down 0.75s var(--ease) 0.05s both;
}

.hero__ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
    linear-gradient(135deg, var(--orange), var(--teal)) border-box;
  animation: ring-spin 8s linear infinite;
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero__photo {
  position: relative;
  /* width: 16rem;
  height: 16rem; */
  width: clamp(10rem, 18vh, 12rem);
  height: clamp(10rem, 18vh, 12rem);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface-solid);
  box-shadow: var(--shadow);
}

.hero__eyebrow {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  animation: fade-up 0.7s var(--ease) 0.12s both;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  animation: fade-up 0.7s var(--ease) 0.18s both;
}

.hero__name-accent {
  background: linear-gradient(
    120deg,
    #d9480f 0%,
    var(--orange) 42%,
    var(--teal-light) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--orange);
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

.hero__role {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 600;
  color: var(--ink-soft);
  animation: fade-up 0.7s var(--ease) 0.24s both;
}

.hero__role-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 var(--orange-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--orange-glow);
  }
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}

.hero__tagline {
  max-width: 32rem;
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  color: var(--ink-soft);
  margin: 0.15rem 0 0.25rem;
  animation: fade-up 0.7s var(--ease) 0.3s both;
}

/* ---- CTA dropdowns ---- */
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  animation: fade-up 0.75s var(--ease) 0.38s both;
}

/* ---- Contact ---- */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.15rem;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  animation: fade-up 0.75s var(--ease) 0.45s both;
}

.contact__link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.contact__link:hover {
  color: var(--orange);
}

.contact__sep {
  color: var(--ink-soft);
  opacity: 0.8;
}

/* ---- In-flow project chip selector ---- */
.social-selector {
  order: -2;
  flex-basis: 100%;
}

.social-selector__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-selector__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  color: var(--ink);
  font: 600 0.8rem var(--font-display);
  text-decoration: none;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.08);
  transition:
    color 0.15s,
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

.social-selector__list svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.social-selector__list li:nth-child(1) svg {
  color: #1877f2;
}
.social-selector__list li:nth-child(2) svg {
  color: #ff0000;
}
.social-selector__list li:nth-child(3) svg {
  color: #0a66c2;
}

.social-selector__list a:hover,
.social-selector__list a:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 5px 18px var(--teal-glow);
  outline: none;
  transform: translateY(-1px);
}

.project-selector {
  order: 0;
  flex-basis: 100%;
  width: 100%;
  margin: 0 auto 0.2rem;
  text-align: center;
  animation: fade-up 0.75s var(--ease) 0.36s both;
}

.project-selector__list {
  /* PROJECT CHIP SECTION TOP SPACE: increase the first value to add top padding. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0 0.25rem 0.45rem;
  list-style: none;
}

.scroll-down {
  position: fixed;
  z-index: 40;
  right: clamp(1rem, 2.5vw, 2.25rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow:
    0 10px 28px var(--orange-glow),
    0 0 0 3px rgba(242, 101, 34, 0.14);
  transition:
    opacity 0.2s,
    transform 0.2s var(--ease),
    box-shadow 0.2s;
  animation: scroll-button-float 2.2s ease-in-out infinite;
}

.scroll-down svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.scroll-down:hover,
.scroll-down:focus-visible {
  outline: none;
  box-shadow:
    0 14px 34px var(--orange-glow),
    0 0 0 4px rgba(3, 93, 92, 0.25);
  transform: translateY(-3px) scale(1.05);
}

.scroll-down.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
}

@keyframes scroll-button-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 0.3rem;
  }
}

.tech-stack {
  display: flex;
  flex-direction: column;
  order: 0;
  width: var(--content-section-width);
  margin: 0.6rem auto 0.85rem;
  padding: 1rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: fade-up 0.75s var(--ease) 0.32s both;
}

.tech-stack__heading {
  margin-bottom: 0.9rem;
  text-align: center;
}

.tech-stack__eyebrow {
  color: var(--orange);
  font: 700 0.68rem var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tech-stack__heading h2 {
  margin: 0.1rem 0 0.2rem;
  color: var(--teal);
  font: 800 clamp(1.1rem, 2vw, 1.45rem) var(--font-display);
}

.tech-stack__heading > p:last-child {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.tech-stack__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  flex: 1;
  gap: 0.7rem;
}

.tech-stack__group {
  padding: 0.8rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}

.tech-stack__group:hover {
  border-color: rgba(3, 93, 92, 0.35);
  box-shadow: 0 9px 22px rgba(3, 93, 92, 0.12);
  transform: translateY(-2px);
}

.tech-stack__group-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.tech-stack__group-heading h3 {
  color: var(--teal);
  font: 800 0.84rem var(--font-display);
}

.tech-stack__icon {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 9px;
  box-shadow: 0 4px 10px var(--orange-glow);
}

.tech-stack__icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tech-stack__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tech-stack__list li {
  padding: 0.27rem 0.48rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  background: #f4eeea;
  border: 1px solid rgba(3, 93, 92, 0.1);
  border-radius: var(--radius-pill);
}

@media (max-width: 900px) {
  .tech-stack__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.professional-projects {
  --professional-card-min-height: 31rem;
  --professional-preview-height: clamp(10rem, 15vw, 14rem);
  display: flex;
  flex-direction: column;
  width: var(--content-section-width);
  margin: 0 auto 1rem;
  padding: 1rem;
  text-align: left;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

/* Keep the skills and experience sections in a clear vertical reading order. */
@media (min-width: 1100px) {
  .project-selector {
    display: block;
    flex-basis: 100%;
    width: 100%;
  }

  .tech-stack {
    flex: 0 0 auto;
    width: var(--content-section-width);
    margin: 0.6rem auto 0.85rem;
  }

  .project-selector__list {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }
}

/* Use a balanced three-column skills layout at wide widths. */
@media (min-width: 1100px) {
  .tech-stack__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tech-stack__group {
    min-height: 0;
  }

  .project-selector__list {
    width: 100%;
  }
}

/* Compact wide layout so featured projects remain visible on laptop screens. */
@media (min-width: 1100px) and (max-height: 900px) {
  .professional-projects {
    /* Compact laptop card heights. */
    --professional-card-min-height: 27rem;
    --professional-preview-height: 6rem;
  }

  .landing {
    padding: 2rem 1rem 1.5rem;
  }

  .hero {
    gap: 0.2rem;
  }

  .hero__visual {
    margin-bottom: 0.1rem;
  }

  .hero__photo {
    width: 6rem;
    height: 6rem;
  }

  .hero__eyebrow {
    font-size: 0.8rem;
  }

  .hero__name {
    font-size: 1.7rem;
  }

  .hero__role {
    font-size: 0.88rem;
  }

  .hero__tagline {
    margin: 0.05rem 0;
    font-size: 0.78rem;
  }

  .contact {
    margin-top: 0.05rem;
  }

  .cta {
    gap: 0.4rem;
  }

  .tech-stack,
  .professional-projects {
    margin: 0.2rem 0 0.2rem;
    padding: 0.55rem;
  }

  .tech-stack__heading {
    margin-bottom: 0.45rem;
  }

  .tech-stack__heading > p:last-child {
    font-size: 0.64rem;
    line-height: 1.3;
  }

  .tech-stack__grid {
    gap: 0.4rem;
  }

  .tech-stack__group {
    padding: 0.45rem;
  }

  .tech-stack__group-heading {
    margin-bottom: 0.35rem;
  }

  .tech-stack__icon {
    width: 1.45rem;
    height: 1.45rem;
    flex-basis: 1.45rem;
  }

  .tech-stack__list {
    gap: 0.22rem;
  }

  .tech-stack__list li {
    padding: 0.2rem 0.35rem;
    font-size: 0.56rem;
  }
}

.professional-projects__heading {
  margin-bottom: 0.8rem;
  text-align: center;
}

.professional-projects__eyebrow {
  color: var(--orange);
  font: 700 0.68rem var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.professional-projects__heading h2 {
  margin: 0.1rem 0 0.2rem;
  color: var(--teal);
  font: 800 clamp(1.1rem, 2vw, 1.45rem) var(--font-display);
}

.professional-projects__heading > p:last-child {
  max-width: 44rem;
  margin-right: auto;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.professional-projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  flex: 1;
  align-items: stretch;
  gap: 0.75rem;
}

.professional-project {
  display: flex;
  height: 100%;
  min-height: var(--professional-card-min-height);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    box-shadow 0.2s;
}

.professional-project:hover,
.professional-project:focus-visible {
  border-color: var(--teal-light);
  box-shadow: 0 12px 26px var(--teal-glow);
  outline: none;
  transform: translateY(-4px);
}

.professional-project__media {
  position: relative;
  display: block;
  width: 100%;
  height: var(--professional-preview-height);
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: linear-gradient(135deg, #eaf7f6, #f5efea);
}

.professional-project__media--web {
  background: linear-gradient(135deg, #f9eee4, #e8f5f4);
}

.professional-project__media--desktop {
  background: linear-gradient(135deg, #edf5f5, #eef0fa);
}

.professional-project__media--personal {
  background: linear-gradient(135deg, #fff0e4, #e4f5f3);
}

.professional-project__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  transition:
    transform 0.35s var(--ease),
    filter 0.35s var(--ease);
}

/* The SaaS artwork is square, so reserve a square preview area for it. */
.professional-project__media--platform img {
  width: min(100%, var(--professional-preview-height));
  height: var(--professional-preview-height);
  max-height: 100%;
  object-fit: contain !important;
}

.professional-project:hover .professional-project__media img {
  filter: saturate(1.05);
}

.experience-art {
  position: absolute;
  width: 11rem;
  height: 5.75rem;
  overflow: hidden;
  border: 1px solid rgba(3, 93, 92, 0.22);
  border-radius: 0.55rem;
  box-shadow: 0 0.65rem 1.3rem rgba(3, 93, 92, 0.14);
  transform: perspective(24rem) rotateX(4deg) rotateY(-7deg);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.experience-art::before,
.experience-art::after {
  position: absolute;
  content: "";
}

.experience-art::before {
  inset: 0 0 auto;
  height: 0.8rem;
  background: rgba(3, 93, 92, 0.88);
}

.experience-art::after {
  top: 0.28rem;
  left: 0.45rem;
  width: 0.22rem;
  height: 0.22rem;
  background: #f6b57b;
  border-radius: 50%;
  box-shadow:
    0.42rem 0 #fff,
    0.84rem 0 rgba(255, 255, 255, 0.65);
}

.experience-art span {
  position: absolute;
  display: block;
  border-radius: 0.18rem;
}

.experience-art--platform {
  background: #fff;
}
.experience-art--platform span:nth-child(1) {
  top: 1.25rem;
  left: 0.55rem;
  width: 2rem;
  height: 3.8rem;
  background: #d9eceb;
}
.experience-art--platform span:nth-child(2) {
  top: 1.25rem;
  left: 2.95rem;
  right: 0.55rem;
  height: 1.05rem;
  background: #e9f5f4;
}
.experience-art--platform span:nth-child(3) {
  top: 2.7rem;
  left: 2.95rem;
  width: 3.4rem;
  height: 2.35rem;
  background: #f9e1cc;
}
.experience-art--platform span:nth-child(4) {
  top: 2.7rem;
  right: 0.55rem;
  width: 1.4rem;
  height: 2.35rem;
  background: #d7ecea;
}

.experience-art--web {
  background: #fffdfa;
}
.experience-art--web span:nth-child(1) {
  top: 1.28rem;
  left: 0.55rem;
  right: 0.55rem;
  height: 0.68rem;
  background: #d9eceb;
}
.experience-art--web span:nth-child(2) {
  top: 2.3rem;
  left: 0.55rem;
  width: 4.75rem;
  height: 2.75rem;
  background: #f5d7be;
}
.experience-art--web span:nth-child(3) {
  top: 2.3rem;
  right: 0.55rem;
  width: 3.65rem;
  height: 1.05rem;
  background: #dcefed;
}
.experience-art--web span:nth-child(4) {
  top: 3.72rem;
  right: 0.55rem;
  width: 3.65rem;
  height: 1.33rem;
  background: #e9f4f3;
}
.experience-art--web span:nth-child(5) {
  bottom: 0.32rem;
  left: 0.55rem;
  width: 6.1rem;
  height: 0.18rem;
  background: var(--orange);
}

.experience-art--desktop {
  background: #fff;
}
.experience-art--desktop span:nth-child(1) {
  top: 1.28rem;
  left: 0.55rem;
  right: 0.55rem;
  height: 2.5rem;
  background: #d9eceb;
}
.experience-art--desktop span:nth-child(2) {
  top: 2.02rem;
  left: 1.1rem;
  width: 4.75rem;
  height: 0.35rem;
  background: rgba(3, 93, 92, 0.55);
  box-shadow: 0 0.7rem rgba(3, 93, 92, 0.2);
}
.experience-art--desktop span:nth-child(3) {
  top: 4.15rem;
  left: 4.25rem;
  width: 2.55rem;
  height: 0.35rem;
  background: #789997;
}
.experience-art--desktop span:nth-child(4) {
  top: 4.5rem;
  left: 3.55rem;
  width: 3.95rem;
  height: 0.32rem;
  background: #789997;
  border-radius: 0.1rem;
}

.professional-project:hover .experience-art,
.professional-project:focus-within .experience-art {
  box-shadow: 0 0.9rem 1.8rem rgba(3, 93, 92, 0.2);
  transform: perspective(24rem) rotateX(0) rotateY(0) translateY(-0.2rem);
}

.professional-project__body {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  flex: 1;
  align-content: start;
  padding: 0.9rem;
}

.professional-project__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.professional-project__badges span {
  padding: 0.22rem 0.4rem;
  color: var(--teal);
  background: rgba(3, 93, 92, 0.08);
  border: 1px solid rgba(3, 93, 92, 0.14);
  border-radius: var(--radius-pill);
  font: 700 0.66rem var(--font-display);
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.professional-project__body h3 {
  margin: 0.7rem 0 0;
  color: var(--teal);
  font: 800 1.04rem var(--font-display);
  line-height: 1.25;
}

.professional-project__role {
  margin: 0.25rem 0 0.65rem;
  color: var(--orange);
  font: 700 0.74rem var(--font-display);
}

.professional-project__details {
  align-self: start;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.55;
}

.professional-project__details p {
  margin: 0;
}

.professional-project__technologies {
  padding-top: 0.65rem;
  color: var(--teal);
  font-weight: 800;
}

.professional-project__label {
  padding-top: 0.65rem;
  color: var(--teal);
  font-weight: 800;
}

.professional-project__contributions {
  display: grid;
  gap: 0.22rem;
  margin: 0.22rem 0 0;
  padding-left: 1rem;
}

.professional-project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.professional-project__stack li {
  padding: 0.2rem 0.36rem;
  color: var(--ink-soft);
  background: #f4eeea;
  border: 1px solid rgba(3, 93, 92, 0.1);
  border-radius: var(--radius-pill);
}

.professional-project__footer {
  align-self: end;
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-style: italic;
  line-height: 1.4;
  border-top: 1px solid rgba(3, 93, 92, 0.12);
}

.professional-projects__disclaimer {
  max-width: 55rem;
  margin: 1rem auto 0;
  padding: 0.75rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
  background: rgba(3, 93, 92, 0.045);
  border: 1px solid rgba(3, 93, 92, 0.1);
  border-radius: 0.55rem;
}

.github-selector {
  /* Resize the complete GitHub section here. */
  --github-card-width: 31rem;
  --github-cell-height: 9px;
  order: -1;
  flex-basis: 100%;
  width: min(var(--github-card-width), 100%);
}

.github-selector__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.github-profile-preview {
  position: relative;
}

.github-selector__links :is(a, button) {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  color: var(--ink);
  font: 600 0.8rem var(--font-display);
  text-decoration: none;
  cursor: pointer;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition:
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.github-selector__links svg {
  width: 1rem;
  height: 1rem;
}

.github-selector__links :is(a, button):hover,
.github-selector__links :is(a, button):focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  outline: none;
  transform: translateY(-1px);
}

.professional-activity-dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--ink-soft);
  background: var(--surface-solid);
  border: 1px solid rgba(3, 93, 92, 0.28);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 60px rgba(26, 20, 16, 0.28);
}

.professional-activity-dialog::backdrop {
  background: rgba(10, 29, 32, 0.5);
  backdrop-filter: blur(3px);
}

.professional-activity-dialog__content {
  padding: 1.25rem;
  font-size: 0.86rem;
  line-height: 1.65;
  text-align: justify;
  text-justify: inter-word;
}

.professional-activity-dialog__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.professional-activity-dialog h2 {
  color: var(--teal);
  font: 800 1.1rem var(--font-display);
  line-height: 1.25;
}

.professional-activity-dialog__heading button {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.professional-activity-dialog__heading button:hover,
.professional-activity-dialog__heading button:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  outline: none;
}

.professional-activity-dialog p + p {
  margin-top: 0.7rem;
}

.professional-activity-dialog__privacy {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(3, 93, 92, 0.14);
}

.professional-activity-dialog__privacy h3 {
  margin-bottom: 0.3rem;
  color: var(--teal);
  font: 800 0.72rem var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.github-activity {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.55rem);
  left: 50%;
  width: min(34rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.45rem 0.55rem;
  color: var(--ink-soft);
  font: 600 0.75rem var(--font-display);
  text-align: left;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(26, 20, 16, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.4rem);
  transition:
    opacity 0.2s,
    transform 0.2s var(--ease);
}

.github-profile-preview:hover .github-activity {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.github-profile-preview::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0.65rem;
  content: "";
}

.github-activity__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.github-activity__header small {
  display: block;
  margin-top: 0.05rem;
  font: 500 0.65rem var(--font);
}
.github-activity select {
  padding: 0.2rem 0.4rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.github-calendar-wrap {
  width: 100%;
  margin-top: 0.3rem;
  overflow: hidden;
  padding-bottom: 0.1rem;
}
.github-calendar__months {
  display: grid;
  grid-template-columns: repeat(53, minmax(0, 1fr));
  width: calc(100% - 28px);
  height: 0.75rem;
  margin-left: 29px;
  font: 500 0.6rem var(--font);
}
.github-calendar__months span {
  white-space: nowrap;
}
.github-calendar__body {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.github-calendar__days {
  display: grid;
  grid-template-rows: repeat(7, var(--github-cell-height));
  row-gap: 1px;
  width: 24px;
  flex: 0 0 24px;
  font: 500 0.55rem var(--font);
  line-height: 1;
}

.github-calendar__days span {
  align-self: center;
}
.github-calendar__days span:nth-child(1) {
  grid-row: 2;
}
.github-calendar__days span:nth-child(2) {
  grid-row: 4;
}
.github-calendar__days span:nth-child(3) {
  grid-row: 6;
}
.github-calendar {
  display: grid;
  grid-template-columns: repeat(53, minmax(0, 1fr));
  grid-template-rows: repeat(7, var(--github-cell-height));
  grid-auto-flow: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
  width: auto;
}
.github-calendar__day {
  width: 100%;
  height: var(--github-cell-height);
  background: #ebedf0;
  border-radius: 2px;
}
.github-calendar__day[data-level="1"] {
  background: #9be9a8;
}
.github-calendar__day[data-level="2"] {
  background: #40c463;
}
.github-calendar__day[data-level="3"] {
  background: #30a14e;
}
.github-calendar__day[data-level="4"] {
  background: #216e39;
}
.github-calendar__day--empty {
  visibility: hidden;
}
.github-activity > a {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-selector__list a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.project-selector__list a:hover,
.project-selector__list a:focus-visible {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
  outline: none;
  transform: translateY(-1px);
}

@media (min-width: 1100px) and (max-height: 900px) {
  .professional-projects__heading {
    margin-bottom: 0.45rem;
  }

  .professional-projects__heading > p:last-child {
    font-size: 0.64rem;
    line-height: 1.3;
  }

  .professional-projects__grid {
    gap: 0.5rem;
  }

  .professional-project__media {
    height: var(--professional-preview-height);
  }

  .professional-project__body {
    grid-template-rows: auto auto auto 1fr auto;
    padding: 0.6rem;
  }

  .professional-project__badges span {
    padding: 0.18rem 0.3rem;
    font-size: 0.5rem;
  }

  .professional-project__body h3 {
    margin-top: 0.45rem;
    font-size: 0.78rem;
  }

  .professional-project__role,
  .professional-project__details {
    font-size: 0.59rem;
    line-height: 1.4;
  }

  .professional-project__role {
    margin-bottom: 0.4rem;
  }
  .professional-project__label,
  .professional-project__technologies {
    padding-top: 0.4rem;
  }
  .professional-project__footer {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    font-size: 0.53rem;
  }

  .project-selector__list {
    gap: 0.32rem;
    padding-bottom: 0.2rem;
  }

  .project-selector__list a {
    padding: 0.38rem 0.6rem;
    font-size: 0.68rem;
  }
}

#menu-projects li:first-child a {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border: 2px solid #fff;
  font-weight: 700;
  box-shadow:
    0 5px 18px var(--teal-glow),
    0 0 0 2px var(--teal);
  transform: translateY(-1px);
}

#menu-projects li:first-child a::before {
  content: "★ Featured";
  margin-right: 0.35rem;
  color: #fff4a8;
  font-size: 0.68rem;
}

/* Match the featured call-to-action while signalling that this project is in active development. */
#menu-projects .personal-project-preview--ongoing > a {
  color: #1f1600;
  background: linear-gradient(135deg, #f8c65a, #f08c2e);
  border: 2px solid #fff;
  font-weight: 700;
  box-shadow:
    0 5px 18px rgba(240, 140, 46, 0.36),
    0 0 0 2px #d66e10;
  transform: translateY(-1px);
}

#menu-projects .personal-project-preview--ongoing > a::before {
  content: "↻ Ongoing";
  margin-right: 0.35rem;
  color: #5a2b00;
  font-size: 0.68rem;
}

#menu-projects .personal-project-preview--ongoing > a:hover,
#menu-projects .personal-project-preview--ongoing > a:focus-visible {
  color: #1f1600;
  background: linear-gradient(135deg, #ffda79, #f6a63e);
  border-color: #fff;
}

/* Live preview for the featured personal project (large screens only). */
.personal-project-preview__panel {
  display: none;
}

@media (min-width: 901px) {
  .personal-project-preview {
    position: relative;
    z-index: 5;
  }

  .personal-project-preview__panel {
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 0.75rem);
    left: 50%;
    display: block;
    width: min(37.5rem, calc(100vw - 3rem));
    overflow: hidden;
    background: var(--surface-solid);
    border: 1px solid rgba(3, 93, 92, 0.3);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(26, 20, 16, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.5rem) scale(0.98);
    transform-origin: bottom center;
    transition:
      opacity 0.2s,
      transform 0.25s var(--ease);
  }

  .personal-project-preview:hover .personal-project-preview__panel {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  .personal-project-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    color: #fff;
    font: 700 0.72rem var(--font-display);
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
  }

  .personal-project-preview__header span:last-child {
    color: #d4eeec;
    font-size: 0.65rem;
  }

  .personal-project-preview__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 30 / 19;
    overflow: hidden;
    background: #fff;
  }

  .personal-project-preview__viewport iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1200px;
    height: 760px;
    border: 0;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: top left;
  }
}

/* ---- Entrance animations ---- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- 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;
  }

  .bg__mesh,
  .bg__orb,
  .hero__ring {
    animation: none !important;
  }
}

/* ---- Mobile: allow slight scroll if needed ---- */
@media (max-width: 640px) {
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
  }

  .landing {
    min-height: 100dvh;
    max-height: none;
    padding: 3.5rem 1rem 2.5rem;
    justify-content: flex-start;
    padding-top: 4rem;
  }

  .landing__brand {
    top: 0.85rem;
    left: 1rem;
    width: 5.25rem;
    height: 3.25rem;
    padding: 0.38rem;
    border-radius: 12px;
  }

  .landing__footer {
    position: relative;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
  }

  .hero__photo {
    width: 6.5rem;
    height: 6.5rem;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .scroll-down {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.7rem;
    height: 2.7rem;
    border-width: 1px;
  }

  .scroll-down svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .professional-projects__grid {
    grid-template-columns: 1fr;
  }

  .professional-projects {
    /* Mobile card heights. */
    --professional-card-min-height: 0;
    --professional-preview-height: clamp(11rem, 52vw, 15rem);
  }

  .professional-project__media {
    height: var(--professional-preview-height);
  }

  .professional-project__body {
    grid-template-rows: auto auto auto 1fr auto;
  }

  .tech-stack {
    width: var(--content-section-width);
  }

  .tech-stack__grid {
    grid-template-columns: 1fr;
  }

  .github-selector,
  .github-profile-preview {
    width: 100%;
  }

  .github-selector__links {
    align-items: center;
    flex-direction: column;
  }

  .github-profile-preview__trigger,
  .github-profile-preview > a,
  .github-profile-preview > button,
  .github-selector__links > a {
    justify-content: center;
    width: 100%;
  }

  .github-activity {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-top: 0.55rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .github-profile-preview:hover .github-activity {
    transform: none;
  }

  .github-calendar-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .github-calendar__months,
  .github-calendar__body {
    min-width: 43rem;
  }

  .github-calendar {
    grid-template-rows: repeat(7, 9px);
  }

  .github-calendar__day {
    min-width: 9px;
    height: 9px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .landing {
    max-height: none;
  }
}

@media (max-height: 700px) and (min-width: 641px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .landing {
    max-height: none;
    padding: 3rem 1.25rem 2rem;
  }

  .hero__photo {
    width: 5.5rem;
    height: 5.5rem;
  }

  .hero__tagline {
    margin-bottom: 0.4rem;
  }
}

@media (prefers-color-scheme: dark) {
  .hero__name-accent {
    background: none;
    color: #ff8c4a;
    -webkit-text-fill-color: #ff8c4a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  }
}

@media (forced-colors: active) {
  .hero__name-accent {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}
