/* Design tokens (keep accent #00b058 across the site) */
:root {
  --color-accent: #00b058;
  --color-accent-deep: #00875e;
  --color-surface: #f8faf8;
  --color-surface-tint: #f0f7f2;
  --shadow-nav: 0 10px 40px -8px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  --shadow-float: 0 24px 48px -16px rgba(15, 23, 42, 0.12);
}

/* Global Styles */
html {
  font-size: 118%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 120%;
  }
}

/* Better focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Smooth page transitions */
::selection {
  background: rgba(0, 176, 88, 0.15);
  color: #1e293b;
}

body {
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(0, 176, 88, 0.06), transparent 55%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(248, 250, 248, 0.98)),
    radial-gradient(circle at 0 0, #f4f6f4 0, #ffffff 62%);
  background-attachment: fixed;
  background-color: var(--color-surface);
}

/* Grid Background Pattern */
.grid-bg {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Navigation Styles */
.nav-pill {
  min-height: 48px;
  padding: 0.45rem 1rem 0.45rem 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 12px 40px -20px rgba(15, 23, 42, 0.14),
    0 0 28px -22px rgba(0, 176, 88, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.nav-pill::after {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 0 22px -16px rgba(0, 176, 88, 0.75);
  opacity: 0.9;
}

.nav-brand,
.nav-links,
.nav-toggle-btn {
  position: relative;
  z-index: 1;
}

.nav-brand {
  letter-spacing: 0.22em;
}

.nav-links,
#nav-menu > nav {
  position: relative;
  gap: 0.15rem;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--nav-indicator-w, 0);
  height: var(--nav-indicator-h, 0);
  border-radius: 9999px;
  background: #ffffff;
  box-shadow:
    0 6px 16px -10px rgba(15, 23, 42, 0.18),
    0 0 20px -6px rgba(0, 176, 88, 0.58),
    0 0 0 1px rgba(0, 176, 88, 0.24);
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--nav-indicator-x, 0), var(--nav-indicator-y, 0)) scale(0.94);
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.nav-indicator.is-visible {
  opacity: 1;
  transform: translate(var(--nav-indicator-x, 0), var(--nav-indicator-y, 0)) scale(1);
}

.nav-link,
.nav-menu-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  background: transparent;
  transition: color 0.28s ease;
}

.nav-link {
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
}

.nav-menu-link {
  padding: 0.55rem 0.85rem;
}

.nav-link:hover,
.nav-menu-link:hover {
  color: #334155;
}

.nav-link.nav-active,
.nav-menu-link.nav-active {
  color: #0f172a;
  font-weight: 700;
}

.nav-toggle-btn {
  min-height: 2rem;
  min-width: 2rem;
  padding: 0.35rem;
  color: #475569;
}

.nav-toggle-btn:hover {
  color: #0f172a;
}

.nav-menu-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 14px 40px -16px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.hamburger-line {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #475569;
  border-radius: 9999px;
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.nav-open .hamburger-line:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.nav-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-open .hamburger-line:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
}

#nav-menu {
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Section Colors - aligned with accent color */
.section-light {
  background-color: var(--color-surface-tint);
}

/* About page hero — mint tint fading into white */
.about-page .about-hero {
  position: relative;
  background:
    radial-gradient(900px 480px at 18% -8%, rgba(0, 176, 88, 0.1), transparent 58%),
    radial-gradient(700px 360px at 92% 12%, rgba(0, 176, 88, 0.05), transparent 52%),
    linear-gradient(
      180deg,
      var(--color-surface-tint) 0%,
      #f2f8f4 42%,
      #f8fbf9 72%,
      #ffffff 100%
    );
}

.section-dark {
  background-color: var(--color-accent-deep);
}

/* Utility for active nav items */
.nav-active {
  font-weight: 700;
}

/* ── Chip Tags (used for skills, project categories, badges) ── */
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid transparent;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  white-space: nowrap;
}
.chip-tag-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

/* Keep project thumbnail tags neutral/readable */
.chip-tag-sm.chip-tag-green,
.chip-tag-sm.chip-tag-blue,
.chip-tag-sm.chip-tag-amber,
.chip-tag-sm.chip-tag-rose,
.chip-tag-sm.chip-tag-violet,
.chip-tag-sm.chip-tag-pink {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.project-card:hover .chip-tag-sm {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}
.chip-tag-green {
  background: rgba(0, 176, 88, 0.1);
  color: var(--color-accent-deep);
  border-color: rgba(0, 176, 88, 0.14);
}
.chip-tag-blue {
  background: rgba(59, 130, 246, 0.09);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.14);
}
.chip-tag-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.16);
}
.chip-tag-rose {
  background: rgba(244, 63, 94, 0.09);
  color: #e11d48;
  border-color: rgba(244, 63, 94, 0.14);
}
.chip-tag-violet {
  background: rgba(139, 92, 246, 0.09);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.14);
}
.chip-tag-pink {
  background: rgba(236, 72, 153, 0.09);
  color: #db2777;
  border-color: rgba(236, 72, 153, 0.14);
}

/* ── Project Card Polish ── */
/* Portfolio cards: calmer hover + clear keyboard focus */
.project-card {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
}

.project-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(0, 176, 88, 0.45),
    0 20px 40px -10px rgba(15, 23, 42, 0.08);
}

/* Keep thumbnail corner clipping stable during hover scale */
.project-card > .aspect-\[4\/3\] {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.project-card > .aspect-\[4\/3\] > img {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  backface-visibility: hidden;
}

/* ── Project Page Polish ── */

/* Image placeholder shimmer while loading */
img[loading="lazy"] {
  background: linear-gradient(110deg, #f1f5f9 8%, #e2e8f0 18%, #f1f5f9 33%);
  background-size: 200% 100%;
}

/* Smooth image reveal on load */
img {
  transition: opacity 0.4s ease;
}

/* Footer link hover underline */
footer nav a {
  position: relative;
}

footer nav a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

footer nav a:hover::after {
  width: 100%;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-to-content:focus-visible {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
  text-decoration: none;
}

/* Image compare (before/after slider) — used on project case studies */
.image-compare {
  position: relative;
  width: 100%;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: #fff;
}

.image-compare__base {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.image-compare__clip {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;
  width: 50%;
  pointer-events: none;
  background: #fff;
}

.image-compare__top {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.image-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2.75rem;
  transform: translateX(-50%);
  cursor: ew-resize;
  touch-action: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-compare__handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2), 0 2px 12px rgba(15, 23, 42, 0.25);
  border-radius: 2px;
}

.image-compare__handle-knob {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.image-compare__handle-knob svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ── Section Anchor Nav ── */
.section-anchor-nav {
  transition: box-shadow 0.3s ease;
}

.anchor-pill {
  position: relative;
  border: 1px solid transparent;
}

.anchor-pill.active {
  color: #0f172a;
  background-color: #ecfdf5;
  border: 1px solid rgba(0, 176, 88, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* ── Testimonial Section ── */
blockquote::before {
  content: none;
}

.testimonial-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 360px at 18% 0%, rgba(0, 176, 88, 0.08), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.82) 52%, #ffffff 100%);
}

.testimonial-section::before,
.testimonial-section::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 9999px;
  filter: blur(24px);
}

.testimonial-section::before {
  top: 4rem;
  right: max(1rem, calc((100vw - 72rem) / 2));
  width: 12rem;
  height: 12rem;
  background: rgba(0, 176, 88, 0.08);
}

.testimonial-section::after {
  bottom: 3rem;
  left: max(1rem, calc((100vw - 72rem) / 2));
  width: 9rem;
  height: 9rem;
  background: rgba(15, 23, 42, 0.05);
}

.testimonial-panel {
  position: relative;
  overflow: hidden;
  border-radius: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 242, 0.74)),
    #ffffff;
  box-shadow:
    0 34px 80px -40px rgba(15, 23, 42, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.testimonial-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 176, 88, 0.18), transparent 28%, transparent 72%, rgba(0, 176, 88, 0.1)) top / 100% 1px no-repeat,
    radial-gradient(520px 240px at 84% 12%, rgba(0, 176, 88, 0.09), transparent 62%);
}

.testimonial-grid {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.testimonial-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    #ffffff;
  box-shadow:
    0 24px 56px -34px rgba(15, 23, 42, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  padding: clamp(1.5rem, 3vw, 2rem);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(320px 180px at 100% 0%, rgba(0, 176, 88, 0.045), transparent 64%);
}

.testimonial-card:hover {
  transform: translateY(-0.35rem);
  border-color: rgba(0, 176, 88, 0.18);
  box-shadow:
    0 34px 70px -34px rgba(15, 23, 42, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.testimonial-card-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.testimonial-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(0, 176, 88, 0.12),
    0 12px 26px -16px rgba(15, 23, 42, 0.45);
}

.testimonial-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  flex: 0 0 auto;
  border-radius: 9999px;
  border: 1px solid rgba(0, 176, 88, 0.12);
  background: rgba(0, 176, 88, 0.07);
  color: var(--color-accent);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.5rem 0.62rem;
}

@media (max-width: 480px) {
  .testimonial-card-footer {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
}

/* ── Premium Services Section ── */
.services-premium-section {
  background:
    radial-gradient(720px 360px at 88% 8%, rgba(0, 176, 88, 0.055), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f8fafc 100%);
}

.service-image-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 24px 58px -34px rgba(15, 23, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.36s ease;
}

.service-image-card:hover {
  transform: translateY(-0.35rem);
  border-color: rgba(0, 176, 88, 0.18);
  box-shadow:
    0 34px 70px -34px rgba(15, 23, 42, 0.4),
    0 0 30px -24px rgba(0, 176, 88, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.service-image-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

.service-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.24)),
    radial-gradient(340px 180px at 12% 10%, rgba(255, 255, 255, 0.28), transparent 60%);
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-image-card:hover .service-image {
  transform: scale(1.045);
}

.service-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.35rem, 3vw, 1.8rem);
}

.service-kicker {
  margin-bottom: 0.75rem;
  color: var(--color-accent-deep);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.service-card-body h3 {
  margin-bottom: 0.7rem;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.24;
}

.service-card-body p:not(.service-kicker) {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.7;
}

.service-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.service-skill-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.48rem 0.7rem;
}

/* ── Premium Experience Section ── */
.experience-premium-section {
  background:
    radial-gradient(640px 320px at 12% 6%, rgba(0, 176, 88, 0.045), transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 48%, #ffffff 100%);
}

.experience-timeline {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.35rem);
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0.56rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.35) 18%, rgba(148, 163, 184, 0.35) 82%, rgba(148, 163, 184, 0.08));
  pointer-events: none;
}

.experience-timeline-row {
  display: flex;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1rem);
}

.experience-marker {
  position: relative;
  flex: 0 0 1.15rem;
  align-self: center;
  z-index: 1;
}

.experience-marker::before {
  content: '';
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  margin-inline: auto;
  border-radius: 9999px;
  border: 2px solid #fff;
  background: #cbd5e1;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.experience-timeline-row--current .experience-marker::before {
  background: var(--color-accent);
  box-shadow:
    0 0 0 1px rgba(0, 176, 88, 0.35),
    0 0 14px -2px rgba(0, 176, 88, 0.55);
}

.experience-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(0.9rem, 2.2vw, 1.25rem);
  padding: clamp(0.85rem, 2vw, 1rem);
  border-radius: 1.65rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 20px 48px -34px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.36s ease;
}

.experience-card:hover {
  transform: translateY(-0.2rem);
  border-color: rgba(0, 176, 88, 0.16);
  box-shadow:
    0 28px 58px -34px rgba(15, 23, 42, 0.34),
    0 0 24px -22px rgba(0, 176, 88, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.experience-media {
  position: relative;
  flex: 0 0 clamp(11rem, 38%, 17.5rem);
  width: clamp(11rem, 38%, 17.5rem);
  max-width: 17.5rem;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.15rem;
  background: #e2e8f0;
  align-self: stretch;
}

.experience-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.18)),
    radial-gradient(220px 120px at 10% 8%, rgba(255, 255, 255, 0.24), transparent 62%);
}

.experience-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.experience-card:hover .experience-image {
  transform: scale(1.05);
}

.experience-content {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.2rem 0.35rem 0.2rem 0;
}

.experience-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.35rem;
}

.experience-org {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.experience-role {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.experience-status {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(0, 176, 88, 0.22);
  background: rgba(0, 176, 88, 0.08);
  color: var(--color-accent-deep);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0.42rem 0.62rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.experience-meta {
  margin-bottom: 0.55rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.experience-copy {
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.68;
}

.experience-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.experience-tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: #475569;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.44rem 0.66rem;
}

@media (max-width: 767px) {
  .experience-timeline::before,
  .experience-marker {
    display: none;
  }

  .experience-timeline-row {
    display: block;
  }

  .experience-card {
    flex-direction: column;
    padding: 0.85rem;
  }

  .experience-media {
    flex: none;
    width: 100%;
    max-width: none;
    min-height: 12rem;
    aspect-ratio: 16 / 9;
  }

  .experience-image {
    min-height: 10.5rem;
  }

  .experience-content {
    padding: 0.15rem 0.1rem 0;
  }
}

@media (min-width: 768px) {
  .experience-media {
    aspect-ratio: 3 / 2;
    min-height: 0;
  }
}

/* ── About page mobile polish ── */
@media (max-width: 767px) {
  .about-page #main-nav {
    top: 1rem;
    left: 0.85rem;
    right: 0.85rem;
  }

  .about-page #about,
  .about-page #experience,
  .about-page .testimonial-section,
  .about-page #services {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .about-page .about-hero {
    padding-top: 6.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .about-page #about .reveal.max-w-2xl {
    margin-bottom: 2rem;
  }

  .about-page #about .reveal.max-w-2xl h2 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .about-page #about .reveal-stagger {
    gap: 0.85rem;
  }

  .about-page #about .about-pillar-card {
    padding: 1.35rem 1.25rem;
    border-radius: 1.35rem;
  }

  .about-page #experience .reveal.max-w-2xl {
    margin-bottom: 2rem;
  }

  .about-page #experience .reveal.max-w-2xl h2 {
    font-size: 1.75rem;
  }

  .about-page .experience-timeline {
    max-width: none;
    gap: 0.85rem;
  }

  .about-page .experience-card {
    border-radius: 1.35rem;
    padding: 0.9rem;
  }

  .about-page .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .about-page .experience-status {
    align-self: flex-start;
  }

  .about-page .experience-org {
    font-size: 1.05rem;
  }

  .about-page .experience-meta {
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .about-page .experience-media {
    min-height: 10.5rem;
    aspect-ratio: 16 / 10;
    border-radius: 1rem;
  }

  .about-page .experience-image {
    min-height: 10.5rem;
  }

  .about-page .testimonial-section .mb-10 {
    margin-bottom: 1.5rem;
  }

  .about-page .testimonial-section h2 {
    font-size: 1.75rem;
  }

  .about-page .testimonial-panel {
    border-radius: 1.5rem;
    padding: 1.15rem;
  }

  .about-page .testimonial-card {
    border-radius: 1.35rem;
    padding: 1.15rem;
  }

  .about-page .testimonial-card blockquote {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
  }

  .about-page .testimonial-card-footer {
    padding-top: 1rem;
  }

  .about-page #services h2 {
    font-size: 1.75rem;
  }

  .about-page .service-image-card {
    border-radius: 1.35rem;
  }

  .about-page .service-card-body {
    padding: 1.2rem 1.15rem 1.35rem;
  }

  .about-page .service-card-body h3 {
    font-size: 1rem;
  }

  .about-page .about-footer {
    margin-top: 2.5rem !important;
    padding-top: 3rem !important;
  }

  .about-page .about-footer .text-3xl {
    font-size: 1.65rem;
  }
}

@media (max-width: 380px) {
  .about-page .about-hero h1 {
    font-size: 1.85rem;
  }

  .about-page .experience-tag-list span {
    font-size: 0.62rem;
    padding: 0.38rem 0.55rem;
  }
}

/* Shared form control polish (contact + any native fields) */
input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  border-radius: 0.75rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .nav-menu-link,
  .nav-toggle-btn,
  .hamburger-line,
  .nav-indicator {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .project-card,
  .project-card img,
  .chip-tag {
    transition: none !important;
  }
  .project-card:hover,
  .project-card:focus-visible {
    transform: none !important;
  }
  .testimonial-card {
    transition: none !important;
  }
  .testimonial-card:hover {
    transform: none !important;
  }
  .service-image-card,
  .service-image {
    transition: none !important;
  }
  .service-image-card:hover,
  .service-image-card:hover .service-image {
    transform: none !important;
  }
  .experience-card,
  .experience-image {
    transition: none !important;
  }
  .experience-card:hover,
  .experience-card:hover .experience-image {
    transform: none !important;
  }
  #nav-menu {
    transition: none !important;
  }
  img {
    transition: none !important;
  }
}
