/* ==========================================================================
   iamsathish.dev — Multi-page Premium Portfolio
   Design tokens + shared components (neumorphic dark theme)
   ========================================================================== */

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

  /* Colors — Sawad-inspired warm dark + orange/lime */
  --bg: #151312;
  --bg-elevated: #1c1917;
  --bg-soft: #181513;
  --surface: #1f1c1a;
  --surface-2: #262220;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #ffffff;
  --text-muted: #99908f;
  --text-subtle: #6a6b6e;

  --accent: #f46c38;
  --accent-strong: #ff8a5c;
  --accent-soft: rgba(244, 108, 56, 0.16);
  --accent-secondary: #c5ff41;
  --lime: #c5ff41;
  --lime-strong: #d4ff6a;
  --lime-soft: rgba(197, 255, 65, 0.16);
  --lime-glow: 0 0 48px rgba(197, 255, 65, 0.22);
  --accent-on-primary: #151312;
  --accent-on-lime: #151312;

  --status-building: #f46c38;
  --status-opensource: #c5ff41;
  --status-archived: #6a6b6e;
  --danger: #ff5c5c;
  --success: #c5ff41;

  --nav-surface: #1e1b19;
  --nav-highlight: rgba(255, 255, 255, 0.035);
  --nav-inset: rgba(0, 0, 0, 0.22);
  --nav-border: rgba(255, 255, 255, 0.06);
  --header-fade: rgba(21, 19, 18, 0.88);
  --header-fade-mid: rgba(21, 19, 18, 0.45);
  --overlay: rgba(10, 9, 8, 0.4);
  --orb-accent: rgba(244, 108, 56, 0.16);
  --orb-lime: rgba(197, 255, 65, 0.18);
  --grid-lime: rgba(197, 255, 65, 0.07);
  --grid-line: rgba(255, 255, 255, 0.035);
  --title-stroke: rgba(197, 255, 65, 0.45);
  --brand-gradient: linear-gradient(125deg, var(--accent-strong) 0%, var(--lime) 55%, var(--lime-strong) 100%);
  --cover-plugins: linear-gradient(135deg, #3a2218, #1f1c1a);
  --cover-architecture: linear-gradient(135deg, #2a2a18, #1f1c1a);
  --cover-android: linear-gradient(135deg, #1a2a22, #1f1c1a);
  --cover-ai: linear-gradient(135deg, #2a1a2a, #1f1c1a);

  --shadow-neo:
    10px 10px 28px rgba(0, 0, 0, 0.55),
    -6px -6px 18px rgba(255, 255, 255, 0.045);
  --shadow-neo-sm:
    5px 5px 14px rgba(0, 0, 0, 0.5),
    -3px -3px 10px rgba(255, 255, 255, 0.04);
  --shadow-neo-inset:
    inset 4px 4px 10px rgba(0, 0, 0, 0.55),
    inset -3px -3px 8px rgba(255, 255, 255, 0.035);
  --shadow-neo-inset-soft:
    inset 2px 2px 6px rgba(0, 0, 0, 0.4),
    inset -1px -1px 4px rgba(255, 255, 255, 0.03);
  --shadow-raised:
    8px 8px 24px rgba(0, 0, 0, 0.45),
    -4px -4px 14px rgba(255, 255, 255, 0.03);
  --shadow-raised-sm:
    4px 4px 14px rgba(0, 0, 0, 0.4),
    -2px -2px 8px rgba(255, 255, 255, 0.03);
  --shadow-inset:
    inset 5px 5px 12px rgba(0, 0, 0, 0.45),
    inset -3px -3px 8px rgba(255, 255, 255, 0.02);
  --shadow-nav: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(244, 108, 56, 0.18);
  --shadow-glow-lime: 0 0 44px rgba(197, 255, 65, 0.2);
  --shadow-neo-edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --shadow-neo-edge-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

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

  --bg: #efece8;
  --bg-elevated: #f7f5f2;
  --bg-soft: #e7e3de;
  --surface: #f8f6f3;
  --surface-2: #ffffff;
  --border: rgba(28, 24, 22, 0.1);
  --border-strong: rgba(28, 24, 22, 0.16);

  --text: #1c1816;
  --text-muted: #6b645f;
  --text-subtle: #8a827c;

  --accent: #e85a28;
  --accent-strong: #f46c38;
  --accent-soft: rgba(232, 90, 40, 0.12);
  --accent-secondary: #7cb518;
  --lime: #7cb518;
  --lime-strong: #8fd01f;
  --lime-soft: rgba(124, 181, 24, 0.14);
  --lime-glow: 0 0 40px rgba(124, 181, 24, 0.2);
  --accent-on-primary: #ffffff;
  --accent-on-lime: #1c1816;

  --status-building: #e85a28;
  --status-opensource: #7cb518;
  --status-archived: #8a827c;
  --danger: #e04545;
  --success: #7cb518;

  --nav-surface: #ffffff;
  --nav-highlight: rgba(255, 255, 255, 0.95);
  --nav-inset: rgba(163, 152, 140, 0.16);
  --nav-border: rgba(28, 24, 22, 0.1);
  --header-fade: rgba(239, 236, 232, 0.92);
  --header-fade-mid: rgba(239, 236, 232, 0.5);
  --overlay: rgba(28, 24, 22, 0.22);
  --orb-accent: rgba(244, 108, 56, 0.14);
  --orb-lime: rgba(124, 181, 24, 0.16);
  --grid-lime: rgba(124, 181, 24, 0.12);
  --grid-line: rgba(28, 24, 22, 0.05);
  --title-stroke: rgba(124, 181, 24, 0.55);
  --brand-gradient: linear-gradient(125deg, var(--accent) 0%, var(--lime) 55%, var(--lime-strong) 100%);
  --cover-plugins: linear-gradient(135deg, #f3d5c4, #efece8);
  --cover-architecture: linear-gradient(135deg, #e4efc4, #efece8);
  --cover-android: linear-gradient(135deg, #d4ebe0, #efece8);
  --cover-ai: linear-gradient(135deg, #e8d8ef, #efece8);

  --shadow-neo:
    10px 10px 24px rgba(163, 152, 140, 0.4),
    -8px -8px 20px rgba(255, 255, 255, 0.9);
  --shadow-neo-sm:
    5px 5px 12px rgba(163, 152, 140, 0.35),
    -4px -4px 10px rgba(255, 255, 255, 0.85);
  --shadow-neo-inset:
    inset 4px 4px 10px rgba(163, 152, 140, 0.35),
    inset -3px -3px 8px rgba(255, 255, 255, 0.85);
  --shadow-neo-inset-soft:
    inset 2px 2px 6px rgba(163, 152, 140, 0.28),
    inset -1px -1px 4px rgba(255, 255, 255, 0.8);
  --shadow-raised:
    8px 8px 20px rgba(163, 152, 140, 0.35),
    -5px -5px 14px rgba(255, 255, 255, 0.85);
  --shadow-raised-sm:
    4px 4px 12px rgba(163, 152, 140, 0.3),
    -3px -3px 8px rgba(255, 255, 255, 0.8);
  --shadow-inset:
    inset 5px 5px 12px rgba(163, 152, 140, 0.3),
    inset -3px -3px 8px rgba(255, 255, 255, 0.75);
  --shadow-nav: 0 10px 30px rgba(163, 152, 140, 0.35);
  --shadow-glow: 0 0 36px rgba(244, 108, 56, 0.16);
  --shadow-glow-lime: 0 0 36px rgba(124, 181, 24, 0.18);
  --shadow-neo-edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --shadow-neo-edge-bottom: inset 0 -1px 0 rgba(163, 152, 140, 0.25);
}

:root {
  /* Typography — Poppins (Sawad headings) + Satoshi (body) */
  --font-display: "Poppins", sans-serif;
  --font-body: "Satoshi", "Poppins", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.2rem;
  --fs-xl: clamp(1.75rem, 4vw, 2.5rem);
  --fs-2xl: clamp(2.4rem, 6vw, 3.75rem);
  --fs-3xl: clamp(2.75rem, 7vw, 4.5rem);
  --lh: 1.65;
  --lh-tight: 1.05;

  /* Spacing (8px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  /* Layout — larger radii like Sawad bento cards */
  --container: 1120px;
  --header-h: 5.25rem;
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  /* Breakpoints (reference — used in media queries)
     sm: < 640px   small phones
     md: 640–1023px  large phones / tablets (mobile nav)
     lg: ≥ 1024px  desktop */
  --bp-sm: 640px;
  --bp-lg: 1024px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.4s;
  --duration-fast: 0.2s;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  opacity: 0;
  animation: page-enter 0.55s var(--ease) forwards;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
}

body::before {
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  top: -12%;
  left: -8%;
  background: var(--orb-accent);
  animation: orb-float 18s ease-in-out infinite;
}

body::after {
  width: min(480px, 75vw);
  height: min(480px, 75vw);
  bottom: 5%;
  right: -10%;
  background: var(--orb-lime);
  animation: orb-float 22s ease-in-out infinite reverse;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: transparent;
  background-image:
    linear-gradient(var(--grid-lime) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-lime) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size:
    56px 56px,
    56px 56px,
    14px 14px,
    14px 14px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 20%, #000 15%, rgba(0, 0, 0, 0.55) 55%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 20%, #000 15%, rgba(0, 0, 0, 0.55) 55%, transparent 82%);
  pointer-events: none;
  opacity: 1;
}

@keyframes page-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(4%, 6%);
  }
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--accent-strong);
}

ul,
ol {
  list-style: none;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-3);
  z-index: 1000;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--accent-on-primary);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-3);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Header / Nav — iOS neumorphism
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0.65rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--header-fade) 0%,
    var(--header-fade-mid) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: fit-content;
  max-width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  gap: var(--space-2);
  min-height: 3.65rem;
  padding: 0.4rem 0.45rem;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(145deg, var(--nav-highlight), transparent 42%),
    var(--nav-surface);
  box-shadow:
    var(--shadow-neo),
    var(--shadow-neo-edge-top),
    var(--shadow-neo-edge-bottom);
  border: 1px solid var(--nav-border);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: var(--shadow-neo-sm), var(--shadow-neo-edge-top);
  border: 1px solid var(--nav-border);
  color: var(--text);
  transition:
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.theme-toggle:hover {
  color: var(--lime);
}

.theme-toggle:active {
  box-shadow: var(--shadow-neo-inset);
  transform: scale(0.96);
}

.theme-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun,
:root:not([data-theme]) .theme-toggle__icon--sun {
  display: block;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0.6rem;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: var(--shadow-neo-sm), var(--shadow-neo-edge-top);
  border: 1px solid var(--nav-border);
  z-index: 110;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.nav__toggle:active,
.nav__toggle[aria-expanded="true"] {
  box-shadow: var(--shadow-neo-inset);
  transform: scale(0.96);
}

.nav__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar {
  background: var(--lime);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  margin-right: 0.1rem;
  border-radius: var(--radius-pill);
  background: var(--nav-inset);
  box-shadow: var(--shadow-neo-inset-soft);
}

.nav__link {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.nav__link:hover {
  color: var(--text);
  background: var(--lime-soft);
  box-shadow: var(--shadow-neo-sm);
}

.nav__link.is-active,
.nav__link[aria-current="page"] {
  color: var(--accent-on-lime);
  background: linear-gradient(160deg, var(--lime-strong), var(--lime));
  box-shadow: var(--shadow-glow-lime), var(--shadow-neo-edge-top);
  border-color: var(--nav-border);
}

.nav__link:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-neo-inset);
}

@media (max-width: 1023px) {
  .site-header {
    height: calc(4.75rem + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav {
    padding: 0.35rem 0.4rem 0.35rem 0.7rem;
    min-height: 3.4rem;
  }

  .nav__menu {
    display: none;
    position: fixed;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding:
      1.35rem 0.85rem
      calc(0.85rem + env(safe-area-inset-bottom, 0px));
    margin: 0;
    border-radius: 28px 28px 0 0;
    /* Opaque elevated surface — backdrop is a separate .nav__backdrop node */
    background-color: var(--bg-elevated);
    background-image: linear-gradient(
      180deg,
      var(--nav-highlight) 0%,
      transparent 28%
    );
    box-shadow:
      var(--shadow-raised),
      var(--shadow-neo-edge-top);
    border: 1px solid var(--nav-border);
    border-bottom: none;
    color: var(--text);
    transform: translate3d(0, 100%, 0);
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.34s var(--ease),
      visibility 0.34s;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: min(82dvh, 32rem);
    -webkit-overflow-scrolling: touch;
    z-index: 250;
  }

  .nav__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 240;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--overlay);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav__backdrop.is-open {
    display: block;
  }

  .nav__menu::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 50%;
    width: 2.75rem;
    height: 0.28rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 45%, transparent);
    transform: translateX(-50%);
    pointer-events: none;
  }

  .nav__menu.is-open {
    display: flex;
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav__link {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: 18px;
    min-height: 2.75rem;
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }
}

@media (min-width: 1024px) {
  .nav__toggle {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Buttons & icons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    transform var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #e85a28);
  color: var(--accent-on-primary);
  box-shadow: var(--shadow-raised-sm), var(--shadow-glow);
}

.btn--primary:hover {
  color: var(--accent-on-primary);
  filter: brightness(1.06);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: color-mix(in srgb, var(--lime) 40%, transparent);
  box-shadow: var(--shadow-raised-sm);
}

.btn--secondary:hover {
  color: var(--accent-on-lime);
  border-color: var(--lime);
  background: var(--lime);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  padding-inline: 0.75rem;
}

.btn--ghost:hover {
  color: var(--accent-strong);
}

.btn--small {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn--large {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-raised-sm);
  border: 1px solid var(--border);
  transition:
    color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.icon-link:hover {
  color: var(--accent);
  border-color: rgba(244, 108, 56, 0.4);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Sections & typography
   -------------------------------------------------------------------------- */

.section {
  padding: var(--space-8) 0;
  position: relative;
}

.section--tight {
  padding: var(--space-7) 0;
}

.page-hero {
  padding: var(--space-8) 0 var(--space-6);
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
}

.section__lead {
  color: var(--text-muted);
  max-width: 38rem;
  font-size: 1.05rem;
}

.section__header {
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   Neumorphic cards & badges
   -------------------------------------------------------------------------- */

.neu-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised);
  padding: var(--space-5);
  transition:
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.neu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 108, 56, 0.28);
}

.neu-card--inset {
  box-shadow: var(--shadow-inset);
}

.neu-card--featured {
  border-color: rgba(244, 108, 56, 0.35);
  box-shadow: var(--shadow-raised), var(--shadow-glow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge--building {
  color: var(--status-building);
  background: rgba(244, 108, 56, 0.14);
}

.badge--opensource {
  color: var(--accent-on-lime);
  background: var(--accent-secondary);
}

.badge--archived {
  color: var(--status-archived);
  background: rgba(148, 163, 184, 0.14);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.28rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 6px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-raised-sm);
  cursor: default;
  transition:
    transform var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease);
}

.skill-tag:hover,
.skill-tag:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(244, 108, 56, 0.4);
  background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Home — Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
  padding: var(--space-8) 0 var(--space-7);
  min-height: calc(100vh - var(--header-h) - 2rem);
}

.hero--home {
  padding-top: clamp(2rem, 5vh, 3.5rem);
  padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-6);
  }

  .hero--home {
    gap: var(--space-7);
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: var(--space-3);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-5);
  text-wrap: balance;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
}

.hero__title-fill {
  color: var(--text);
}

.hero__title-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--title-stroke);
}

@supports not (-webkit-text-stroke: 1px black) {
  .hero__title-outline {
    color: var(--lime);
    opacity: 0.85;
  }
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 34rem;
  margin-bottom: var(--space-5);
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: var(--space-6);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.hero__proof span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__proof span::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(197, 255, 65, 0.6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.hero__social {
  display: flex;
  gap: var(--space-3);
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.home-more-link {
  margin-top: var(--space-5);
}

.home-updates__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .home-updates__grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
  }
}

.home-updates__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.home-updates .linkedin-featured .neu-card {
  height: 100%;
}

.hero-device {
  width: min(240px, 58vw);
  aspect-ratio: 9 / 17.5;
  border-radius: 34px;
  border: 2px solid rgba(197, 255, 65, 0.28);
  background: linear-gradient(165deg, #2a2623 0%, #171412 100%);
  box-shadow:
    var(--shadow-raised),
    var(--shadow-glow-lime),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  padding: 12px 10px 14px;
  z-index: 1;
}

.hero-device__notch {
  width: 36%;
  height: 7px;
  margin: 2px auto 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-device__screen {
  height: calc(100% - 18px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(197, 255, 65, 0.14), transparent 38%),
    linear-gradient(160deg, #1a1715, #12100e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-device__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.hero-device__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(197, 255, 65, 0.8);
}

.hero-device__bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  width: 0;
  transition: width 0.7s var(--ease);
}

.hero-device__bar--accent {
  height: 9px;
  background: linear-gradient(90deg, var(--lime), var(--accent));
}

.hero-device__card {
  flex: 1;
  border-radius: 12px;
  background: rgba(38, 34, 32, 0.95);
  border: 1px solid rgba(197, 255, 65, 0.12);
  box-shadow: var(--shadow-inset);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.hero-device__card::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px 10px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-device__card--lime {
  border-color: rgba(197, 255, 65, 0.35);
  background: linear-gradient(145deg, rgba(197, 255, 65, 0.18), rgba(38, 34, 32, 0.95));
}

.hero-device__card--lime::before {
  content: "Flutter";
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lime);
}

.float-card {
  position: absolute;
  padding: 0.7rem 0.9rem;
  background: rgba(31, 28, 26, 0.94);
  border: 1px solid rgba(197, 255, 65, 0.22);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-raised-sm);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
}

.float-card--one {
  top: 10%;
  left: 0;
  color: var(--lime);
}

.float-card--two {
  top: 18%;
  right: 0;
  color: var(--accent-strong);
  border-color: rgba(244, 108, 56, 0.35);
}

.float-card--three {
  display: none;
}

.hero-accent-card {
  position: absolute;
  bottom: 6%;
  left: 2%;
  max-width: 11.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--accent-on-lime);
  box-shadow: var(--shadow-raised), var(--shadow-glow-lime);
  z-index: 3;
  opacity: 0;
  transform: translateY(12px);
}

.hero-accent-card__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.35rem;
}

.hero-accent-card__text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.hero-visual__glow {
  position: absolute;
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 255, 65, 0.28) 0%, rgba(244, 108, 56, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Home motion — entrance, idle, scroll variants, micro-hover
   -------------------------------------------------------------------------- */

.hero-anim {
  opacity: 0;
  transform: translateY(1.1rem);
}

.hero-anim--visual {
  transform: translate3d(1.5rem, 0.5rem, 0) scale(0.96);
}

@media (max-width: 1023px) {
  .hero-anim--visual {
    transform: translate3d(0, 1.25rem, 0) scale(0.96);
  }
}

.hero-anim__line {
  display: block;
  opacity: 0;
  transform: translateY(0.65rem);
}

.hero--home.is-ready .hero-anim {
  animation: hero-enter 0.7s var(--ease) forwards;
}

.hero--home.is-ready .hero-anim--brand {
  animation-delay: 0.05s;
}

.hero--home.is-ready .hero-anim--eyebrow {
  animation-delay: 0.14s;
}

.hero--home.is-ready .hero-anim--title {
  opacity: 1;
  transform: none;
  animation: none;
}

.hero--home.is-ready .hero-anim__line--fill {
  animation: hero-enter 0.65s var(--ease) 0.22s forwards;
}

.hero--home.is-ready .hero-anim__line--outline {
  animation: hero-enter 0.65s var(--ease) 0.34s forwards;
}

.hero--home.is-ready .hero-anim--subtitle {
  animation-delay: 0.44s;
}

.hero--home.is-ready .hero-anim--proof {
  animation-delay: 0.52s;
}

.hero--home.is-ready .hero-anim--actions {
  animation-delay: 0.6s;
}

.hero--home.is-ready .hero-anim--social {
  animation-delay: 0.68s;
}

.hero--home.is-ready .hero-anim--visual {
  animation: hero-visual-enter 0.85s var(--ease) 0.28s forwards;
}

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-visual-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Idle loops — start after entrance */
.hero--home.is-ready .hero-visual__glow {
  animation: glow-breathe 5.5s ease-in-out 0.9s infinite;
}

.hero--home.is-ready .hero-device {
  animation: device-float 7s ease-in-out 1s infinite;
}

.hero--home.is-ready .hero-device__dot {
  animation: status-pulse 2.2s ease-in-out 1.2s infinite;
}

.hero--home.is-ready .hero-device__bar--accent {
  width: 62%;
  transition-delay: 0.85s;
}

.hero--home.is-ready .hero-device__bar--w78 {
  width: 78%;
  transition-delay: 1s;
}

.hero--home.is-ready .hero-device__bar--w58 {
  width: 58%;
  transition-delay: 1.12s;
}

.hero--home.is-ready .hero-device__card {
  opacity: 1;
  transform: none;
}

.hero--home.is-ready .hero-device__card--lime {
  transition-delay: 1.2s;
}

.hero--home.is-ready .hero-device__card:not(.hero-device__card--lime) {
  transition-delay: 1.32s;
}

.hero--home.is-ready .float-card--one {
  animation: chip-in 0.55s var(--ease) 0.75s forwards, float-card 6s ease-in-out 1.3s infinite;
}

.hero--home.is-ready .float-card--two {
  animation: chip-in 0.55s var(--ease) 0.9s forwards, float-card 6.5s ease-in-out 1.45s infinite;
}

.hero--home.is-ready .hero-accent-card {
  animation: chip-in 0.55s var(--ease) 1.05s forwards, float-card 7s ease-in-out 1.6s infinite;
}

@keyframes chip-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

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

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(197, 255, 65, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 14px rgba(197, 255, 65, 0.95);
    transform: scale(1.15);
  }
}

/* Home CTA / featured card micro-interactions */
.home-cta .btn--primary {
  transition:
    transform var(--duration-fast) var(--ease),
    filter var(--duration-fast) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.home-cta .btn--primary:hover {
  box-shadow: var(--shadow-raised-sm), var(--shadow-glow), 0 10px 28px rgba(244, 108, 56, 0.28);
}

.home-cta .btn--secondary {
  transition:
    transform var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.home-cta .btn--secondary:hover {
  box-shadow: var(--shadow-raised-sm), var(--shadow-glow-lime);
}

.neu-card--featured {
  transition:
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.neu-card--featured:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--lime) 45%, var(--border));
  box-shadow: var(--shadow-raised), var(--shadow-glow-lime);
}

@media (max-width: 1023px) {
  .hero--home {
    min-height: auto;
  }

  .hero-visual {
    order: -1;
    min-height: 0;
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    padding: 0.5rem 0 0.25rem;
    aspect-ratio: 1.05 / 1;
  }

  .hero-visual__glow {
    width: 78%;
    height: 78%;
  }

  .hero-device {
    width: min(188px, 46vw);
    border-width: 2.5px;
    border-radius: 30px;
  }

  .hero-device__screen {
    border-radius: 20px;
    padding: 10px;
    gap: 7px;
  }

  .float-card {
    font-size: 0.68rem;
    padding: 0.55rem 0.7rem;
  }

  .float-card--one {
    top: 8%;
    left: 0;
  }

  .float-card--two {
    top: auto;
    bottom: 14%;
    right: 0;
  }

  .hero-accent-card {
    left: 0;
    bottom: 4%;
    max-width: 9.5rem;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
  }

  .hero-accent-card__text {
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .hero-visual {
    max-width: 300px;
    aspect-ratio: 1 / 1;
  }

  .hero-device {
    width: min(168px, 48vw);
  }

  .float-card--two {
    bottom: 12%;
  }
}

/* Stats */
.stats {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 1024px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  text-align: left;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-strong);
  margin-bottom: var(--space-1);
}

.stat-card__label {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Preview grids */
.preview-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-preview {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 800px) {
  .about-preview {
    grid-template-columns: 240px 1fr;
  }
}

.about-preview__photo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised);
  object-fit: cover;
}

.about-preview p {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.skill-groups {
  display: grid;
  gap: var(--space-5);
}

.skill-group__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.skill-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.principles {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .principles .neu-card:last-child:nth-child(5) {
    grid-column: span 1;
  }
}

.principle__num {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.principle__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.filter-btn {
  padding: 0.55rem 1rem;
  min-height: 2.75rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-raised-sm);
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.filter-btn:hover,
.filter-btn.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(244, 108, 56, 0.35);
}

.projects-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition:
    opacity var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.project-card.is-hidden {
  display: none;
}

.project-card__visual {
  height: 120px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--surface-2), var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-card__visual svg {
  width: 72%;
  max-height: 80px;
  opacity: 0.9;
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--duration) var(--ease),
    visibility var(--duration) var(--ease);
}

.modal.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  align-self: center;
  width: min(100%, 640px);
  max-height: min(88vh, 760px);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised), var(--shadow-glow);
  padding: var(--space-6);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--duration) var(--ease);
}

.modal.is-open .modal__dialog {
  transform: none;
}

.modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  padding-right: 2.5rem;
}

.modal__section {
  margin-bottom: var(--space-4);
}

.modal__section h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.modal__section p,
.modal__section li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal__section ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.modal__section li + li {
  margin-top: 0.35rem;
}

.modal__shots {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(3, 1fr);
}

.modal__shot {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  box-shadow: var(--shadow-inset);
  display: grid;
  place-items: center;
  color: var(--text-subtle);
  font-size: var(--fs-xs);
  text-align: center;
  padding: var(--space-2);
}

body.modal-open,
body.nav-open,
html.overlay-open,
body.overlay-open {
  overflow: hidden;
  touch-action: none;
}

/* --------------------------------------------------------------------------
   Experience timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-left: 1.6rem;
  max-width: 42rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(197, 255, 65, 0.35), transparent);
}

.timeline__item {
  position: relative;
}

.timeline__marker {
  position: absolute;
  left: calc(-1.6rem + 0.12rem);
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline__role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.timeline__company {
  color: var(--accent);
  font-weight: 600;
  margin: 0.2rem 0;
}

.timeline__period {
  color: var(--text-subtle);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-3);
}

.timeline__focus {
  color: var(--text-muted);
}

.impact-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.impact-card__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-strong);
  margin-bottom: var(--space-2);
}

.impact-card__label {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Open source & contact
   -------------------------------------------------------------------------- */

.plugin-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .plugin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.workflow {
  display: grid;
  gap: var(--space-4);
  counter-reset: step;
}

@media (min-width: 800px) {
  .workflow {
    grid-template-columns: repeat(3, 1fr);
  }
}

.workflow__step {
  counter-increment: step;
}

.workflow__step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.contact-layout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.form {
  display: grid;
  gap: var(--space-4);
}

.form__group {
  display: grid;
  gap: var(--space-2);
}

.form__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
  color: var(--text);
  transition: border-color var(--duration-fast) var(--ease);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: rgba(244, 108, 56, 0.5);
}

.form__input.is-invalid,
.form__textarea.is-invalid {
  border-color: var(--danger);
}

.form__error {
  font-size: var(--fs-xs);
  color: var(--danger);
  min-height: 1em;
}

.form__textarea {
  min-height: 140px;
  resize: vertical;
}

.form__notice {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(244, 108, 56, 0.3);
  color: var(--text);
  font-size: var(--fs-sm);
}

.form__notice[hidden] {
  display: none;
}

/* 404 */
.error-page {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-8) 0;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), #ff8a5c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: var(--space-6) 0 calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.75);
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

@media (min-width: 720px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__copy,
.site-footer__note {
  font-size: var(--fs-sm);
  color: var(--text-subtle);
}

.site-footer__links {
  display: flex;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease),
    clip-path 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--rise {
  transform: translateY(2rem);
}

.reveal--from-left {
  transform: translate3d(-1.5rem, 0.75rem, 0);
}

.reveal--from-right {
  transform: translate3d(1.5rem, 0.75rem, 0);
}

.reveal--clip {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.5rem);
}

.reveal--clip.is-visible {
  clip-path: inset(0 0 0 0);
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

.reveal-delay-4 {
  transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    animation: none;
    opacity: 1;
  }

  body::before,
  body::after,
  .float-card,
  .hero-accent-card,
  .hero-visual__glow,
  .hero-device,
  .hero-device__dot {
    animation: none !important;
  }

  .hero-anim,
  .hero-anim__line,
  .float-card,
  .hero-accent-card,
  .hero-device__card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .hero-device__bar--accent {
    width: 62% !important;
  }

  .hero-device__bar--w78 {
    width: 78% !important;
  }

  .hero-device__bar--w58 {
    width: 58% !important;
  }

  .reveal,
  .reveal--clip {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }

  .btn:hover,
  .icon-link:hover,
  .neu-card:hover,
  .neu-card--featured:hover,
  .skill-tag:hover,
  .home-cta .btn--primary:hover,
  .home-cta .btn--secondary:hover {
    transform: none;
  }

  .modal__dialog,
  .nav__menu {
    transition: none !important;
    transform: none !important;
  }
}

/* ==========================================================================
   AI Lab, Blog, Tech Radar, LinkedIn
   ========================================================================== */

.editable-note {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  margin-bottom: var(--space-4);
  font-style: italic;
}

/* Chat / Portfolio Assistant */
.chat {
  display: grid;
  gap: var(--space-4);
  max-width: 720px;
}

.chat__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
}

.chat__log {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat__bubble {
  max-width: 90%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.chat__bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-on-primary);
  border-bottom-right-radius: 6px;
}

.chat__bubble--assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.chat__bubble--error {
  align-self: stretch;
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.35);
  color: #ffb4b4;
}

.chat__bubble--meta {
  align-self: center;
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  background: transparent;
  border: none;
  padding: 0;
}

.chat__typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-dot 1s ease-in-out infinite;
}

.chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.chat__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}

.chat__input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
  color: var(--text);
}

.chat__input:focus {
  outline: none;
  border-color: rgba(244, 108, 56, 0.5);
}

.chat__status {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  min-height: 1.2em;
}

/* Recommend widget */
.recommend {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
}

.recommend__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.recommend__result {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-card.is-recommended {
  border-color: rgba(244, 108, 56, 0.55);
  box-shadow: var(--shadow-raised), var(--shadow-glow);
}

/* Tech Radar */
.radar {
  display: grid;
  gap: var(--space-4);
  position: relative;
}

.radar__meta {
  font-size: var(--fs-sm);
  color: var(--text-subtle);
  margin-bottom: var(--space-4);
}

.radar-item {
  display: grid;
  gap: var(--space-2);
  padding-left: 1.5rem;
  position: relative;
}

.radar-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.radar-item::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 1.4rem;
  bottom: -1rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(244, 108, 56, 0.5), transparent);
}

.radar-item:last-child::after {
  display: none;
}

.radar-item__category {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.radar-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .radar-grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .radar-grid--cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Insights */
.insights {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .insights {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .insights {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* LinkedIn cards */
.linkedin-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .linkedin-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.linkedin-card__date {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  margin-bottom: var(--space-2);
}

.linkedin-card__engagement {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  margin: var(--space-2) 0;
}

.linkedin-featured {
  margin-bottom: var(--space-5);
}

.social-proof {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .social-proof {
    grid-template-columns: repeat(3, 1fr);
  }
}

.social-proof__title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

/* Blog */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  align-items: center;
}

.blog-search {
  flex: 1 1 220px;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
  color: var(--text);
}

.blog-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card__cover {
  height: 120px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  color: var(--text-subtle);
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
}

.cover-plugins { background: var(--cover-plugins); }
.cover-architecture { background: var(--cover-architecture); }
.cover-android { background: var(--cover-android); }
.cover-ai { background: var(--cover-ai); }

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  pointer-events: none;
}

.article-layout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.article-toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: var(--space-4);
}

.article-toc a {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding: 0.35rem 0;
}

.article-toc a:hover {
  color: var(--accent-strong);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.article-body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

.article-body a {
  overflow-wrap: anywhere;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 700px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-missing {
  text-align: center;
  padding: var(--space-8) 0;
}

/* ==========================================================================
   Responsive polish — sm phones, touch targets, safe areas
   ========================================================================== */

@media (max-width: 1023px) {
  .modal {
    padding: var(--space-4);
    align-items: center;
    justify-content: center;
  }

  .modal__dialog {
    width: min(100%, 640px);
    max-height: min(88vh, 760px);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border-strong);
    transform: translateY(16px) scale(0.98);
  }

  .modal.is-open .modal__dialog {
    transform: none;
  }

  .modal__dialog::before {
    display: none;
  }

  .modal__title {
    font-size: 1.35rem;
    padding-right: 2.75rem;
  }

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

  .chat__form .btn {
    width: 100%;
  }

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

  .blog-search {
    flex: 1 1 100%;
    width: 100%;
  }

  .article-toc {
    position: static;
    top: auto;
  }
}

@media (max-width: 639px) {
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal__dialog {
    width: 100%;
    max-height: min(92dvh, 760px);
    padding:
      calc(var(--space-5) + 0.35rem)
      var(--space-5)
      calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    transform: translate3d(0, 100%, 0);
  }

  .modal.is-open .modal__dialog {
    transform: translate3d(0, 0, 0);
  }

  .modal__dialog::before {
    content: "";
    display: block;
    position: absolute;
    top: 0.55rem;
    left: 50%;
    width: 2.75rem;
    height: 0.28rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 55%, transparent);
    transform: translateX(-50%);
    pointer-events: none;
  }

  .modal__title {
    font-size: 1.25rem;
  }

  .modal__close {
    top: calc(var(--space-4) + 0.15rem);
  }
}

@media (min-width: 1024px) {
  .modal {
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
  }

  .modal__dialog {
    width: min(100%, 640px);
    max-height: min(85vh, 760px);
  }
}

@media (max-width: 639px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .section {
    padding: var(--space-7) 0;
  }

  .section--tight {
    padding: var(--space-6) 0;
  }

  .page-hero {
    padding: var(--space-7) 0 var(--space-5);
  }

  .hero {
    padding: var(--space-6) 0 var(--space-5);
    min-height: auto;
  }

  .hero--home {
    padding-top: clamp(1.25rem, 4vh, 2rem);
    padding-bottom: clamp(1.75rem, 5vh, 3rem);
  }

  .hero__title-outline {
    -webkit-text-stroke-width: 1px;
  }

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

  .hero__actions .btn {
    width: 100%;
  }

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

  .home-updates__actions .btn {
    width: 100%;
  }

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

  .contact-actions .btn {
    width: 100%;
  }

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

  .article-nav .btn {
    width: 100%;
    justify-content: center;
  }

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

  .article-share .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   DEV mock-content badge (injected by content.js in mock mode)
   -------------------------------------------------------------------------- */
.dev-mock-badge {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  z-index: 400;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-on-lime);
  background: linear-gradient(160deg, var(--lime-strong), var(--lime));
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow-neo-sm);
  pointer-events: none;
  user-select: none;
}
