/* ========================================
   CSS Custom Properties — Dark Default
   ======================================== */

:root {
  /* Raw RGB values for use in rgba() */
  --clr-coral-rgb: 255, 107, 107;
  --clr-magenta-rgb: 232, 67, 147;
  --clr-violet-rgb: 168, 85, 247;
  --clr-blue-rgb: 96, 165, 250;
  --clr-teal-rgb: 78, 205, 196;
  --clr-lime-rgb: 163, 230, 53;
  --clr-gold-rgb: 251, 191, 36;
  --clr-orange-rgb: 251, 146, 60;
  --clr-peach-rgb: 253, 164, 175;

  /* Raw RGB values for LIGHT mode (balanced + softer) */
  --clr-coral-rgb-light: 214, 90, 90;
  --clr-magenta-rgb-light: 185, 74, 122;
  --clr-violet-rgb-light: 126, 90, 198;
  --clr-blue-rgb-light: 79, 127, 201;
  --clr-teal-rgb-light: 58, 155, 144;
  --clr-lime-rgb-light: 138, 191, 74;
  --clr-gold-rgb-light: 199, 154, 51;
  --clr-orange-rgb-light: 216, 132, 74;
  --clr-peach-rgb-light: 209, 138, 149;

  /* Gold text — separate from gold fill so light mode can darken it for legibility */
  --clr-gold-text: var(--clr-gold);

  /* Named colour shortcuts */
  --clr-coral: #ff6b6b;
  --clr-magenta: #e84393;
  --clr-violet: #a855f7;
  --clr-blue: #60a5fa;
  --clr-teal: #4ecdc4;
  --clr-lime: #a3e635;
  --clr-gold: #fbbf24;
  --clr-orange: #fb923c;
  --clr-peach: #fda4af;

  /* Dark theme (default) */
  --bg: #0f0f0f;
  --text: #e8e8e8;
  --text-muted: #999;
  --surface: #161616;
  --surface-card: rgba(255, 255, 255, 0.025);
  --border: #252525;
  --selection-color: #fff;

  /* Alpha tokens */
  --highlight-alpha: 0.25;
  --tag-bg-alpha: 0.18;
  --tag-border-alpha: 0.3;
  --trigger-alpha: 0.45;
  --trigger-hover-alpha: 0.7;
  --glow-alpha: 0.45;
  --bar-empty: rgba(255, 255, 255, 0.06);
  --role-border: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.03);

  /* Typography */
  --font-heading: "Nunito", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Titan One", cursive;
  --heading-color: #fff;
  --highlight-offset: 0.32em;

  /* Spacing */
  --content-max: 920px;
}

/* ========================================
   Light Mode — browser preference
   ======================================== */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f0e6;
    --text: #1f1a14;
    --text-muted: #6b6259;
    --surface: #fff8ee;
    --surface-card: rgba(0, 0, 0, 0.04);
    --border: #e2d8c9;
    --selection-color: #f6f0e6;

    --highlight-alpha: 0.18;
    --tag-bg-alpha: 0.09;
    --tag-border-alpha: 0.16;
    --trigger-alpha: 0.22;
    --trigger-hover-alpha: 0.36;
    --glow-alpha: 0.2;
    --bar-empty: rgba(0, 0, 0, 0.08);
    --role-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.035);
    --heading-color: #1b1712;

    /* Swap to light-optimized colors for better contrast */
    --clr-coral-rgb: 214, 90, 90;
    --clr-magenta-rgb: 185, 74, 122;
    --clr-violet-rgb: 126, 90, 198;
    --clr-blue-rgb: 79, 127, 201;
    --clr-teal-rgb: 58, 155, 144;
    --clr-lime-rgb: 138, 191, 74;
    --clr-gold-rgb: 255, 220, 0;
    --clr-orange-rgb: 216, 132, 74;
    --clr-peach-rgb: 209, 138, 149;

    --clr-coral: #d65a5a;
    --clr-magenta: #b94a7a;
    --clr-violet: #7e5ac6;
    --clr-blue: #4f7fc9;
    --clr-teal: #3a9b90;
    --clr-lime: #8abf4a;
    --clr-gold: #ffdc00;
    --clr-gold-text: #8a6200;
    --clr-orange: #d8844a;
    --clr-peach: #d18a95;
  }
}

/* ========================================
   Light Mode — explicit override
   ======================================== */

[data-theme="light"] {
  --bg: #f6f0e6;
  --text: #1f1a14;
  --text-muted: #6b6259;
  --surface: #fff8ee;
  --surface-card: rgba(0, 0, 0, 0.04);
  --border: #e2d8c9;
  --selection-color: #f6f0e6;

  --highlight-alpha: 0.18;
  --tag-bg-alpha: 0.09;
  --tag-border-alpha: 0.16;
  --trigger-alpha: 0.22;
  --trigger-hover-alpha: 0.36;
  --glow-alpha: 0.2;
  --bar-empty: rgba(0, 0, 0, 0.08);
  --role-border: rgba(0, 0, 0, 0.08);
  --input-bg: rgba(0, 0, 0, 0.035);
  --heading-color: #1b1712;

  /* Swap to light-optimized colors for better contrast */
  --clr-coral-rgb: 214, 90, 90;
  --clr-magenta-rgb: 185, 74, 122;
  --clr-violet-rgb: 126, 90, 198;
  --clr-blue-rgb: 79, 127, 201;
  --clr-teal-rgb: 58, 155, 144;
  --clr-lime-rgb: 138, 191, 74;
  --clr-gold-rgb: 255, 220, 0;
  --clr-orange-rgb: 216, 132, 74;
  --clr-peach-rgb: 209, 138, 149;

  --clr-coral: #d65a5a;
  --clr-magenta: #b94a7a;
  --clr-violet: #7e5ac6;
  --clr-blue: #4f7fc9;
  --clr-teal: #3a9b90;
  --clr-lime: #8abf4a;
  --clr-gold: #ffdc00;
  --clr-gold-text: #8a6200;
  --clr-orange: #d8844a;
  --clr-peach: #d18a95;
}

/* ========================================
   Dark Mode — explicit override
   ======================================== */

[data-theme="dark"] {
  --bg: #0f0f0f;
  --text: #e8e8e8;
  --text-muted: #999;
  --surface: #161616;
  --surface-card: rgba(255, 255, 255, 0.025);
  --border: #252525;
  --selection-color: #fff;

  --highlight-alpha: 0.25;
  --tag-bg-alpha: 0.12;
  --tag-border-alpha: 0.2;
  --trigger-alpha: 0.45;
  --trigger-hover-alpha: 0.7;
  --glow-alpha: 0.45;
  --bar-empty: rgba(255, 255, 255, 0.06);
  --role-border: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.03);
  --heading-color: #fff;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.9;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--clr-violet);
  color: var(--selection-color);
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   Navigation — Hamburger Menu
   ======================================== */

.nav {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 900;
}

.nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  z-index: 910;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav__burger:hover {
  background: var(--border);
}

.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* Burger → X morphing */
.nav.open .nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.open .nav__burger span:nth-child(2) {
  opacity: 0;
}
.nav.open .nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nav.open .nav__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__link {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.nav__link:hover {
  background: var(--surface-card);
}

.nav__toggles {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem 0.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.nav__toggle-btn {
  flex: 1;
  padding: 0.4rem 0.6rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
  text-align: center;
}

.nav__toggle-btn:hover {
  background: var(--border);
}

/* ========================================
   Sections — Scroll-Snap Pages
   ======================================== */

.section {
  padding: 5rem 0;
  scroll-snap-align: center;
  scroll-margin-top: 0;
  scroll-snap-stop: always;
}

.section--hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
  scroll-snap-align: center;
  overflow: hidden;
}

.section--page {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
  overflow: hidden;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline;
  line-height: 1.05;
  color: var(--heading-color);
}

.section__heading-text {
  display: inline;
}

.section__emoji {
  display: inline-block;
  font-size: 1.3em;
  transform: rotate(3deg) translateY(0);
  position: relative;
  top: -0.08em;
  margin-left: 0.4rem;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
  cursor: pointer;
}

.section__emoji:hover {
  transform: rotate(3deg) translateY(-3px);
}

.section__emoji:active {
  transform: rotate(4deg) translateY(1px) scale(0.95);
}

.section.fade-in.visible .section__emoji--experience {
  animation: scribble 1.1s ease;
}

.section.fade-in.visible .section__emoji--education {
  animation: bookBounce 1.2s ease;
}

.section.fade-in.visible .section__emoji--skills {
  animation: screenGlow 1.25s ease;
}

.section.fade-in.visible .section__emoji--else {
  animation: heartPulse 1.15s ease;
}

.section.fade-in.visible .section__emoji--contact {
  animation: sendFly 1.2s ease;
}

@keyframes scribble {
  0% {
    transform: rotate(5deg) translateY(2px);
  }
  35% {
    transform: rotate(-1deg) translateY(-2px);
  }
  70% {
    transform: rotate(3deg) translateY(1px);
  }
  100% {
    transform: rotate(3deg) translateY(0);
  }
}

@keyframes bookBounce {
  0% {
    transform: rotate(4deg) translateY(0);
  }
  40% {
    transform: rotate(2deg) translateY(-6px);
  }
  70% {
    transform: rotate(5deg) translateY(2px);
  }
  100% {
    transform: rotate(3deg) translateY(0);
  }
}

@keyframes screenGlow {
  0% {
    transform: rotate(4deg) scale(1);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
  }
  45% {
    transform: rotate(2deg) scale(1.06);
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.35));
  }
  100% {
    transform: rotate(3deg) scale(1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  }
}

@keyframes heartPulse {
  0% {
    transform: rotate(3deg) scale(1);
  }
  40% {
    transform: rotate(2deg) scale(1.12);
  }
  70% {
    transform: rotate(4deg) scale(0.98);
  }
  100% {
    transform: rotate(3deg) scale(1);
  }
}

@keyframes sendFly {
  0% {
    transform: rotate(5deg) translateX(0);
  }
  40% {
    transform: rotate(1deg) translateX(6px);
  }
  70% {
    transform: rotate(4deg) translateX(-2px);
  }
  100% {
    transform: rotate(3deg) translateX(0);
  }
}


@keyframes emojiWiggle {
  0% {
    transform: rotate(3deg) translateY(-2px);
  }
  20% {
    transform: rotate(-3deg) translateY(-4px);
  }
  40% {
    transform: rotate(4deg) translateY(-3px);
  }
  60% {
    transform: rotate(-4deg) translateY(-5px);
  }
  80% {
    transform: rotate(2deg) translateY(-3px);
  }
  100% {
    transform: rotate(3deg) translateY(-2px);
  }
}

@keyframes emojiFloat {
  0% {
    transform: rotate(3deg) translateY(-3px);
  }
  50% {
    transform: rotate(2deg) translateY(-9px);
  }
  100% {
    transform: rotate(3deg) translateY(-3px);
  }
}

@keyframes emojiBeat {
  0% {
    transform: rotate(3deg) scale(1);
  }
  25% {
    transform: rotate(2deg) scale(1.12);
  }
  45% {
    transform: rotate(4deg) scale(0.98);
  }
  65% {
    transform: rotate(2deg) scale(1.16);
  }
  100% {
    transform: rotate(3deg) scale(1);
  }
}

@keyframes emojiSpin {
  0% {
    transform: rotate(3deg) scale(1.02);
  }
  100% {
    transform: rotate(363deg) scale(1.02);
  }
}

.section__emoji.section__emoji--tap {
  animation: emojiTap 0.65s ease both;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

@keyframes emojiTap {
  0% {
    transform: rotate(3deg) scale(1);
  }
  20% {
    transform: rotate(12deg) translateY(-6px) scale(1.22);
  }
  55% {
    transform: rotate(-7deg) translateY(2px) scale(0.95);
  }
  80% {
    transform: rotate(6deg) translateY(-2px) scale(1.08);
  }
  100% {
    transform: rotate(3deg) scale(1);
  }
}

.section__emoji.section__emoji--heartbeat {
  animation: heartBeatClick 0.9s ease both;
  filter: drop-shadow(0 6px 16px rgba(232, 67, 147, 0.45));
}

@keyframes heartBeatClick {
  0% {
    transform: rotate(3deg) scale(1);
  }
  20% {
    transform: rotate(2deg) scale(1.22);
  }
  35% {
    transform: rotate(4deg) scale(0.94);
  }
  55% {
    transform: rotate(2deg) scale(1.28);
  }
  75% {
    transform: rotate(4deg) scale(0.96);
  }
  100% {
    transform: rotate(3deg) scale(1);
  }
}

.section__emoji--boot {
  animation: bootPop 0.9s ease both;
}


@keyframes bootPop {
  0% {
    transform: rotate(3deg) scale(1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  }
  35% {
    transform: rotate(1deg) scale(1.15);
    filter: drop-shadow(0 6px 12px rgba(79, 127, 201, 0.4));
  }
  70% {
    transform: rotate(4deg) scale(0.98);
  }
  100% {
    transform: rotate(3deg) scale(1);
  }
}

/* Colour variants — heading text colour */
.section__heading--coral {
  color: var(--heading-color);
}
.section__heading--violet {
  color: var(--heading-color);
}
.section__heading--teal {
  color: var(--heading-color);
}
.section__heading--orange {
  color: var(--heading-color);
}
.section__heading--magenta {
  color: var(--heading-color);
}

.section p {
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
  margin-bottom: 1.25rem;
}

.section p:last-of-type {
  margin-bottom: 0;
}

/* ========================================
   Hero Section
   ======================================== */

.hero__greeting {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--heading-color);
}

.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: waveHand 0.8s ease-in-out 0.5s 1 both;
  cursor: pointer;
}

@keyframes waveHand {
  0% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(20deg);
  }
  30% {
    transform: rotate(-12deg);
  }
  45% {
    transform: rotate(16deg);
  }
  60% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(10deg);
  }
  90% {
    transform: rotate(-4deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes highFive {
  0% {
    transform: rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(-15deg) scale(1.4);
  }
  40% {
    transform: rotate(5deg) scale(1.6);
  }
  50% {
    transform: rotate(0deg) scale(1.8);
  }
  70% {
    transform: rotate(3deg) scale(1.3);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

.hero__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15em;
  color: var(--text);
}

.hero__intro {
  font-size: clamp(1.4rem, 3vw, 1.65rem);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
  color: var(--text);
  line-height: 1.9;
}

/* ========================================
   Trigger Words — Marker Highlighter
   Text lifts on hover, highlight stays.
   ======================================== */

.trigger {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  display: inline;
  padding: 0.05em 0.3em;
  margin: -0.05em -0.1em;
  text-decoration: none;
  position: relative;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.15s ease;
}

.trigger--nowrap {
  white-space: nowrap;
}

.trigger--wrap {
  background-image: linear-gradient(
    to right,
    rgba(var(--trigger-rgb), var(--trigger-alpha)),
    rgba(var(--trigger-rgb), var(--trigger-alpha))
  );
  background-size: 100% 1em;
  background-position: 0 var(--highlight-offset);
  background-repeat: repeat;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.trigger--wrap::before {
  display: none;
}

.trigger--wrap:hover {
  background-image: linear-gradient(
    to right,
    rgba(var(--trigger-rgb), var(--trigger-hover-alpha)),
    rgba(var(--trigger-rgb), var(--trigger-hover-alpha))
  );
}

/* Highlight lives in ::before — realistic marker effect via SVG filter */
.trigger::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.15em;
  top: var(--highlight-offset);
  width: calc(100% + 0.3em);
  height: 1em;
  filter: url(#marker-shape);
  border-radius: 0;
  transition: opacity 0.15s ease;
}

.trigger:hover {
  transform: translateY(-2px);
}

.trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Highlighted phrase animation */
.text-highlight {
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(
    to right,
    rgba(var(--clr-peach-rgb), var(--trigger-hover-alpha)),
    rgba(var(--clr-peach-rgb), var(--trigger-hover-alpha))
  );
  background-size: 0% 1em;
  background-position: 0 70%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease;
}

.text-highlight--active {
  animation: highlightSweep 1.05s ease forwards;
}

.text-highlight:hover {
  background-size: 100% 1em;
}

@keyframes highlightSweep {
  from {
    background-size: 0% 1em;
  }
  to {
    background-size: 100% 1em;
  }
}

/* --- Colour variants: ::before gets flat background + marker filter --- */

/* Coral */
.trigger--coral {
  --trigger-rgb: var(--clr-coral-rgb);
}
.trigger--coral::before {
  background-color: rgba(var(--clr-coral-rgb), var(--trigger-alpha));
}
.trigger--coral:hover::before {
  background-color: rgba(var(--clr-coral-rgb), var(--trigger-hover-alpha));
}

/* Violet */
.trigger--violet {
  --trigger-rgb: var(--clr-violet-rgb);
}
.trigger--violet::before {
  background-color: rgba(var(--clr-violet-rgb), var(--trigger-alpha));
}
.trigger--violet:hover::before {
  background-color: rgba(var(--clr-violet-rgb), var(--trigger-hover-alpha));
}

/* Blue */
.trigger--blue {
  --trigger-rgb: var(--clr-blue-rgb);
}
.trigger--blue::before {
  background-color: rgba(var(--clr-blue-rgb), var(--trigger-alpha));
}
.trigger--blue:hover::before {
  background-color: rgba(var(--clr-blue-rgb), var(--trigger-hover-alpha));
}

/* Teal */
.trigger--teal {
  --trigger-rgb: var(--clr-teal-rgb);
}
.trigger--teal::before {
  background-color: rgba(var(--clr-teal-rgb), var(--trigger-alpha));
}
.trigger--teal:hover::before {
  background-color: rgba(var(--clr-teal-rgb), var(--trigger-hover-alpha));
}

/* Gold */
.trigger--gold {
  --trigger-rgb: var(--clr-gold-rgb);
}
.trigger--gold::before {
  background-color: rgba(var(--clr-gold-rgb), var(--trigger-alpha));
}
.trigger--gold:hover::before {
  background-color: rgba(var(--clr-gold-rgb), var(--trigger-hover-alpha));
}

/* Magenta */
.trigger--magenta {
  --trigger-rgb: var(--clr-magenta-rgb);
}
.trigger--magenta::before {
  background-color: rgba(var(--clr-magenta-rgb), var(--trigger-alpha));
}
.trigger--magenta:hover::before {
  background-color: rgba(var(--clr-magenta-rgb), var(--trigger-hover-alpha));
}

/* Lime */
.trigger--lime {
  --trigger-rgb: var(--clr-lime-rgb);
}
.trigger--lime::before {
  background-color: rgba(var(--clr-lime-rgb), var(--trigger-alpha));
}
.trigger--lime:hover::before {
  background-color: rgba(var(--clr-lime-rgb), var(--trigger-hover-alpha));
}

/* Orange */
.trigger--orange {
  --trigger-rgb: var(--clr-orange-rgb);
}
.trigger--orange::before {
  background-color: rgba(var(--clr-orange-rgb), var(--trigger-alpha));
}
.trigger--orange:hover::before {
  background-color: rgba(var(--clr-orange-rgb), var(--trigger-hover-alpha));
}

/* Peach */
.trigger--peach {
  --trigger-rgb: var(--clr-peach-rgb);
}
.trigger--peach::before {
  background-color: rgba(var(--clr-peach-rgb), var(--trigger-alpha));
}
.trigger--peach:hover::before {
  background-color: rgba(var(--clr-peach-rgb), var(--trigger-hover-alpha));
}

/* ========================================
   Modal (using <dialog>)
   ======================================== */

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  max-width: 620px;
  width: min(620px, calc(100% - 2rem));
  max-height: 90vh;
  font-size: 0.98rem;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  opacity: 0;
  transition:
    opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  z-index: 1000;
}

.modal[open] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal__inner {
  padding: 2rem 2rem 2.25rem;
  overflow: hidden;
  max-height: none;
  height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal__inner::-webkit-scrollbar {
  display: none;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  z-index: 1;
}

.modal__close:hover {
  background: var(--border);
  color: var(--text);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-right: 2rem;
  color: var(--heading-color);
}

.modal__location {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: 1.25rem;
}

/* Card treatment for each section inside modals */
.modal__section {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
}

.modal__section:last-child {
  margin-bottom: 0;
}

.modal__subtitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--heading-color);
  margin-bottom: 0.75rem;
}

.modal__text {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ========================================
   Role List (inside modals)
   ======================================== */

.role-list {
  list-style: none;
}

.role-list__item {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--role-border);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  break-inside: avoid;
}

.role-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.role-list__item:first-child {
  padding-top: 0;
}

.role-list__item--highlight {
  background: rgba(var(--clr-gold-rgb), 0.06);
  border-radius: 6px;
  padding: 0.55rem 0.6rem;
  margin: 0 -0.25rem;
}

.role-list__title {
  font-weight: 500;
  font-size: 0.98rem;
}

.role-list__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   Tags / Pills — Multicolour cycling
   ======================================== */

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.35rem;
}

/* Base tag */
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: 7px;
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  animation: tagPop 0.3s ease both;
  animation-play-state: paused;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
  cursor: default;
}

.tag--tool {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}



.tag:hover {
  animation: tagPop 0.3s ease both;
  filter: brightness(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Colour cycling for skill tags */
.tag-list:not(.tag-list--tools) .tag:nth-child(5n + 1) {
  background: rgba(var(--clr-teal-rgb), var(--tag-bg-alpha));
  color: var(--clr-teal);
  border: 1px solid rgba(var(--clr-teal-rgb), var(--tag-border-alpha));
}
.tag-list:not(.tag-list--tools) .tag:nth-child(5n + 2) {
  background: rgba(var(--clr-violet-rgb), var(--tag-bg-alpha));
  color: var(--clr-violet);
  border: 1px solid rgba(var(--clr-violet-rgb), var(--tag-border-alpha));
}
.tag-list:not(.tag-list--tools) .tag:nth-child(5n + 3) {
  background: rgba(var(--clr-blue-rgb), var(--tag-bg-alpha));
  color: var(--clr-blue);
  border: 1px solid rgba(var(--clr-blue-rgb), var(--tag-border-alpha));
}
.tag-list:not(.tag-list--tools) .tag:nth-child(5n + 4) {
  background: rgba(var(--clr-coral-rgb), var(--tag-bg-alpha));
  color: var(--clr-coral);
  border: 1px solid rgba(var(--clr-coral-rgb), var(--tag-border-alpha));
}
.tag-list:not(.tag-list--tools) .tag:nth-child(5n + 5) {
  background: rgba(var(--clr-magenta-rgb), var(--tag-bg-alpha));
  color: var(--clr-magenta);
  border: 1px solid rgba(var(--clr-magenta-rgb), var(--tag-border-alpha));
}

/* Colour cycling for tool tags — 7-colour cycle */
.tag--tool:nth-child(7n + 1) {
  background: rgba(var(--clr-gold-rgb), 0.16) !important;
  color: var(--clr-gold-text) !important;
  border: 1px solid rgba(var(--clr-gold-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 2) {
  background: rgba(var(--clr-orange-rgb), 0.16) !important;
  color: var(--clr-orange) !important;
  border: 1px solid rgba(var(--clr-orange-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 3) {
  background: rgba(var(--clr-lime-rgb), 0.16) !important;
  color: var(--clr-lime) !important;
  border: 1px solid rgba(var(--clr-lime-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 4) {
  background: rgba(var(--clr-teal-rgb), 0.16) !important;
  color: var(--clr-teal) !important;
  border: 1px solid rgba(var(--clr-teal-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 5) {
  background: rgba(var(--clr-violet-rgb), 0.16) !important;
  color: var(--clr-violet) !important;
  border: 1px solid rgba(var(--clr-violet-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 6) {
  background: rgba(var(--clr-blue-rgb), 0.16) !important;
  color: var(--clr-blue) !important;
  border: 1px solid rgba(var(--clr-blue-rgb), 0.28) !important;
}
.tag--tool:nth-child(7n + 7) {
  background: rgba(var(--clr-peach-rgb), 0.16) !important;
  color: var(--clr-peach) !important;
  border: 1px solid rgba(var(--clr-peach-rgb), 0.28) !important;
}

.tag--tool.tool-has-color {
  background: var(--tool-bg) !important;
  color: var(--tool-color) !important;
  border: 1px solid var(--tool-border) !important;
}

.tag--tool.tag--notion {
  background: rgba(var(--clr-teal-rgb), 0.16) !important;
  color: var(--clr-teal) !important;
  border: 1px solid rgba(var(--clr-teal-rgb), 0.28) !important;
}

@keyframes tagPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   Tool Icon Click Animations
   ======================================== */

/* Click Animation 1: Bounce */
@keyframes tagBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-8px) scale(1.08);
  }
  50% {
    transform: translateY(0) scale(1.02);
  }
  75% {
    transform: translateY(-4px) scale(1.04);
  }
}

/* Click Animation 2: Spin */
@keyframes tagSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.15);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Click Animation 3: Pulse */
@keyframes tagPulse {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.2);
  }
  30% {
    transform: scale(0.95);
  }
  45% {
    transform: scale(1.15);
  }
  60% {
    transform: scale(0.98);
  }
  75% {
    transform: scale(1.08);
  }
}

/* Click Animation 4: Shake */
@keyframes tagShake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-3px) rotate(-2deg);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(3px) rotate(2deg);
  }
}

/* Click Animation 5: Flip */
@keyframes tagFlip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  50% {
    transform: perspective(400px) rotateY(180deg) scale(1.1);
  }
  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

/* Click Animation 6: Jello */
@keyframes tagJello {
  0%,
  100% {
    transform: skewX(0deg);
  }
  30% {
    transform: skewX(-12deg);
  }
  40% {
    transform: skewX(10deg);
  }
  50% {
    transform: skewX(-8deg);
  }
  65% {
    transform: skewX(4deg);
  }
  75% {
    transform: skewX(-2deg);
  }
}

/* Click Animation 7: Wiggle */
@keyframes tagWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(8deg) scale(1.05);
  }
  30% {
    transform: rotate(-8deg) scale(1.08);
  }
  45% {
    transform: rotate(6deg) scale(1.05);
  }
  60% {
    transform: rotate(-6deg) scale(1.08);
  }
  75% {
    transform: rotate(4deg) scale(1.05);
  }
}

/* Apply animations based on nth-child */
.tag--tool:nth-child(7n + 1).tag--clicked {
  animation: tagBounce 0.6s ease both;
}
.tag--tool:nth-child(7n + 2).tag--clicked {
  animation: tagSpin 0.5s ease both;
}
.tag--tool:nth-child(7n + 3).tag--clicked {
  animation: tagPulse 0.7s ease both;
}
.tag--tool:nth-child(7n + 4).tag--clicked {
  animation: tagShake 0.5s ease both;
}
.tag--tool:nth-child(7n + 5).tag--clicked {
  animation: tagFlip 0.6s ease both;
}
.tag--tool:nth-child(7n + 6).tag--clicked {
  animation: tagJello 0.8s ease both;
}
.tag--tool:nth-child(7n + 7).tag--clicked {
  animation: tagWiggle 0.6s ease both;
}

/* ========================================
   Proficiency Bars
   ======================================== */

.proficiency-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal .proficiency-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1rem;
}

.modal .proficiency-list--stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proficiency-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
  gap: 0.5rem;
}

.proficiency-item__name {
  font-weight: 500;
  font-size: 0.98rem;
}

.proficiency-item__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.proficiency-bar {
  display: flex;
  gap: 4px;
}

.proficiency-bar__segment {
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: var(--bar-empty);
}

.proficiency-bar__segment--filled {
  background: var(--clr-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* When animated class is added via JS */
.proficiency-bar__segment--filled.animate-in {
  transform: scaleX(1);
}

.proficiency-item__courses {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-style: italic;
}

.proficiency-item__courses--list {
  display: grid;
  gap: 0.25rem;
}

.proficiency-item__courses-label {
  font-style: italic;
}

.proficiency-item__course {
  display: block;
  padding-left: 0.9rem;
  position: relative;
}

.proficiency-item__course::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Proficiency bars also cycle colours per row */
.proficiency-item:nth-child(4n + 1) .proficiency-bar__segment--filled {
  background: var(--clr-teal);
}
.proficiency-item:nth-child(4n + 2) .proficiency-bar__segment--filled {
  background: var(--clr-violet);
}
.proficiency-item:nth-child(4n + 3) .proficiency-bar__segment--filled {
  background: var(--clr-coral);
}
.proficiency-item:nth-child(4n + 4) .proficiency-bar__segment--filled {
  background: var(--clr-blue);
}

#modal-design .proficiency-item--packaging .proficiency-bar__segment--filled {
  background: var(--clr-lime);
}

#modal-design .proficiency-item--photoshop .proficiency-bar__segment--filled {
  background: var(--clr-blue);
}

#modal-design .proficiency-item--illustrator .proficiency-bar__segment--filled {
  background: var(--clr-orange);
}

#modal-design .proficiency-item--indesign .proficiency-bar__segment--filled {
  background: var(--clr-magenta);
}

#modal-design .proficiency-item--webdesign .proficiency-bar__segment--filled {
  background: var(--clr-violet);
}

/* Explicit language + programming colours */
#modal-languages .proficiency-item--english .proficiency-bar__segment--filled {
  background: var(--clr-coral);
}

#modal-languages .proficiency-item--french .proficiency-bar__segment--filled {
  background: var(--clr-blue);
}

#modal-languages .proficiency-item--portuguese
  .proficiency-bar__segment--filled {
  background: var(--clr-lime);
}

#modal-languages .proficiency-item--spanish .proficiency-bar__segment--filled {
  background: var(--clr-gold);
}

#modal-languages .proficiency-item--html .proficiency-bar__segment--filled {
  background: var(--clr-orange);
}

#modal-languages .proficiency-item--css .proficiency-bar__segment--filled {
  background: var(--clr-violet);
}

#modal-languages .proficiency-item--javascript
  .proficiency-bar__segment--filled {
  background: var(--clr-gold);
}

#modal-languages .proficiency-item--yaml .proficiency-bar__segment--filled {
  background: var(--clr-coral);
}

#modal-languages .proficiency-item--markdown
  .proficiency-bar__segment--filled {
  background: var(--clr-lime);
}

/* ========================================
   Contact Form
   ======================================== */

.contact-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
}

/* ========================================
   Back to Top
   ======================================== */

.back-to-top-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.5rem;
  padding-bottom: 0.75rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

[data-theme="light"] .back-to-top {
  color: var(--text-muted);
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .back-to-top:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.06);
}

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

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--clr-teal);
  box-shadow: 0 0 0 3px rgba(var(--clr-teal-rgb), 0.12);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 2.25rem;
  color: var(--bg);
  background: var(--clr-teal);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.form-submit:hover {
  background: #3dbdb5;
  box-shadow: 0 4px 20px rgba(var(--clr-teal-rgb), 0.25);
}

.form-submit:active {
  transform: scale(0.97);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  min-height: 1.5rem;
}

.form-status--success {
  color: var(--clr-teal);
}

.form-status--error {
  color: var(--clr-coral);
}

/* ========================================
   Profile Card (Liam modal)
   ======================================== */

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}

.profile-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1.25rem;
}

.profile-card__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: var(--heading-color);
}

.profile-card__role {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.profile-card__company {
  font-size: 1.05rem;
  font-weight: 500;
}

.profile-card__location {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.profile-card__tenure {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ========================================
   Hero Name as Button
   ======================================== */

button.hero__name {
  background: none;
  border: none;
  font: inherit;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15em;
  color: var(--text);
  cursor: pointer;
  padding: 0.05em 0.3em;
  margin: -0.05em -0.1em;
  position: relative;
  transition: transform 0.15s ease;
}

button.hero__name::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.15em;
  top: var(--highlight-offset);
  width: calc(100% + 0.3em);
  height: 1em;
  background-color: rgba(var(--clr-gold-rgb), var(--trigger-alpha));
  filter: url(#marker-shape);
  transition: opacity 0.15s ease;
}

button.hero__name:hover {
  transform: translateY(-2px);
}

button.hero__name:hover::before {
  background-color: rgba(var(--clr-gold-rgb), var(--trigger-hover-alpha));
}

/* ========================================
   Education List (inside modals)
   ======================================== */

.edu-list {
  list-style: none;
}

.edu-list__item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--role-border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}

.edu-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.edu-list__item:first-child {
  padding-top: 0;
}

.edu-list__title {
  font-weight: 500;
  font-size: 1.05rem;
}

.edu-list__meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Course status pills */
.course-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.course-status--complete {
  background: rgba(var(--clr-teal-rgb), 0.15);
  color: var(--clr-teal);
}

.course-status--progress {
  background: rgba(var(--clr-gold-rgb), 0.15);
  color: var(--clr-gold-text);
}

.course-status--remaining {
  background: rgba(var(--clr-coral-rgb), 0.1);
  color: var(--clr-coral);
}

.course-status--level-high {
  background: rgba(var(--clr-teal-rgb), 0.15);
  color: var(--clr-teal);
}

.course-status--level-low {
  background: rgba(var(--clr-gold-rgb), 0.15);
  color: var(--clr-gold-text);
}

/* ========================================
   Fade-in Animation (staggered)
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .tag {
    opacity: 1;
    transform: none;
  }

  .proficiency-bar__segment--filled {
    transform: scaleX(1);
  }
}

/* ========================================
   Responsive — Tablet
   ======================================== */

@media (max-width: 768px) {
  body {
    font-size: 1.05rem;
    line-height: 1.75;
  }

  .container {
    padding: 0 1.1rem;
    max-width: 92vw;
  }

  .section {
    padding: 3rem 0;
  }

  .section--hero,
  .section--page {
    height: 100svh;
    justify-content: center;
  }

  .section p {
    line-height: 1.6;
  }

  .hero__greeting {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__intro {
    font-size: clamp(1.25rem, 3.2vw, 1.45rem);
  }

  .modal {
    width: min(940px, calc(100% - 1.5rem));
    max-height: 92vh;
    border-radius: 16px;
  }

  .modal__inner {
    padding: 1.35rem 1.15rem 1.5rem;
    max-height: none;
  }

  .modal__title {
    font-size: 1.35rem;
  }

  .modal__section {
    padding: 0.75rem;
  }

  .proficiency-item__header {
    flex-direction: column;
    gap: 0.1rem;
  }

  .proficiency-item__label {
    text-align: left;
  }

  .contact-card {
    padding: 1.25rem;
  }

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

/* ========================================
   Responsive — Modal Fullscreen
   ======================================== */

@media (max-width: 640px) {
  .modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: calc(100% - 2rem);
    max-width: none;
    max-height: 88svh;
    border-radius: 16px;
  }

  .modal[open] {
    transform: translate(-50%, -50%) scale(1);
  }

  .modal__inner {
    overflow: hidden;
    padding: 0.75rem 0.85rem 1rem;
    font-size: 0.82rem;
  }

  .modal__section {
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.5rem;
  }

  .modal__title {
    font-size: 1.1rem;
  }

  .modal__subtitle {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
  }

  .proficiency-item {
    margin-bottom: 0;
  }

  .proficiency-item__header {
    margin-bottom: 0.2rem;
  }

  .proficiency-bar__segment {
    height: 5px;
  }

  .proficiency-list {
    gap: 0.5rem;
  }

  .modal__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* ========================================
   Responsive — Small Mobile
   ======================================== */

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .container {
    padding: 0 0.9rem;
    max-width: 88vw;
  }

  .section {
    padding: 2rem 0;
  }

  .section__heading {
    font-size: clamp(1.4rem, 6.8vw, 2rem);
  }

  .section__emoji {
    font-size: 1.1em;
  }

  .section--hero,
  .section--page {
    height: 100svh;
    padding: 2rem 0;
  }

  .hero__greeting {
    font-size: clamp(1.6rem, 9vw, 2.3rem);
    margin-bottom: 0.4rem;
  }

  .section p {
    font-size: clamp(0.95rem, 3.6vw, 1.12rem);
    margin-bottom: 0.6rem;
    line-height: 1.55;
  }

  .hero__intro {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .hero__sub {
    font-size: clamp(0.9rem, 3.3vw, 1.05rem);
  }

  .nav {
    top: 0.75rem;
    right: 0.75rem;
  }

  .nav__burger {
    width: 40px;
    height: 40px;
  }

  /* Mobile: Show abbreviated "Experience" instead of "Professional Experience" */
  .section__heading-text[data-i18n="heading.experience"] {
    font-size: 0;
    line-height: 0;
  }

  .section__heading-text[data-i18n="heading.experience"]::before {
    font-size: clamp(1.4rem, 6.8vw, 2rem);
    line-height: 1.05;
  }

  :root[lang="en"]
    .section__heading-text[data-i18n="heading.experience"]::before {
    content: "Experience";
  }

  :root[lang="fr"]
    .section__heading-text[data-i18n="heading.experience"]::before {
    content: "Expérience";
  }
}
