/* =========================================================
   Ravi Roshan — portfolio
   Sunset palette · warm, editorial, quietly technical
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  --bg: #fdf7ef;
  --bg-soft: #f7ecdf;
  --surface: #fffdf9;
  --surface-2: #fbf2e7;
  --text: #2a1a24;
  --text-soft: #4c3742;
  --muted: #7a646d;
  --line: rgba(42, 26, 36, 0.12);
  --line-strong: rgba(42, 26, 36, 0.22);
  --accent: #d95a3f;
  --accent-ink: #b4422d;
  --gold: #e89b3c;
  --rose: #cf5478;
  --dusk: #74508f;
  --success: #5f8f59;
  --success-bg: #e8f1e4;
  --header-bg: rgba(253, 247, 239, 0.95);
  --header-shadow: 0 18px 40px -32px rgba(58, 28, 34, 0.55);

  --gradient-sunset: linear-gradient(115deg, #d45036 0%, #e8943c 34%, #d45870 68%, #7b4b8c 100%);
  --gradient-sunset-bright: linear-gradient(115deg, #ff8a63 0%, #ffbf6b 36%, #f386a4 70%, #b58adb 100%);
  --gradient-warm-soft: linear-gradient(135deg, rgba(217, 90, 63, 0.1), rgba(232, 155, 60, 0.1) 45%, rgba(116, 80, 143, 0.1));

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-soft: 0 20px 50px -32px rgba(70, 36, 44, 0.38);
  --shadow-card: 0 34px 80px -42px rgba(70, 36, 44, 0.5);
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #171018;
  --bg-soft: #1e141f;
  --surface: #211726;
  --surface-2: #2a1c2d;
  --text: #f7ece4;
  --text-soft: #e4d3ca;
  --muted: #b09aa6;
  --line: rgba(247, 236, 228, 0.12);
  --line-strong: rgba(247, 236, 228, 0.23);
  --accent: #ff7a58;
  --accent-ink: #ff9a7f;
  --gold: #f5ad55;
  --rose: #ee7f9f;
  --dusk: #b893d6;
  --success: #9ed49a;
  --success-bg: rgba(158, 212, 154, 0.14);
  --header-bg: rgba(23, 16, 24, 0.95);
  --header-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.8);

  --gradient-sunset: linear-gradient(115deg, #ff7a58 0%, #ffb25e 34%, #ef7d9e 68%, #b18ad6 100%);
  --gradient-warm-soft: linear-gradient(135deg, rgba(255, 122, 88, 0.15), rgba(255, 178, 94, 0.12) 45%, rgba(177, 138, 214, 0.15));

  --shadow-soft: 0 24px 55px -32px rgba(0, 0, 0, 0.9);
  --shadow-card: 0 38px 90px -44px rgba(0, 0, 0, 0.95);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 28px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: var(--noise);
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}

[data-theme="dark"] body::after {
  opacity: 0.055;
  mix-blend-mode: screen;
}

body.menu-locked,
body.dialog-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 520;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gradient-sunset);
}

/* ---------- Shared typography ---------- */
.section {
  position: relative;
  padding-block: clamp(88px, 11vw, 144px);
}

.band {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 880px;
  margin-bottom: clamp(42px, 5vw, 64px);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-kicker span {
  color: var(--accent);
  letter-spacing: 0.06em;
}

.section-title {
  font-size: clamp(2.15rem, 4.2vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.032em;
}

.section-title em,
.hero-title em {
  padding-right: 0.04em;
  font-style: italic;
  color: transparent;
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse-dot 2.8s ease-out infinite;
}

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 14px 28px -20px rgba(42, 26, 36, 0.9);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.button svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform 0.35s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 32px -20px rgba(42, 26, 36, 0.85);
}

.button:hover svg {
  transform: translate(2px, -2px);
}

.button--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}

.button--ghost:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.button--small {
  padding: 10px 18px;
  font-size: 0.82rem;
}

.button--full {
  width: 100%;
}

.button--sunset {
  background: var(--gradient-sunset);
  color: #fff;
  box-shadow: 0 18px 35px -18px rgba(212, 80, 54, 0.65);
}

.button--sunset:hover {
  box-shadow: 0 22px 42px -18px rgba(212, 80, 54, 0.75);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--accent-ink);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.text-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.text-link:hover {
  border-color: currentColor;
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--header-bg);
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--header-shadow);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: var(--gradient-sunset);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 18px -10px rgba(212, 80, 54, 0.9);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-dot {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 12px;
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-sunset);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-menu-cta {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.nav-scrim {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 1;
  background: rgba(32, 19, 30, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.35s var(--ease), background-color 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(8deg);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.25s ease, transform 0.5s var(--ease);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.nav-toggle {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.nav-toggle span {
  position: absolute;
  right: 13px;
  left: 13px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.2s ease, top 0.35s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.menu-open .nav-toggle span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .nav-toggle span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

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

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
}

.js [data-reveal].is-visible {
  opacity: 1;
  animation: reveal-up 0.9s var(--ease) backwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 7vw, 92px) 42px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(52% 55% at 88% 12%, rgba(232, 155, 60, 0.2), transparent 68%),
    radial-gradient(42% 46% at 6% 72%, rgba(116, 80, 143, 0.11), transparent 72%);
}

[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(52% 55% at 88% 12%, rgba(245, 173, 85, 0.13), transparent 68%),
    radial-gradient(42% 46% at 6% 72%, rgba(177, 138, 214, 0.12), transparent 72%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(38px, 6vw, 76px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 630px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-sep {
  color: var(--line-strong);
}

.hero-title {
  max-width: 13ch;
  margin: 24px 0 24px;
  font-size: clamp(2.9rem, 5.9vw, 4.85rem);
  line-height: 0.99;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-lede {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-socials > span:first-child {
  margin-right: 4px;
  color: var(--muted);
}

.hero-socials a {
  position: relative;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-socials a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.hero-socials a:hover {
  color: var(--accent-ink);
}

.hero-socials a:hover::after {
  transform: scaleX(1);
}

.social-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Hero artwork */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 0;
}

.hero-art {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border-radius: 260px 260px 28px 28px;
  background: linear-gradient(180deg, #f6c177 0%, #ee9a5b 27%, #e46f63 53%, #b7617d 73%, #53305a 100%);
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  isolation: isolate;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 11px;
  z-index: 5;
  border: 1px solid rgba(255, 246, 229, 0.24);
  border-radius: 250px 250px 20px 20px;
  pointer-events: none;
}

.art-sun {
  position: absolute;
  top: 35%;
  left: 50%;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, #fff8dd 0 22%, #ffe7ac 38%, #ffcd7d 54%, rgba(255, 199, 115, 0) 72%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 80px 26px rgba(255, 203, 122, 0.28);
  animation: sun-breathe 9s ease-in-out infinite alternate;
}

.art-birds {
  position: absolute;
  top: 25%;
  left: 17%;
  z-index: 2;
  width: 27%;
  color: rgba(52, 27, 42, 0.58);
  opacity: 0.8;
}

.art-hills {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 57%;
}

.art-meta {
  position: absolute;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(48, 24, 37, 0.72);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.art-meta--top {
  top: 64px;
  left: 74px;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(64, 32, 44, 0.16);
  border-radius: 100px;
  background: rgba(255, 248, 232, 0.18);
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.art-meta--bottom {
  right: 27px;
  bottom: 24px;
  left: 27px;
  align-items: flex-end;
  color: rgba(255, 244, 231, 0.86);
}

.art-meta--bottom > span:first-child {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-transform: none;
}

.art-mark {
  color: rgba(255, 220, 177, 0.68);
}

.art-grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.3;
  background-image: var(--noise);
  background-size: 170px 170px;
  mix-blend-mode: soft-light;
}

.hero-visual .float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.float-card--role {
  top: 11%;
  right: -3%;
  animation: float-a 7s ease-in-out infinite;
}

.float-card--status {
  bottom: -28px;
  left: 4%;
  animation: float-b 8s ease-in-out infinite;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--gradient-sunset);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.float-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}

.float-copy small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.float-copy strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.hero-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-location span {
  margin-inline: 5px;
  color: var(--line-strong);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.scroll-cue svg {
  width: 14px;
  height: 14px;
  animation: bob 2.2s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--accent-ink);
}

.hero-clock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-clock span:last-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 15px;
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
  white-space: nowrap;
}

.marquee-group i {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-style: normal;
}

/* ---------- Keyframes ---------- */
@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes sun-breathe {
  from { opacity: 0.88; transform: translate(-50%, -50%) scale(0.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.025); }
}

@keyframes bob {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(4px); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: start;
}

.about-copy .lead {
  max-width: 26ch;
  margin-bottom: 24px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 480;
  letter-spacing: -0.015em;
  line-height: 1.32;
}

.about-copy p:not(.lead) {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.about-copy p + p {
  margin-top: 16px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.tag svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.about-panel {
  position: relative;
  align-self: start;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.about-panel::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 155, 60, 0.32), transparent 68%);
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-title {
  max-width: 22ch;
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.panel-title strong {
  font-weight: 620;
}

.panel-text {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.panel-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.facts {
  display: grid;
  gap: 13px;
  margin: 0;
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.79rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
  text-align: right;
}

.about-panel .text-link {
  margin-top: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: clamp(54px, 7vw, 84px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.stat-number {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-number span {
  margin-top: 0.18em;
  color: var(--accent);
  font-size: 0.55em;
}

.stat > p:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.skill-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--gradient-sunset);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card--accent {
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(232, 155, 60, 0.12), transparent 60%),
    var(--surface);
}

.skill-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--gradient-warm-soft);
  color: var(--accent-ink);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-index {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.skill-card h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 1.37rem;
  font-weight: 550;
}

.skill-tag {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(217, 90, 63, 0.25);
  border-radius: 100px;
  background: rgba(217, 90, 63, 0.1);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

[data-theme="dark"] .skill-tag {
  border-color: rgba(255, 122, 88, 0.3);
  background: rgba(255, 122, 88, 0.12);
}

.skill-card > p {
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.72;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 650;
  transition: border-color 0.25s ease;
}

.skill-card:hover .pill-list li {
  border-color: var(--line);
}

.toolbelt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.toolbelt-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-pills li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ---------- Work ---------- */
.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: clamp(38px, 5vw, 54px);
}

.work-head .section-head {
  flex: 1 1 520px;
  margin-bottom: 0;
}

.filters {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-soft);
}

.filter {
  padding: 8px 15px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.filter:hover {
  color: var(--text);
}

.filter.is-active {
  background: var(--surface);
  box-shadow: 0 4px 12px -7px rgba(42, 26, 36, 0.5);
  color: var(--text);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 46px) clamp(20px, 3vw, 32px);
}

.project {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project.is-filtered-out {
  display: none;
}

.project-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.project-media > svg {
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
}

.project-media:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.project-media:hover > svg,
.project-media:focus-visible > svg {
  transform: scale(1.035);
}

.project-view {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 100px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 8px 20px -10px rgba(42, 26, 36, 0.45);
  color: #2a1a24;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
  pointer-events: none;
}

.project-view svg {
  width: 13px;
  height: 13px;
}

.project-media:hover .project-view,
.project-media:focus-visible .project-view {
  opacity: 1;
  transform: translate(-50%, 0);
}

.project-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-inline: 4px;
}

.project-info h3 {
  margin-bottom: 4px;
  font-size: 1.42rem;
  font-weight: 550;
}

.project-info p {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  gap: 2px;
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-meta span:last-child {
  color: var(--text-soft);
}

.project-grid.is-filtering .project {
  animation: project-in 0.45s var(--ease);
}

@keyframes project-in {
  from { opacity: 0.2; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Experience ---------- */
.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 0.78fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 10px;
  left: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--gold) 45%, var(--dusk));
  opacity: 0.45;
}

.timeline-item {
  position: relative;
  padding: 0 0 46px 34px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-soft);
  box-shadow: 0 0 0 4px var(--bg-soft);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-soft), 0 0 18px rgba(217, 90, 63, 0.5);
}

.timeline-date {
  margin-bottom: 8px;
  color: var(--accent-ink);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.timeline-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-role h3 {
  font-size: 1.35rem;
  font-weight: 550;
}

.timeline-badge {
  padding: 4px 8px;
  border: 1px solid rgba(217, 90, 63, 0.24);
  border-radius: 100px;
  background: rgba(217, 90, 63, 0.1);
  color: var(--accent-ink);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

[data-theme="dark"] .timeline-badge {
  border-color: rgba(255, 122, 88, 0.28);
  background: rgba(255, 122, 88, 0.12);
}

.timeline-company {
  margin: 4px 0 11px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.timeline-item > p:not(.timeline-date, .timeline-company) {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.72;
}

.timeline-wins {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-wins li {
  position: relative;
  padding-left: 17px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.timeline-wins li::before {
  content: "↗";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  font-size: 0.72rem;
}

.experience-aside {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: grid;
  gap: 18px;
}

.aside-card {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.aside-kicker {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.aside-card h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 540;
  line-height: 1.15;
}

.aside-card > p:not(.aside-kicker) {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.7;
}

.aside-card--muted {
  background: transparent;
  box-shadow: none;
}

.aside-card h4 {
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 560;
}

.recognition {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recognition li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.79rem;
  line-height: 1.55;
}

.recognition li:last-child {
  padding-bottom: 0;
  border: 0;
}

.recognition span {
  flex: none;
  width: 62px;
  padding-top: 2px;
  color: var(--accent-ink);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.section--contact {
  padding-block: clamp(60px, 8vw, 100px) clamp(78px, 9vw, 118px);
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: clamp(38px, 6vw, 78px);
  overflow: hidden;
  padding: clamp(30px, 5.4vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  background: #211423;
  box-shadow: 0 40px 100px -55px rgba(53, 22, 40, 0.65);
  color: #f9ede3;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: -320px;
  right: -190px;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 161, 60, 0.3), rgba(222, 90, 62, 0.16) 36%, transparent 70%);
  pointer-events: none;
}

.contact-panel::after {
  content: "";
  position: absolute;
  bottom: -330px;
  left: -190px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 75, 140, 0.34), transparent 70%);
  pointer-events: none;
}

.contact-copy,
.contact-form {
  position: relative;
  z-index: 1;
}

.section-kicker--light {
  color: rgba(249, 237, 227, 0.58);
}

.section-kicker--light span {
  color: #ffb25e;
}

.contact-copy h2 {
  max-width: 12ch;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 4.7vw, 3.85rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.contact-copy h2 em {
  padding-right: 0.04em;
  font-style: italic;
  color: transparent;
  background: linear-gradient(115deg, #ffb25e 0%, #ff8a68 46%, #f2a7c3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-lede {
  max-width: 46ch;
  color: rgba(249, 237, 227, 0.66);
  font-size: 0.94rem;
  line-height: 1.8;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 178, 94, 0.45);
  color: #fff7ee;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  font-weight: 480;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-email svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.3s var(--ease);
}

.contact-email:hover {
  border-color: #ffb25e;
  color: #ffb25e;
}

.contact-email:hover svg {
  transform: translate(2px, -2px);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.social-list a {
  color: rgba(249, 237, 227, 0.64);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.social-list a:hover {
  color: #ffb25e;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  color: rgba(249, 237, 227, 0.62);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(18, 9, 18, 0.24);
  color: #fff;
  font-size: 0.88rem;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(249, 237, 227, 0.34);
}

.field input:focus,
.field textarea:focus {
  border-color: #ffb25e;
  outline: none;
  background: rgba(18, 9, 18, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 178, 94, 0.14);
}

.contact-form .button {
  width: 100%;
  margin-top: 2px;
}

.contact-form :focus-visible {
  outline-color: #ffb25e;
}

.form-status {
  min-height: 0;
  margin: 0;
  color: #ffd39c;
  font-size: 0.78rem;
  line-height: 1.5;
}

.form-status:empty {
  display: none;
}

.form-note {
  color: rgba(249, 237, 227, 0.44);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-top: clamp(48px, 6vw, 70px);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.55fr 0.65fr 1fr;
  gap: 40px;
  padding-bottom: clamp(40px, 5vw, 56px);
}

.footer-brand p {
  max-width: 32ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.footer-heading {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid ul a {
  color: var(--text-soft);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-grid ul a:hover {
  color: var(--accent-ink);
}

.footer-mail {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 480;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.footer-mail:hover {
  color: var(--accent-ink);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.72rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-weight: 650;
  text-decoration: none;
}

.back-top svg {
  width: 13px;
  height: 13px;
  transition: transform 0.3s var(--ease);
}

.back-top:hover svg {
  transform: translateY(-3px);
}

/* ---------- Project dialog ---------- */
.project-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(88vh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 50px 120px -30px rgba(18, 8, 16, 0.65);
  color: var(--text);
}

.project-dialog::backdrop {
  background: rgba(26, 13, 23, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-dialog[open] {
  animation: dialog-in 0.4s var(--ease);
}

.dialog-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 174px;
  overflow: hidden;
  background: var(--dialog-art, var(--gradient-sunset));
}

.dialog-art::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.045), 0 0 0 108px rgba(255, 255, 255, 0.025);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.dialog-art span {
  position: relative;
  z-index: 1;
  color: rgba(255, 248, 238, 0.3);
  font-family: var(--font-display);
  font-size: 7.2rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 244, 0.92);
  color: #2a1a24;
  transition: transform 0.3s var(--ease), background-color 0.2s ease;
}

.dialog-close:hover {
  background: #fff;
  transform: rotate(90deg);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.dialog-body {
  padding: clamp(24px, 4vw, 34px);
}

.dialog-kicker {
  margin-bottom: 8px;
  color: var(--accent-ink);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dialog-body h2 {
  margin-bottom: 5px;
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  font-weight: 540;
}

.dialog-tagline {
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
}

.dialog-description {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}

.dialog-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dialog-facts dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.5;
}

.dialog-highlights {
  display: grid;
  gap: 9px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.dialog-highlights li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

.dialog-highlights li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-sunset);
}

.dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.dialog-dismiss {
  margin-top: 0;
  color: var(--muted);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid {
    gap: 40px;
  }

  .hero-art {
    width: min(100%, 400px);
  }

  .hero-visual .float-card--role {
    display: none;
  }

  .float-card--status {
    left: 0;
  }

  .about-grid {
    gap: 42px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 70px;
  }

  .nav {
    gap: 16px;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    right: 16px;
    left: 16px;
    z-index: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 30px 70px -25px rgba(25, 12, 22, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.99);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.35s var(--ease), visibility 0.28s;
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: var(--bg-soft);
    color: var(--text);
  }

  .nav-link.is-active::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

  .nav-menu-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
  }

  .nav-menu-cta svg {
    width: 14px;
    height: 14px;
  }

  .nav-scrim[hidden] {
    display: none;
  }

  .menu-open {
    background: var(--bg);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-title {
    max-width: 15ch;
  }

  .hero-visual {
    justify-content: center;
    padding-block: 4px;
  }

  .hero-art {
    width: min(100%, 420px);
  }

  .float-card--role {
    right: 2%;
  }

  .float-card--status {
    bottom: -24px;
    left: 2%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-panel {
    max-width: 560px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .experience-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-copy h2 {
    max-width: 15ch;
  }

  .contact-form {
    max-width: 560px;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.6fr 0.8fr;
  }

  .footer-cta {
    grid-column: 1 / -1;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .footer-status {
    margin-top: 12px;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 40px);
  }

  .section {
    padding-block: 84px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-foot {
    flex-wrap: wrap;
  }

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

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .work-head {
    align-items: flex-start;
  }

  .work-head .section-head {
    flex-basis: 100%;
  }

  .filters {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .filter {
    flex: none;
  }

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

  .experience-aside {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 28px;
    border-radius: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-cta {
    grid-column: 1 / -1;
  }

  .dialog-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 64px;
  }

  .container {
    width: calc(100% - 36px);
  }

  .nav {
    gap: 14px;
  }

  .nav-actions {
    gap: 8px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .nav-toggle span {
    right: 12px;
    left: 12px;
  }

  .nav-toggle span:nth-child(1) { top: 15px; }
  .nav-toggle span:nth-child(2) { top: 20px; }
  .nav-toggle span:nth-child(3) { top: 25px; }

  .menu-open .nav-toggle span:nth-child(1),
  .menu-open .nav-toggle span:nth-child(3) {
    top: 20px;
  }

  .nav-menu {
    top: calc(var(--header-h) + 8px);
    right: 12px;
    left: 12px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-title {
    max-width: 100%;
    margin-block: 20px;
    font-size: clamp(2.55rem, 11.2vw, 3.35rem);
  }

  .hero-lede {
    font-size: 0.97rem;
  }

  .eyebrow {
    font-size: 0.61rem;
    letter-spacing: 0.08em;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .button {
    flex: 1 1 0;
    padding-inline: 14px;
    font-size: 0.84rem;
  }

  .hero-art {
    width: min(100%, 360px);
  }

  .hero-visual .float-card--role {
    display: none;
  }

  .float-card--status {
    bottom: -20px;
    left: 8px;
    padding: 9px 11px;
  }

  .float-card--status .float-copy strong {
    font-size: 0.69rem;
  }

  .art-meta--bottom {
    right: 24px;
    left: 24px;
  }

  .art-meta--top {
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-foot {
    gap: 14px;
    margin-top: 40px;
    font-size: 0.61rem;
    letter-spacing: 0.07em;
  }

  .scroll-cue span {
    display: none;
  }

  .hero-clock {
    margin-left: auto;
  }

  .marquee-group {
    gap: 20px;
    padding-right: 20px;
    font-size: 0.95rem;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .section-title {
    font-size: clamp(2rem, 8.5vw, 2.7rem);
  }

  .about-copy .lead {
    max-width: 34ch;
  }

  .skill-card {
    padding: 24px;
  }

  .about-panel {
    padding: 24px;
  }

  .project-view {
    display: none;
  }

  .project-info {
    flex-direction: column;
    gap: 8px;
  }

  .project-meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 0;
    text-align: left;
  }

  .project-meta span + span::before {
    content: "·";
    margin-right: 10px;
    color: var(--line-strong);
  }

  .timeline-item {
    padding-left: 28px;
    padding-bottom: 38px;
  }

  .timeline-item > p:not(.timeline-date, .timeline-company) {
    font-size: 0.86rem;
  }

  .contact-panel {
    padding: 24px;
  }

  .contact-copy h2 {
    max-width: 100%;
  }

  .contact-form {
    padding: 20px;
  }

  .footer-grid {
    gap: 28px 20px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-dialog {
    width: calc(100% - 24px);
    border-radius: 22px;
  }

  .dialog-art {
    height: 148px;
  }

  .dialog-body {
    padding: 22px;
  }

  .dialog-facts {
    grid-template-columns: 1fr;
    gap: 13px;
  }

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

  .dialog-actions .button {
    width: 100%;
  }

  .dialog-dismiss {
    align-self: center;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 32px);
  }

  .brand-name {
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav {
    gap: 10px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-socials {
    gap: 10px;
  }

  .stats {
    gap: 24px 16px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

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

  .footer-brand,
  .footer-cta {
    grid-column: auto;
  }

  .contact-email {
    font-size: 1.02rem;
  }
}

@media (max-width: 350px) {
  .filter {
    padding: 8px 10px;
  }
}
