/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --porcelain: #F7F7F2;
  --beige: #E4E6C3;
  --palm: #C9A94E;
  --carbon: #222725;
  --onyx: #121113;

  --palm-rgb: 201, 169, 78;
  --beige-rgb: 228, 230, 195;

  --bg: var(--onyx);
  --bg-elevated: var(--carbon);
  --text: var(--porcelain);
  --text-muted: rgba(247, 247, 242, 0.64);
  --border: rgba(247, 247, 242, 0.10);
  --glass: rgba(247, 247, 242, 0.045);
  --glass-strong: rgba(247, 247, 242, 0.07);
  --accent: var(--palm);
  --accent-soft: rgba(var(--palm-rgb), 0.18);

  /* Ambient glow tokens */
  --glow-gold: radial-gradient(600px 600px at var(--glow-x, 50%) var(--glow-y, 30%), rgba(var(--palm-rgb), 0.12), transparent 70%);
  --glow-beige: radial-gradient(500px 500px at var(--glow-x, 50%) var(--glow-y, 30%), rgba(var(--beige-rgb), 0.08), transparent 70%);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(var(--palm-rgb), 0.25), 0 20px 50px rgba(var(--palm-rgb), 0.12);

  --ease: cubic-bezier(.16, .84, .44, 1);
  --font-main: 'Vazirmatn', sans-serif;
}

/* LTR (English page) — use Latin font so digits render in standard numerals */
html[dir="ltr"] {
  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="light"] {
  --bg: var(--porcelain);
  --bg-elevated: #ffffff;
  --text: var(--carbon);
  --text-muted: rgba(34, 39, 37, 0.62);
  --border: rgba(34, 39, 37, 0.10);
  --glass: rgba(34, 39, 37, 0.04);
  --glass-strong: rgba(34, 39, 37, 0.06);
  --shadow-soft: 0 20px 60px rgba(34, 39, 37, 0.08);
  --shadow-glow: 0 0 0 1px rgba(var(--palm-rgb), 0.3), 0 20px 50px rgba(var(--palm-rgb), 0.16);
}

/* Light theme — softer glow & grain */
[data-theme="light"] section:nth-child(even)::before {
  opacity: 0.3;
  filter: blur(120px);
}

[data-theme="light"] section:nth-child(odd):not(.hero)::before {
  opacity: 0.2;
  filter: blur(120px);
}

[data-theme="light"] body::after {
  opacity: 0.02;
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  transition: background .4s var(--ease), color .4s var(--ease);
  line-height: 1.75;
}

/* Subtle noise/grain texture overlay for modern feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--palm);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  right: 12px;
  top: -60px;
  background: var(--palm);
  color: var(--onyx);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 999;
  transition: top .25s var(--ease);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   LOADER
   ========================================================================== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--onyx);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(var(--palm-rgb), 0.2);
  border-top-color: var(--palm);
  animation: spin 0.9s linear infinite;
}

.loader-label {
  color: var(--porcelain);
  font-size: 0.85rem;
  letter-spacing: .05em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 500;
  padding: 18px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(18, 17, 19, 0.65);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(247, 247, 242, 0.75);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: clamp(34px, 5vw, 52px);
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color .25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--palm);
  transition: width .3s var(--ease);
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.theme-toggle:hover {
  transform: rotate(20deg);
  border-color: var(--palm);
}

.theme-toggle i {
  position: absolute;
  font-size: 1rem;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.theme-toggle .bi-sun-fill {
  opacity: 0;
  transform: scale(.5) rotate(-90deg);
}

.theme-toggle .bi-moon-stars-fill {
  opacity: 1;
  transform: scale(1) rotate(0);
}

[data-theme="light"] .theme-toggle .bi-sun-fill {
  opacity: 1;
  transform: scale(1) rotate(0);
}

[data-theme="light"] .theme-toggle .bi-moon-stars-fill {
  opacity: 0;
  transform: scale(.5) rotate(90deg);
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-end: 8px;
}

.lang-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
  text-decoration: none;
  line-height: 1;
}

.lang-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--glass);
}

.lang-link--active {
  color: var(--palm);
  border-color: var(--palm);
  background: rgba(var(--palm-rgb), 0.08);
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .lang-switcher {
    margin-inline-end: 0;
    margin-top: 12px;
    justify-content: center;
  }
}

/* ==========================================================================
   BUTTONS / SHARED
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary-glow {
  background: var(--palm);
  color: var(--onyx);
  box-shadow: var(--shadow-glow);
}

.btn-primary-glow:hover {
  box-shadow: 0 0 0 1px rgba(var(--palm-rgb), .4), 0 24px 50px rgba(var(--palm-rgb), .28);
}

.btn-outline-glow {
  background: var(--glass);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-outline-glow:hover {
  border-color: var(--palm);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--palm);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.section-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--palm);
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.section-title span {
  color: var(--palm);
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--palm);
  font-weight: 700;
  margin-top: 22px;
}

.text-link i {
  transition: transform .3s var(--ease);
}

.text-link:hover i {
  transform: translateX(-4px);
}

/* ==========================================================================
   FLOATING SPOTS / AMBIENT PARTICLES
   ========================================================================== */
.float-spot {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform, translate;
  backface-visibility: hidden;
  translate: 0 var(--parallax-y, 0px);
}

.float-spot--xs {
  width: 4px;
  height: 4px;
}

.float-spot--sm {
  width: 9px;
  height: 9px;
}

.float-spot--md {
  width: 18px;
  height: 18px;
}

.float-spot--lg {
  width: 34px;
  height: 34px;
}

.float-spot--xl {
  width: 64px;
  height: 64px;
}

.float-spot--gold {
  background: rgba(var(--palm-rgb), 0.12);
  box-shadow: 0 0 8px rgba(var(--palm-rgb), 0.06);
}

.float-spot--beige {
  background: rgba(var(--beige-rgb), 0.10);
  box-shadow: 0 0 6px rgba(var(--beige-rgb), 0.04);
}

.float-spot--glass {
  background: rgba(247, 247, 242, 0.03);
  border: 1px solid rgba(247, 247, 242, 0.05);
  backdrop-filter: blur(3px);
}

.float-spot--diamond {
  border-radius: 3px;
}

.float-spot--orb {
  filter: blur(60px);
  opacity: 0.12;
  box-shadow: none;
}

/* --- 5 distinct drift animations — larger range, faster, organic --- */
@keyframes drift-1 {
  0% {
    transform: translate(0px, 0px) scale(1);
  }

  25% {
    transform: translate(50px, -60px) scale(1.1);
  }

  50% {
    transform: translate(-40px, -80px) scale(0.93);
  }

  75% {
    transform: translate(-60px, -25px) scale(1.06);
  }

  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

@keyframes drift-2 {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }

  33% {
    transform: translate(-55px, 45px) rotate(120deg);
  }

  66% {
    transform: translate(40px, 65px) rotate(240deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(360deg);
  }
}

@keyframes drift-3 {
  0% {
    transform: translate(0px, 0px);
  }

  50% {
    transform: translate(45px, -50px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

@keyframes drift-4 {
  0% {
    transform: translate(0px, 0px) scale(1);
  }

  50% {
    transform: translate(-35px, 40px) scale(1.25);
  }

  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

@keyframes drift-5 {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }

  25% {
    transform: translate(40px, 30px) rotate(90deg);
  }

  50% {
    transform: translate(-25px, 55px) rotate(180deg);
  }

  75% {
    transform: translate(-50px, -15px) rotate(270deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(360deg);
  }
}

/* Glow pulse */
@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.08;
    box-shadow: 0 0 4px rgba(var(--palm-rgb), 0.04);
  }

  50% {
    opacity: 0.25;
    box-shadow: 0 0 16px rgba(var(--palm-rgb), 0.12);
  }
}

.anim-1 {
  animation: drift-1 11s ease-in-out infinite;
}

.anim-2 {
  animation: drift-2 13s ease-in-out infinite;
}

.anim-3 {
  animation: drift-3 9s ease-in-out infinite;
}

.anim-4 {
  animation: drift-4 10s ease-in-out infinite;
}

.anim-5 {
  animation: drift-5 15s ease-in-out infinite;
}

.anim-glow {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* ==========================================================================
   GLOBAL SECTION STYLING & AMBIENT GLOW
   ========================================================================== */
section {
  position: relative;
  padding: 120px 0;
}

/* Ensure section content sits above glow/divider pseudo-elements */
section>.container,
section>.hero-inner {
  position: relative;
  z-index: 2;
}

/* Ambient glow pseudo-elements — soft radial light behind content */
section::before {
  content: '';
  position: absolute;
  z-index: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.3;
  transition: opacity .6s var(--ease);
}

/* Even sections — gold glow from top-left */
section:nth-child(even)::before {
  background: radial-gradient(circle, rgba(var(--palm-rgb), 0.18), transparent 70%);
  top: 5%;
  left: -200px;
}

/* Odd sections (except hero) — beige glow from top-right */
section:nth-child(odd):not(.hero)::before {
  background: radial-gradient(circle, rgba(var(--beige-rgb), 0.12), transparent 70%);
  top: 10%;
  right: -200px;
  left: auto;
}

/* Hero already has its own advanced backgrounds — hide the generic glow */
.hero::before,
.hero::after {
  display: none;
}

/* Subtle section divider line */
section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  max-width: 500px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--palm-rgb), 0.10) 20%, rgba(var(--palm-rgb), 0.15) 50%, rgba(var(--palm-rgb), 0.10) 80%, transparent);
  pointer-events: none;
}

/* Remove divider from hero & footer-adjacent sections */
.hero::after,
.contact::after {
  display: none;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(var(--palm-rgb), 0.16), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(var(--beige-rgb), 0.08), transparent 60%),
    var(--bg);
}

.hero-network {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .6;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 60% at 70% 30%, black, transparent);
  opacity: .5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
}

.portrait-ring {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 0deg, rgba(var(--palm-rgb), 0.9), transparent 40%, rgba(var(--palm-rgb), 0.9) 100%);
  animation: rotate-ring 8s linear infinite;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 60px rgba(var(--palm-rgb), 0.35);
}

@keyframes rotate-ring {
  to {
    transform: rotate(360deg);
  }
}

.portrait-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-elevated);
  overflow: hidden;
  animation: float-y 6s ease-in-out infinite;
}

.portrait-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  animation: counter-rotate 8s linear infinite;
}

@keyframes counter-rotate {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}


.portrait-badge {
  position: absolute;
  bottom: 8px;
  right: -10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.portrait-badge i {
  color: var(--palm);
}

.hero-illustration {
  position: absolute;
  top: -30px;
  left: -30px;
  z-index: 1;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--palm);
  opacity: .55;
  animation: float-y 7s ease-in-out infinite reverse;
}

.hero-illustration i {
  --magnet-x: 0px;
  --magnet-y: 0px;
  animation: magnet-drift 0.1s linear forwards;
}

@keyframes magnet-drift {
  to {
    transform: translate(var(--magnet-x), var(--magnet-y));
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--palm);
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 40px;
}

.hero-meta>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-meta strong {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--palm);
}

.hero-meta span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: var(--text-muted);
  animation: float-y 2.4s ease-in-out infinite;
}

/* ==========================================================================
   ABOUT — overlapping card duo
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}

.about-visual {
  position: relative;
  height: 420px;
}

.about-card-back {
  position: absolute;
  inset: 30px 0 0 30px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-illustration {
  position: absolute;
  inset: 0 30px 30px 0;
  background: linear-gradient(160deg, rgba(var(--palm-rgb), 0.16), transparent 70%), var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.about-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  mix-blend-mode: luminosity;
  opacity: 0.88;
}

[data-theme="light"] .about-illustration img {
  mix-blend-mode: normal;
  opacity: 1;
  filter: none;
}

.about-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(18, 17, 19, 0.55) 100%);
  pointer-events: none;
}

[data-theme="light"] .about-illustration::after {
  display: none;
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-highlights {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}

.highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.highlight-chip i {
  color: var(--palm);
}

/* ==========================================================================
   SKILLS — masonry columns
   ========================================================================== */
.skills-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.skill-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.skill-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--palm-rgb), .4);
  box-shadow: var(--shadow-soft);
}

.skill-card.tall {
  padding-bottom: 40px;
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.skill-card-head i {
  font-size: 1.4rem;
  color: var(--palm);
}

.skill-card-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   EXPERIENCE — timeline
   ========================================================================== */
.timeline {
  position: relative;
  padding-inline-end: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 9px;
  width: 1px;
  background: linear-gradient(var(--palm), transparent 95%);
  opacity: .5;
}

.timeline-item {
  position: relative;
  padding-inline-end: 44px;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  top: 6px;
  right: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--palm);
}

.timeline-node::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--palm);
}

.timeline-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}

.timeline-card:hover {
  transform: translateX(-6px);
  border-color: rgba(var(--palm-rgb), .35);
}

.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--palm);
  margin-bottom: 8px;
  letter-spacing: .04em;
}

.timeline-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.timeline-org {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline-card p:last-child {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ==========================================================================
   SERVICES — staggered bento
   ========================================================================== */
.services-bento {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--palm-rgb), .4);
  box-shadow: var(--shadow-glow);
}

.service-card i {
  font-size: 1.8rem;
  color: var(--palm);
  margin-bottom: 18px;
  display: block;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.card-1 {
  grid-column: span 2;
}

.card-2 {
  grid-column: span 3;
  margin-top: 36px;
}

.card-3 {
  grid-column: span 2;
  margin-top: -18px;
}

.card-4 {
  grid-column: span 2;
  margin-top: 18px;
}

.card-5 {
  grid-column: span 1;
}

/* ==========================================================================
   TECH STACK — interactive grid
   ========================================================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.stack-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}

.stack-tile i {
  font-size: 1.6rem;
  color: var(--text-muted);
  transition: color .3s var(--ease);
}

.stack-tile span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stack-tile:hover {
  transform: translateY(-6px) rotate(-2deg);
  border-color: var(--palm);
  background: var(--accent-soft);
}

.stack-tile:hover i {
  color: var(--palm);
}

/* ==========================================================================
   STATISTICS — asymmetric
   ========================================================================== */
.stats-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.stat-hero {
  background: linear-gradient(160deg, rgba(var(--palm-rgb), 0.16), transparent 70%), var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  position: relative;
}

.stat-hero .stat-number {
  font-size: clamp(3.5rem, 8vw, 6rem);
}

.stat-hero p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 260px;
}

.stat-side {
  display: grid;
  gap: 20px;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--palm);
}

.stat-plus {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--palm);
}

.stat-card p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
}

.faq-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

.acc-item {
  border-bottom: 1px solid var(--border);
}

.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  color: var(--text);
  text-align: right;
  padding: 22px 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.acc-trigger i {
  color: var(--palm);
  transition: transform .35s var(--ease);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.acc-trigger[aria-expanded="true"] i {
  transform: rotate(135deg);
}

.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), padding .4s var(--ease);
  padding: 0 4px;
}

.acc-panel p {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-bottom: 20px;
  margin: 0;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--palm);
  background: var(--glass-strong);
  outline: none;
}

.form-status {
  font-size: 0.85rem;
  color: var(--palm);
  min-height: 20px;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  transition: background .3s var(--ease);
}

.contact-row:hover {
  background: var(--glass-strong);
}

.contact-row i {
  font-size: 1.2rem;
  color: var(--palm);
  width: 24px;
  text-align: center;
}

.map-placeholder {
  height: 200px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
}

.map-placeholder i {
  font-size: 1.8rem;
  color: var(--palm);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: 80px 0 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-brand .brand-logo {
  height: clamp(48px, 7vw, 80px);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 14px 0 20px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}

.footer-social a:hover {
  border-color: var(--palm);
  color: var(--palm);
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color .3s var(--ease);
}

.footer-col a:hover {
  color: var(--palm);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
}

.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 400;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--palm);
  color: var(--onyx);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .services-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-1,
  .card-2,
  .card-3,
  .card-4 {
    grid-column: span 2;
    margin-top: 0;
  }

  .card-5 {
    grid-column: span 2;
  }

  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  section {
    padding: 90px 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    order: 2;
  }

  .hero-portrait {
    order: 1;
    margin-bottom: 20px;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .about-grid,
  .contact-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    height: 320px;
    margin-bottom: 10px;
  }

  .skills-masonry {
    grid-template-columns: 1fr 1fr;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    inset-inline: 0;
    top: 0;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 490;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
    z-index: 495;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .skills-masonry {
    grid-template-columns: 1fr;
  }

  .services-bento {
    grid-template-columns: 1fr;
  }

  .card-1,
  .card-2,
  .card-3,
  .card-4,
  .card-5 {
    grid-column: span 1;
    margin-top: 0;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .footer-social {
    justify-content: center;
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  .portrait-ring {
    width: 200px;
    height: 200px;
  }

  .hero-illustration {
    width: 100px;
    height: 100px;
    font-size: 2.2rem;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.88rem;
  }
}