@font-face {
  font-family: 'Shabnam';
  src: url('../fonts/Shabnam-FD.woff2') format('woff2'),
       url('../fonts/Shabnam-FD.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Shabnam';
  src: url('../fonts/Shabnam-Light-FD.woff2') format('woff2'),
       url('../fonts/Shabnam-Light-FD.woff') format('woff');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Shabnam';
  src: url('../fonts/Shabnam-Bold-FD.woff2') format('woff2'),
       url('../fonts/Shabnam-Bold-FD.woff') format('woff');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}


:root {
  --font: 'Shabnam', Tahoma, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-w: 1180px;
  --header-h: 76px;

  
  --shape: round;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-press: 90ms;
  --dur-fast: 160ms;
  --dur: 280ms;
}

@supports (corner-shape: squircle) {
  :root {
    --shape: squircle;
    --r-xl: 44px;
    --r-lg: 34px;
    --r-md: 24px;
    --r-sm: 17px;
  }
}

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

  --bg: #F2F0EA;
  --bg-alt: #EAE7DF;
  --surface: #FFFFFF;
  --surface-2: #F8F6F1;
  --ink: #13201E;
  --ink-rgb: 19, 32, 30;
  --ink-muted: #56645F;
  --line: rgba(19, 32, 30, .10);

  --brand: #0E6B62;
  --brand-rgb: 14, 107, 98;
  --brand-strong: #0A524A;
  --brand-soft: rgba(14, 107, 98, .10);
  --on-brand: #FFFFFF;

  --accent: #C98A1E;
  --accent-rgb: 201, 138, 30;
  --accent-ink: #84560A;
  --accent-soft: rgba(201, 138, 30, .15);

  --glass-bg: rgba(255, 255, 255, .64);
  --glass-border: rgba(255, 255, 255, .75);
  --backdrop: #0B1412;

  --shadow-card: 0 1px 2px rgba(19, 32, 30, .04), 0 10px 30px rgba(19, 32, 30, .07);
  --shadow-hover: 0 2px 4px rgba(19, 32, 30, .05), 0 22px 46px rgba(19, 32, 30, .14);
  --shadow-brand: 0 10px 24px rgba(14, 107, 98, .30);
  --neu-raised: 8px 8px 18px rgba(19, 32, 30, .10), -8px -8px 18px rgba(255, 255, 255, .92);
  --neu-inset: inset 4px 4px 10px rgba(19, 32, 30, .09), inset -4px -4px 10px rgba(255, 255, 255, .95);

  
  --bs-body-font-family: var(--font);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-border-color: var(--line);
  --bs-heading-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-strong);
}

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

  --bg: #0B1211;
  --bg-alt: #0F1817;
  --surface: #131D1C;
  --surface-2: #182423;
  --ink: #EAF2F0;
  --ink-rgb: 234, 242, 240;
  --ink-muted: #9DB0AC;
  --line: rgba(234, 242, 240, .10);

  --brand: #4CCBB9;
  --brand-rgb: 76, 203, 185;
  --brand-strong: #7FE0D1;
  --brand-soft: rgba(76, 203, 185, .13);
  --on-brand: #06201C;

  --accent: #F0B550;
  --accent-rgb: 240, 181, 80;
  --accent-ink: #F0B550;
  --accent-soft: rgba(240, 181, 80, .14);

  --glass-bg: rgba(19, 29, 28, .62);
  --glass-border: rgba(255, 255, 255, .08);
  --backdrop: #000000;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .38);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 22px 46px rgba(0, 0, 0, .55);
  --shadow-brand: 0 10px 24px rgba(76, 203, 185, .18);
  --neu-raised: 8px 8px 18px rgba(0, 0, 0, .55), -6px -6px 14px rgba(255, 255, 255, .035);
  --neu-inset: inset 4px 4px 10px rgba(0, 0, 0, .5), inset -3px -3px 8px rgba(255, 255, 255, .035);

  --bs-body-font-family: var(--font);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-border-color: var(--line);
  --bs-heading-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-strong);
}

html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after { transition: none !important; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease-out; }

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.9;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.35; color: var(--ink); }
p { margin-bottom: 1rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--max-w); padding-inline: clamp(1rem, 4vw, 2rem); }

.skip-link {
  position: fixed;
  top: -80px;
  inset-inline-start: 1rem;
  z-index: 2000;
  padding: .7rem 1.2rem;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--r-sm);
  corner-shape: var(--shape);
  font-weight: 700;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

.nav-pill, .brand-mark, .icon-btn, .icon-btn-sm, .btn-brand, .btn-soft, .portrait, .hero-ring,
.float-chip, .eyebrow, .panel, .stat-card, .stat-icon, .skill-card, .skill-icon, .tag,
.filter-btn, .project-card, .project-media, .cert-card, .cert-thumb, .date-badge, .contact-ico,
.social-link, .mobile-menu, .mobile-link, .modal-content, .modal-media, .form-control, .alert-note,
.to-top, .toast, .feature-ico, .timeline-card, .timeline-item::before, .quick-btn,
.book-card, .book-icon, .book-nlai, .member-item, .member-ico, .english-box {
  corner-shape: var(--shape);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--surface); border-color: var(--line); }
}

.btn-brand,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 50px;
  padding: .7rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-brand {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-brand);
}
.btn-brand:hover { background: var(--brand-strong); color: var(--on-brand); transform: translateY(-2px); }
.btn-soft {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}
.btn-soft:hover { color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-brand:active,
.btn-soft:active { transform: scale(.97); transition-duration: var(--dur-press); }
.btn-brand .bi, .btn-soft .bi { font-size: 1.1em; }
.btn-brand--sm { min-height: 46px; padding: .5rem 1.2rem; font-size: .95rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--neu-raised);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--brand); }
.icon-btn:active { transform: scale(.92); box-shadow: var(--neu-inset); transition-duration: var(--dur-press); }
.icon-btn svg { width: 22px; height: 22px; }

.icon-btn-sm {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-press) var(--ease);
}
.icon-btn-sm:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn-sm:active { transform: scale(.9); }

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity var(--dur) var(--ease), transform .5s var(--ease-out);
}
.theme-toggle { position: relative; }
[data-bs-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-bs-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
[data-bs-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-bs-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: none; }

.social-link {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.social-link:hover { background: var(--brand); color: var(--on-brand); transform: translateY(-3px); }
.social-link:active { transform: scale(.93); }
.social-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .8rem;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.8;
}
.tag--accent { background: var(--accent-soft); color: var(--accent-ink); }

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1030;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 64px;
  padding: .45rem .6rem .45rem .7rem;
  border-radius: var(--r-xl);
  box-shadow: 0 4px 18px rgba(var(--ink-rgb), .06);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.is-scrolled .nav-pill { box-shadow: var(--shadow-hover); }

.brand { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; font-weight: 800; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: var(--on-brand);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.02em;
  box-shadow: var(--shadow-brand);
}
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }

.nav-links { display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.nav-link-item {
  display: block;
  padding: .45rem .85rem;
  border-radius: var(--r-sm);
  corner-shape: var(--shape);
  color: var(--ink-muted);
  font-size: .95rem;
  font-weight: 700;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link-item:hover { color: var(--ink); background: rgba(var(--ink-rgb), .05); }
.nav-link-item.is-active { color: var(--brand); background: var(--brand-soft); }

.nav-actions { display: flex; align-items: center; gap: .55rem; }

.mobile-menu {
  --bs-offcanvas-width: min(88vw, 380px);
  --bs-offcanvas-bg: var(--surface);
  --bs-offcanvas-color: var(--ink);
  --bs-offcanvas-border-width: 0;
  border-start-end-radius: var(--r-xl);
  border-end-end-radius: var(--r-xl);
  box-shadow: var(--shadow-hover);
}
.mobile-menu .offcanvas-header { padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.1rem 1rem; }
.mobile-menu .offcanvas-body { display: flex; flex-direction: column; padding: .4rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom, 0px)); }
.mobile-links { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.mobile-link {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 56px;
  padding: .6rem .9rem;
  border-radius: var(--r-md);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mobile-link .bi:first-child {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  corner-shape: var(--shape);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.15rem;
}
.mobile-link .bi:last-child { margin-inline-start: auto; color: var(--ink-muted); }
.mobile-link:hover, .mobile-link.is-active { background: var(--brand-soft); color: var(--brand); }
.mobile-menu-foot { margin-top: auto; padding-top: 1.6rem; display: grid; gap: 1rem; }
.offcanvas-backdrop { --bs-backdrop-bg: var(--backdrop); --bs-backdrop-opacity: .5; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100vh, 940px);
  min-height: min(100svh, 940px);
  padding: calc(var(--header-h) + 2.2rem) 0 4.5rem;
  overflow: hidden;
  overflow: clip;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 50% at 88% 6%, rgba(var(--brand-rgb), .17), transparent 70%),
    radial-gradient(45% 42% at 8% 92%, rgba(var(--accent-rgb), .15), transparent 70%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(var(--ink-rgb), .16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 62% at 50% 42%, #000, transparent 78%);
  mask-image: radial-gradient(70% 62% at 50% 42%, #000, transparent 78%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem 1rem;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .95rem;
  font-weight: 700;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-title { margin: 1.1rem 0 .2rem; font-size: clamp(2.7rem, 8vw, 5rem); line-height: 1.15; font-weight: 900; letter-spacing: -.01em; }
.hero-role { margin: 0 0 1.2rem; color: var(--accent-ink); font-size: clamp(1.3rem, 3.2vw, 1.8rem); font-weight: 800; }
.hero-lead { max-width: 34rem; margin-bottom: .8rem; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; line-height: 1.9; }
.hero-text { max-width: 34rem; margin-bottom: 1.8rem; color: var(--ink-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.8rem; }

.hero-visual {
  --px: 0;
  --py: 0;
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.hero-ring {
  position: absolute;
  border: 1.5px solid rgba(var(--brand-rgb), .28);
  border-radius: 30%;
  pointer-events: none;
  transition: transform .6s var(--ease-out);
}
.hero-ring--1 { inset: -5%; transform: translate3d(calc(var(--px) * -6px), calc(var(--py) * -6px), 0); }
.hero-ring--2 {
  inset: -11%;
  border-color: rgba(var(--accent-rgb), .32);
  border-style: dashed;
  transform: rotate(7deg) translate3d(calc(var(--px) * -12px), calc(var(--py) * -12px), 0);
}
.portrait {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 6px solid var(--surface);
  border-radius: 26%;
  background: var(--surface-2);
  box-shadow: var(--shadow-hover);
  transform: translate3d(calc(var(--px) * 8px), calc(var(--py) * 8px), 0);
  transition: transform .6s var(--ease-out);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-size: clamp(3.4rem, 12vw, 6rem);
  font-weight: 900;
  color: var(--brand);
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
}
.portrait.is-fallback .portrait-fallback { display: grid; }
.portrait.is-fallback img { display: none; }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .65rem;
  max-width: 78%;
  padding: .6rem .9rem;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  transition: transform .6s var(--ease-out);
}
.float-chip .bi {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  corner-shape: var(--shape);
  background: var(--brand);
  color: var(--on-brand);
  font-size: 1.1rem;
}
.float-chip strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.float-chip span { display: block; font-size: .8rem; line-height: 1.5; color: var(--ink-muted); }
.float-chip--a { left: -2%; bottom: 6%; transform: translate3d(calc(var(--px) * 16px), calc(var(--py) * 16px), 0); }
.float-chip--b { right: -2%; top: 8%; transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 12px), 0); }
.float-chip--b .bi { background: var(--accent); color: #1B1405; }

.section { position: relative; padding: clamp(4.5rem, 9vw, 7rem) 0; scroll-margin-top: 16px; }
.hero { scroll-margin-top: 0; }
.section--alt { background: var(--bg-alt); }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .7rem;
  color: var(--brand);
  font-size: .95rem;
  font-weight: 800;
}
.section-kicker::before { content: ''; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); }
.section-title { margin: 0 0 .6rem; font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 900; }
.section-sub { margin: 0; color: var(--ink-muted); }

.panel {
  height: 100%;
  padding: clamp(1.4rem, 3.4vw, 2.3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.about-panel p { font-size: 1.08rem; }
.about-panel p:last-of-type { margin-bottom: 0; }
.about-goal {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin-top: 1.6rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-md);
  corner-shape: var(--shape);
  background: var(--brand-soft);
}
.about-goal .bi { flex: none; margin-top: .2rem; color: var(--brand); font-size: 1.5rem; }
.about-goal strong { display: block; margin-bottom: .1rem; }
.about-goal p { margin: 0; font-size: 1rem; color: var(--ink-muted); }
.feature-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: .9rem; font-weight: 700; }
.feature-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 15px;
  background: var(--bg);
  box-shadow: var(--neu-raised);
  color: var(--brand);
  font-size: 1.2rem;
}
.panel-title { margin: 0 0 1.2rem; font-size: 1.2rem; }
.panel--brand {
  background: linear-gradient(150deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  color: var(--on-brand);
}
[data-bs-theme="dark"] .panel--brand { background: linear-gradient(150deg, #123B37, #0E2A27); border-color: var(--line); color: var(--ink); }
.panel--brand .panel-title { color: inherit; }

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--neu-raised);
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: var(--r-md);
  box-shadow: var(--neu-inset);
  color: var(--brand);
  font-size: 1.6rem;
}
.stat-value { display: flex; align-items: baseline; gap: 2px; font-size: clamp(2.1rem, 5vw, 2.9rem); font-weight: 900; line-height: 1.1; direction: ltr; justify-content: flex-end; }
.stat-value .plus { color: var(--accent-ink); }
.stat-label { margin: .1rem 0 0; color: var(--ink-muted); font-size: .98rem; line-height: 1.7; }

.skill-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.skill-card::after {
  content: '';
  position: absolute;
  inset-block-start: -60px;
  inset-inline-end: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .20), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(var(--brand-rgb), .35); }
.skill-card:hover::after { opacity: 1; }
.skill-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1.1rem;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.55rem;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.skill-card:hover .skill-icon { background: var(--brand); color: var(--on-brand); transform: rotate(-6deg); }
.skill-title { margin: 0 0 .4rem; font-size: 1.2rem; }
.skill-text { margin: 0; color: var(--ink-muted); font-size: 1rem; line-height: 1.85; }

.timeline { position: relative; max-width: 880px; margin: 0 auto; padding: 0; list-style: none; }
.timeline::before {
  content: '';
  position: absolute;
  inset-block: 14px 14px;
  inset-inline-start: 15px;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), rgba(var(--brand-rgb), .05));
}
.timeline-item { position: relative; padding-inline-start: 3.4rem; padding-bottom: 1.4rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  inset-block-start: 1.5rem;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  border: 5px solid var(--brand);
  background: var(--bg);
  box-shadow: 0 0 0 5px var(--brand-soft);
}
.timeline-card { padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.timeline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.date-badge { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .6rem; padding: .15rem .8rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: .88rem; font-weight: 700; }
.timeline-title { margin: 0; font-size: 1.25rem; }
.timeline-org { margin: .15rem 0 .6rem; color: var(--brand); font-weight: 700; }
.timeline-text { margin: 0 0 .6rem; color: var(--ink-muted); }
.check-list { display: grid; gap: .35rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-inline-start: 1.7rem; color: var(--ink-muted); font-size: .98rem; line-height: 1.8; }
.check-list li::before { content: '\f26a'; font-family: bootstrap-icons; position: absolute; inset-inline-start: 0; top: .05rem; color: var(--brand); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter-btn {
  min-height: 46px;
  padding: .45rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-muted);
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-press) var(--ease), box-shadow var(--dur) var(--ease);
}
.filter-btn:hover { color: var(--ink); box-shadow: var(--shadow-card); }
.filter-btn:active { transform: scale(.96); }
.filter-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-brand); }

.project-card,
.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity 240ms var(--ease), border-color var(--dur) var(--ease);
}
.project-card:hover,
.cert-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(var(--brand-rgb), .35); }
.project-card.is-leaving { opacity: 0; transform: scale(.94); pointer-events: none; }

.project-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 8px); background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.project-card:hover .project-media img { transform: scale(1.06); }
.media-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand); font-size: 2.4rem; opacity: .6; }
.project-body { display: flex; flex-direction: column; flex: 1; gap: .55rem; padding: 1.2rem 1.4rem 1.5rem; }
.project-title { margin: 0; font-size: 1.2rem; }
.project-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.project-open::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.project-open:focus-visible { outline-offset: -3px; }
.project-text { margin: 0; color: var(--ink-muted); font-size: .98rem; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-more { margin-top: auto; padding-top: .4rem; color: var(--brand); font-weight: 700; font-size: .95rem; }
.project-more .bi { margin-inline-start: .25rem; transition: transform var(--dur) var(--ease); display: inline-block; }
.project-card:hover .project-more .bi { transform: translateX(-4px); }

.cert-thumb { position: relative; display: block; width: calc(100% - 16px); aspect-ratio: 4 / 3; margin: 8px 8px 0; padding: 0; overflow: hidden; border: 0; border-radius: calc(var(--r-lg) - 8px); background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); cursor: zoom-in; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.cert-card:hover .cert-thumb img { transform: scale(1.05); }
.cert-thumb--static { cursor: default; display: grid; place-items: center; aspect-ratio: auto; width: 58px; height: 58px; margin: 1.3rem 1.4rem 0; border-radius: var(--r-md); color: var(--brand); font-size: 1.5rem; }
.cert-body { display: flex; flex-direction: column; flex: 1; gap: .25rem; padding: 1.1rem 1.4rem 1.4rem; }
.cert-title { margin: 0; font-size: 1.1rem; }
.cert-meta { margin: 0; color: var(--ink-muted); font-size: .95rem; }
.cert-link { margin-top: auto; padding-top: .5rem; color: var(--brand); font-weight: 700; font-size: .95rem; }
.cert-link:hover { color: var(--brand-strong); }

.modal { --bs-modal-zindex: 1060; }
.modal-backdrop { --bs-backdrop-bg: var(--backdrop); --bs-backdrop-opacity: .6; --bs-backdrop-zindex: 1055; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-content { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-hover); }
.modal.fade .modal-dialog { transform: translateY(26px) scale(.97); transition: transform .4s var(--ease-out); }
.modal.show .modal-dialog { transform: none; }
.modal-close { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--glass-border); border-radius: 14px; corner-shape: var(--shape); background: var(--glass-bg); color: var(--ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; }
.modal-close:hover { color: var(--brand); }
.modal-media { aspect-ratio: 16 / 9; margin: 10px 10px 0; overflow: hidden; border-radius: calc(var(--r-xl) - 10px); background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 1.5rem 1.7rem 1.8rem; }
.modal-title { margin: .6rem 0 .6rem; font-size: 1.5rem; }
.modal-text { color: var(--ink-muted); white-space: pre-line; }
.modal-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.cert-modal-img { display: block; width: 100%; max-height: 72vh; margin: 0 auto; padding: 10px 10px 0; object-fit: contain; }

.contact-list { display: grid; gap: .9rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.contact-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); corner-shape: var(--shape); box-shadow: var(--shadow-card); }
.contact-ico { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 16px; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; }
.contact-info { flex: 1; min-width: 0; }
.contact-label { display: block; color: var(--ink-muted); font-size: .85rem; line-height: 1.6; }
.contact-value { display: block; overflow-wrap: anywhere; font-weight: 700; font-size: 1.02rem; line-height: 1.6; }
.contact-value[dir="ltr"] { text-align: right; }
a.contact-value:hover { color: var(--brand); }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1.4rem; }
.quick-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-weight: 700; box-shadow: var(--shadow-card); transition: transform var(--dur-fast) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.quick-btn:hover { background: var(--brand); color: var(--on-brand); transform: translateY(-2px); }
.quick-btn:active { transform: scale(.96); }

.form-floating > .form-control,
.form-floating > .form-control:focus { min-height: 58px; }
.form-control {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--surface-2);
  color: var(--ink);
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.form-control:focus { background-color: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .16); color: var(--ink); }
.form-floating > label { color: var(--ink-muted); padding-inline: 1rem; }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--brand); }
textarea.form-control { min-height: 170px; resize: vertical; }
.form-floating > textarea.form-control { height: 170px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.alert-note { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; margin-top: 1.2rem; padding: 1rem 1.2rem; border: 1px solid rgba(var(--brand-rgb), .3); border-radius: var(--r-md); background: var(--brand-soft); font-size: .98rem; line-height: 1.8; }
.alert-note[hidden] { display: none; }
.alert-note p { flex: 1 1 240px; margin: 0; }

.toast { --bs-toast-bg: var(--surface); --bs-toast-color: var(--ink); --bs-toast-border-color: var(--line); --bs-toast-border-radius: var(--r-md); --bs-toast-box-shadow: var(--shadow-hover); font-weight: 700; }
.toast-container { z-index: 1090; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important; }

.site-footer { padding: 3.2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--ink-muted); font-weight: 600; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .92rem; }
.footer-bottom a { color: var(--brand); font-weight: 700; }
.footer-bottom a:hover { color: var(--brand-strong); }
.footer-desc { max-width: 22rem; margin: .8rem 0 0; color: var(--ink-muted); font-size: .98rem; }

.to-top {
  position: fixed;
  inset-block-end: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 1.2rem;
  z-index: 1020;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--on-brand);
  border: 0;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  cursor: pointer;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:active { transform: scale(.92); }

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity .4s ease-out calc(var(--d, 0ms) * .4), transform .4s var(--ease-out) calc(var(--d, 0ms) * .4);
}
.js [data-reveal="scale"] { transform: scale(.97); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 991.98px) {
  .hero { min-height: 0; padding-top: calc(var(--header-h) + 1.6rem); }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow { margin-inline: auto; }
  .hero-lead, .hero-text { margin-inline: auto; }
  .hero-cta, .hero-copy .social-row { justify-content: center; }
  .hero-visual { width: min(78%, 360px); }
}

@media (max-width: 575.98px) {
  body { font-size: 1.03rem; }
  .brand-name { font-size: 1rem; }
  .hero-cta .btn-brand, .hero-cta .btn-soft { flex: 1 1 100%; }
  .float-chip { padding: .5rem .7rem; }
  .float-chip .bi { width: 32px; height: 32px; font-size: .95rem; }
  .float-chip strong { font-size: .95rem; }
  .float-chip span { font-size: .72rem; }
  .stat-card { padding: 1.2rem; }
  .timeline::before { inset-inline-start: 11px; }
  .timeline-item { padding-inline-start: 2.8rem; }
  .timeline-item::before { inset-inline-start: 0; }
  .timeline-card { padding: 1.2rem; }
  .modal-body { padding: 1.3rem 1.2rem 1.5rem; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 374.98px) {
  .brand-name { display: none; }
  .quick-actions { grid-template-columns: 1fr; }
}

@media (min-width: 576px) {
  .float-chip--a { left: -9%; }
  .float-chip--b { right: -8%; }
}

@media (min-width: 992px) {
  .hero-visual { width: min(100%, 460px); }
  .nav-pill { padding-inline-start: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .skill-card:hover, .project-card:hover, .cert-card:hover, .timeline-card:hover, .book-card:hover { transform: none; }
}

@media print {
  .site-header, .to-top, .mobile-menu, .toast-container { display: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  height: 100%;
  padding: 1.3rem 1.4rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(var(--brand-rgb), .35); }
.book-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.book-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.4rem;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.book-icon--alt { background: var(--accent-soft); color: var(--accent-ink); }
.book-card:hover .book-icon { background: var(--brand); color: var(--on-brand); transform: rotate(-6deg); }
.book-card:hover .book-icon--alt { background: var(--accent); color: #1B1405; }
.book-title { margin: 0; font-size: 1.12rem; line-height: 1.8; }
.book-open {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.book-open::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.book-open:focus-visible { outline-offset: 4px; }
.book-author { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--ink-muted); font-size: .95rem; line-height: 1.8; }
.book-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; padding: 0; color: var(--ink-muted); font-size: .9rem; list-style: none; }
.book-meta .bi { margin-inline-end: .3rem; color: var(--brand); }
.book-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--line); }
.book-more { color: var(--ink-muted); font-size: .92rem; font-weight: 700; }
.book-more .bi { display: inline-block; margin-inline-start: .25rem; transition: transform var(--dur) var(--ease); }
.book-card:hover .book-more .bi { transform: translateX(-4px); }
.book-nlai {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .3rem .85rem;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .92rem;
  font-weight: 700;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-press) var(--ease);
}
.book-nlai:hover { background: var(--brand); color: var(--on-brand); }
.book-nlai:active { transform: scale(.96); }

.section-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; max-width: none; }
.section-head--row > div:first-child { max-width: 40rem; }
.slider-controls { display: flex; gap: .6rem; }
.slider-controls .icon-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.book-slider { position: relative; margin-inline: calc(clamp(1rem, 4vw, 2rem) * -1); }
.book-track {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: .9rem clamp(1rem, 4vw, 2rem) 1.6rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(1rem, 4vw, 2rem);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  transition: opacity .15s ease-out;
}
.book-track::-webkit-scrollbar { display: none; }
.book-track.is-out { opacity: 0; }
.book-slide { flex: 0 0 min(86%, 340px); scroll-snap-align: start; }
.book-slide .book-card { height: 100%; }
@media (min-width: 1200px) {
  .book-slider { margin-inline: 0; }
  .book-track { padding-inline: .25rem; scroll-padding-inline: .25rem; }
}

.eitaa-ico { display: block; width: 1.3rem; height: 1.3rem; object-fit: contain; }
.eitaa-ico--white { display: none; }
[data-bs-theme="dark"] .eitaa-ico--black { display: none; }
[data-bs-theme="dark"] .eitaa-ico--white { display: block; }
[data-bs-theme="light"] .social-link:hover .eitaa-ico--black,
[data-bs-theme="light"] .quick-btn:hover .eitaa-ico--black { display: none; }
[data-bs-theme="light"] .social-link:hover .eitaa-ico--white,
[data-bs-theme="light"] .quick-btn:hover .eitaa-ico--white { display: block; }
[data-bs-theme="dark"] .social-link:hover .eitaa-ico--white,
[data-bs-theme="dark"] .quick-btn:hover .eitaa-ico--white { display: none; }
[data-bs-theme="dark"] .social-link:hover .eitaa-ico--black,
[data-bs-theme="dark"] .quick-btn:hover .eitaa-ico--black { display: block; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.panel--brand .tag { background: rgba(255, 255, 255, .16); color: inherit; }
.english-box { margin-top: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); text-align: left; }
.english-box h3 { margin: 0 0 .6rem; font-size: 1.05rem; line-height: 1.6; }
.english-box p { margin: 0; color: var(--ink-muted); font-size: 1rem; line-height: 1.85; }
.article-card .skill-title { font-size: 1.12rem; line-height: 1.8; }
.article-meta { display: grid; gap: .3rem; margin: .9rem 0 0; padding: 0; list-style: none; color: var(--ink-muted); font-size: .93rem; line-height: 1.8; }
.article-meta .bi { margin-inline-end: .45rem; color: var(--brand); }
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .9rem; margin: 0; padding: 0; list-style: none; }
.member-item { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); font-weight: 700; line-height: 1.7; }
.member-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; }
.footer-latin { margin: .3rem 0 0; color: var(--ink-muted); font-weight: 700; letter-spacing: .02em; }
@media (max-width: 1199.98px) {
  .nav-link-item { padding: .45rem .65rem; font-size: .92rem; }
}

.section-head--row .btn-soft { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 374.98px) {
  .section-head--row .btn-soft { padding-inline: 1rem; font-size: .9rem; }
}

.hero-stat, .search-box .form-control, .form-select, .state-box, .state-icon,
.info-section, .info-title .bi, .book-head, .modal-foot {
  corner-shape: var(--shape);
}

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: calc(var(--header-h) + 3rem) 0 2.5rem;
}
.page-title { margin: 1rem 0 .7rem; font-size: clamp(2.2rem, 6.5vw, 3.8rem); font-weight: 900; line-height: 1.2; }
.page-lead { max-width: 40rem; margin: 0 0 1.8rem; color: var(--ink-muted); font-size: 1.1rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.hero-stat {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .75rem 1.2rem;
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: var(--neu-raised);
}
.hero-stat .bi { color: var(--brand); font-size: 1.4rem; }
.hero-stat strong { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.3; }
.hero-stat span { display: block; color: var(--ink-muted); font-size: .88rem; line-height: 1.5; }

.books-section { padding: 1rem 0 clamp(4rem, 8vw, 6rem); }
.toolbar { margin-bottom: 1.4rem; padding: 1.1rem; }
.search-box { position: relative; }
.search-box > .bi { position: absolute; top: 50%; inset-inline-start: 1.1rem; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.search-box .form-control { min-height: 54px; padding-inline-start: 3rem; }
.form-select {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--surface-2);
  color: var(--ink);
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .16); }
.toolbar-label { display: block; margin-bottom: .3rem; color: var(--ink-muted); font-size: .85rem; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1.2rem; color: var(--ink-muted); font-size: .95rem; }
.link-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 0; border-radius: 10px; background: none; color: var(--brand); font-weight: 700; cursor: pointer; }
.link-btn:hover { background: var(--brand-soft); }

.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-top: 1.2rem; }
.group-head:first-child { margin-top: 0; }
.group-head h2 { margin: 0; font-size: 1.35rem; }
.group-head span { color: var(--ink-muted); font-size: .95rem; }
.book-grid { transition: opacity .14s ease-out, transform .14s ease-out; }
.book-grid.is-out { opacity: 0; transform: translateY(8px); }

.state-box { display: grid; justify-items: center; gap: .8rem; max-width: 34rem; margin: 2rem auto; padding: 2.2rem 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); text-align: center; }
.state-box[hidden] { display: none; }
.state-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); font-size: 1.8rem; }
.state-box h2 { margin: 0; font-size: 1.3rem; }
.state-box p { margin: 0; color: var(--ink-muted); }

.book-modal .modal-content { max-height: 100%; }
.book-head { margin: 10px 10px 0; padding: 1.6rem 1.6rem 1.4rem; padding-inline-end: 4.6rem; border-radius: calc(var(--r-xl) - 10px); background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); }
.book-head-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.book-modal-title { margin: .9rem 0 .5rem; font-size: clamp(1.3rem, 3.4vw, 1.75rem); line-height: 1.65; }
.book-modal-author { margin: 0; color: var(--ink-muted); }
.book-sections { padding: 1.2rem 1.2rem .4rem; }
.info-section { margin-bottom: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.info-title { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; font-size: 1.05rem; }
.info-title .bi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-size: 1rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem 1.5rem; margin: 0; }
.info-item { min-width: 0; }
.info-item.is-wide { grid-column: 1 / -1; }
.info-item dt { color: var(--ink-muted); font-size: .84rem; font-weight: 600; line-height: 1.7; }
.info-item dd { margin: 0; font-weight: 600; line-height: 1.85; overflow-wrap: anywhere; }
.ltr-val { direction: ltr; text-align: right; unicode-bidi: isolate; }
.plain-list { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.plain-list li { position: relative; padding-inline-start: 1.05rem; }
.plain-list li::before { content: ''; position: absolute; top: .9em; inset-inline-start: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.plain-list .is-latin { direction: ltr; text-align: left; color: var(--ink-muted); font-weight: 500; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1.2rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.pager { display: flex; align-items: center; gap: .6rem; color: var(--ink-muted); font-size: .92rem; font-weight: 600; }
.pager .icon-btn { width: 44px; height: 44px; }
.pager .icon-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

@media (max-width: 575.98px) {
  .page-hero { padding-top: calc(var(--header-h) + 2rem); }
  .info-grid { grid-template-columns: 1fr; }
  .book-head { padding: 1.3rem 1.1rem 1.2rem; padding-inline-end: 4rem; }
  .book-sections { padding: 1rem .8rem .2rem; }
  .info-section { padding: 1rem; }
  .modal-foot { justify-content: center; }
  .modal-foot .btn-brand { flex: 1 1 100%; order: -1; }
  .hero-stat { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .book-grid { transition: none; }
}