:root {
  --bg: #090b0f;
  --panel: #0f1218;
  --panel2: #141821;
  --panel3: #181d26;
  --line: #262c36;
  --line2: #323946;
  --text: #f5f7fa;
  --muted: #9198a5;
  --muted2: #69717f;
  --accent: #2563eb;
  --accent2: #38bdf8;
  --shadow: 0 30px 80px rgba(0, 0, 0, .38);
  --radius: 16px
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.55 Inter, system-ui, sans-serif;
  overflow-x: hidden
}

body.light {
  --bg: #eef0f3;
  --panel: #fff;
  --panel2: #f5f6f8;
  --panel3: #fff;
  --line: #dfe3e8;
  --line2: #cbd1d9;
  --text: #171a20;
  --muted: #67707d;
  --muted2: #818996;
  --shadow: 0 20px 60px rgba(26, 35, 50, .14)
}

a {
  color: inherit
}

.noise {
  position: fixed;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E")
}

.cursor-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, .09), transparent 65%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen
}

/* floating controls — right side, replaces header for speed */
.float-controls {
  position: fixed;
  z-index: 30;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center
}

.float-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 18, 24, .78);
  backdrop-filter: blur(16px);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: .2s
}

.light .float-btn {
  background: rgba(255, 255, 255, .88)
}

.float-btn:hover {
  transform: scale(1.06);
  border-color: rgba(37, 99, 235, .5);
  color: var(--accent)
}

.lang-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(15, 18, 24, .78);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18)
}

.light .lang-switch {
  background: rgba(255, 255, 255, .88)
}

.lang-btn {
  width: 34px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 700 9px Inter;
  letter-spacing: .08em;
  cursor: pointer;
  transition: .2s
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--line)
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .25)
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 56px));
  margin: 18px auto 28px;
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow)
}

.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(10, 12, 17, .98));
}

.light .sidebar {
  background: var(--panel)
}

.sidebar-scroll {
  padding: 22px 20px 18px
}

.profile {
  text-align: center
}

/* desktop: sidebar fixed, only content scrolls — ultra compact, NO scroll, shows full */
@media(min-width:901px) {
  .shell {
    height: calc(100vh - 24px);
    margin: 12px auto;
    overflow: hidden;
    align-items: stretch
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: none
  }

  .sidebar::-webkit-scrollbar {
    display: none
  }

  .sidebar-scroll {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 14px 10px;
    gap: 6px;
    min-height: 0
  }

  .profile {
    flex-shrink: 0
  }

  .avatar-wrap {
    width: 70px;
    height: 70px;
    margin: 0 auto 5px
  }

  .avatar {
    width: 60px;
    height: 60px;
    margin: 5px;
    box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(0, 0, 0, .30)
  }

  .orbit {
    border-width: 1px
  }

  h1 {
    font-size: 17px;
    line-height: 1
  }

  .role-line {
    margin: 2px 0 4px;
    font-size: 9px
  }

  .roles {
    margin-bottom: 4px
  }

  .roles span {
    padding: 3px 7px;
    font-size: 8px
  }

  .bio {
    display: block;
    margin: 6px auto 8px !important;
    font-size: 10px !important;
    line-height: 1.55 !important;
    color: #cbd1da !important;
    text-align: center !important;
    max-width: 275px;
    letter-spacing: .01em;
    font-weight: 400
  }

  .light .bio {
    color: #5a6473 !important
  }

  .bio strong {
    color: var(--accent);
    font-weight: 700
  }

  .mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 4px 0
  }

  .mini-card {
    padding: 7px 8px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--panel2)
  }

  .mini-card small {
    display: block;
    color: var(--accent);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 2px
  }

  .mini-card strong {
    font-size: 9px;
    line-height: 1.25;
    display: block;
    color: var(--text)
  }

  .quick-links {
    margin-top: 4px;
    flex-shrink: 0;
    padding-top: 4px
  }

  .quick-links a {
    padding: 4px 6px;
    font-size: 9.5px;
  }

  .quick-links a.active {
    padding-left: 8px;
  }

  .socials {
    padding: 6px 0 4px;
    flex-shrink: 0;
    gap: 4px
  }

  .socials a {
    width: 26px;
    height: 26px;
    border-radius: 7px
  }

  .socials svg {
    width: 12px
  }

  .resume {
    flex-shrink: 0;
    padding: 8px 9px;
    font-size: 9.5px;
    border-radius: 8px
  }

  .sidebar-scroll>p[data-i18n="resume_note"] {
    margin: 3px 0 0 !important;
    font-size: 7px !important;
    line-height: 1.2 !important
  }

  .content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--line2) transparent;
    padding: 22px 26px
  }

  .content::-webkit-scrollbar {
    width: 5px
  }

  .content::-webkit-scrollbar-thumb {
    background: var(--line2);
    border-radius: 99px
  }

  .content::-webkit-scrollbar-track {
    background: transparent
  }
}

@media(min-width:1100px) {
  .shell {
    height: calc(100vh - 28px);
    margin: 14px auto
  }

  .sidebar-scroll {
    padding: 14px 16px 12px
  }

  .avatar-wrap {
    width: 76px;
    height: 76px
  }

  .avatar {
    width: 66px;
    height: 66px
  }

  h1 {
    font-size: 18px
  }

  .bio {
    display: block;
    overflow: visible;
    margin: 6px auto 10px;
    font-size: 10.5px;
    line-height: 1.55
  }
}

@media(max-height:720px) {
  .avatar-wrap {
    width: 58px;
    height: 58px
  }

  .avatar {
    width: 48px;
    height: 48px
  }

  h1 {
    font-size: 15px
  }

  .bio {
    font-size: 9.5px !important;
    line-height: 1.45 !important
  }
}

.avatar-wrap {
  position: relative;
  width: 122px;
  height: 122px;
  margin: 0 auto 16px
}

.avatar {
  position: relative;
  z-index: 2;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--panel);
  margin: 6px;
  box-shadow: 0 0 0 2px var(--accent), 0 15px 45px rgba(0, 0, 0, .45)
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(37, 99, 235, .34);
  border-radius: 50%;
  animation: spin 10s linear infinite
}

.o1 {
  transform: rotate(20deg) scale(1.08)
}

.o2 {
  transform: rotate(-35deg) scale(1.18);
  animation-duration: 14s;
  border-style: dashed;
  opacity: .7
}

.status {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 7.5px;
  color: #a9b0bb;
  letter-spacing: .14em;
  line-height: 1.4;
  text-align: center;
  max-width: 220px;
  margin: 0 auto 10px
}

.status span:first-child {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #58d58b;
  box-shadow: 0 0 10px rgba(88, 213, 139, .6);
  animation: pulse 1.8s infinite
}

h1 {
  font-size: 25px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -.04em
}

.role-line {
  margin: 5px 0 9px;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px
}

.caret {
  opacity: .65;
  animation: blink 1s step-end infinite
}

.roles,
.chips,
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center
}

.roles span,
.chips span,
.tags span {
  border: 1px solid var(--line2);
  background: var(--panel2);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  color: #cbd1da;
  transition: .22s
}

.light .roles span,
.light .chips span,
.light .tags span {
  color: #46505c
}

.roles span:hover,
.chips span:hover,
.tags span:hover {
  border-color: rgba(37, 99, 235, .55);
  transform: translateY(-2px);
  color: var(--accent)
}

.bio {
  color: var(--muted);
  margin: 14px 3px 20px;
  line-height: 1.65
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px
}

.mini-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2);
  transition: transform .25s, border-color .25s, box-shadow .25s
}

.mini-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .38);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .13)
}

.mini-card.wide {
  grid-column: 1/-1
}

.mini-card small {
  display: block;
  color: var(--muted2);
  font-size: 9px;
  margin-bottom: 3px
}

.mini-card strong {
  font-size: 10px;
  line-height: 1.35
}

.quick-links {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 8px
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  transition: .22s
}

.light .quick-links a {
  border-bottom-color: rgba(0, 0, 0, .03)
}

.quick-links a span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800
}

.quick-links a svg {
  margin-left: auto;
  width: 13px;
  opacity: .6
}

.quick-links a:hover {
  color: var(--text);
  padding-left: 8px
}

.quick-links a.active {
  color: var(--text);
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .32);
  border-radius: 8px;
  padding-left: 8px;
  font-weight: 600
}

.quick-links a.active svg {
  opacity: 1;
  color: var(--accent);
  transform: translate(2px, -2px)
}

.light .quick-links a.active {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .28);
  color: var(--text)
}

.socials {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 8px
}

.socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #e6e9ee;
  transition: .22s;
  background: var(--panel2)
}

.light .socials a {
  color: #2e3440
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px) rotate(2deg);
  background: rgba(37, 99, 235, .08)
}

.socials svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.9
}

.social-icon-img {
  width: 14px;
  height: 14px;
  display: block;
  filter: none;
  transition: .2s
}

.resume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  padding: 12px;
  font-weight: 800;
  font-size: 11px;
  transition: .25s;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .16)
}

.resume:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 36px rgba(37, 99, 235, .28)
}

.resume svg {
  width: 15px
}

.resume span {
  margin-left: auto
}

.content {
  padding: 32px
}

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 99999;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font: 700 14px Inter, system-ui, sans-serif;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 0;
}

.content section {
  padding: 0 0 34px;
  margin: 0 0 34px;
  border-bottom: 1px solid var(--line)
}

.content section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0
}

/* Reading progress bar — fixed top of viewport */
.scroll-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  background: rgba(255, 255, 255, .04)
}

.light .scroll-progress-wrap {
  background: rgba(0, 0, 0, .06)
}

.scroll-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #336ebd);
  transition: width .08s ease-out;
  box-shadow: 0 0 10px rgba(56, 189, 248, .6)
}

[dir="rtl"] .scroll-progress {
  background: linear-gradient(270deg, var(--accent), var(--accent2))
}

.eyebrow {
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 6px
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -.03em
}

.mark {
  font-size: 16px;
  color: var(--accent);
  font-weight: 900
}

.section-head>p {
  margin: 6px 0 17px;
  color: var(--muted);
  font-size: 11px
}

.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 18px
}

.filter,
.pfilter {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: .2s
}

.filter:hover,
.filter.active,
.pfilter:hover,
.pfilter.active {
  color: var(--accent);
  border-color: rgba(37, 99, 235, .55);
  background: rgba(37, 99, 235, .07)
}

.skill-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 23px
}

.skill-group h3 {
  margin: 0 0 9px;
  color: var(--muted2);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase
}

.skill-group .chips {
  justify-content: flex-start
}

.skill-group.hidden {
  display: none
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.projects-all {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 11px;
  overflow: hidden;
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), border-color .25s, box-shadow .25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.project.hidden {
  display: none;
}

.project:hover,
.project:focus {
  outline: none;
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, .32);
}

.light .project:hover,
.light .project:focus {
  box-shadow: 0 12px 28px -6px rgba(26, 35, 50, .14);
}

.project-image {
  position: relative;
  height: 126px;
  width: 100%;
  overflow: hidden;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project:hover .project-image img {
  transform: scale(1.05);
}

.project-ph {
  background: linear-gradient(135deg, var(--ph1), var(--ph2));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 126px;
  width: 100%;
}

.project-ph:before {
  content: attr(data-ph);
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
  letter-spacing: .04em;
}

.image-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(8, 10, 15, .72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .2s ease;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}

.project:hover .image-overlay {
  opacity: 1;
}

.image-overlay svg {
  width: 13px;
  height: 13px;
  transition: transform .2s ease;
}

.project:hover .image-overlay svg {
  transform: translate(2px, -2px);
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 999px;
  font: 700 11px Inter;
  text-decoration: none;
  transition: .2s
}

.view-all-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: .2s
}

.back-link:hover {
  color: var(--accent)
}

.back-link svg {
  width: 14px;
  height: 14px
}

.project-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(37, 99, 235, .92);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
  pointer-events: none;
  text-transform: uppercase;
}

[dir="rtl"] .project-badge {
  left: auto;
  right: 8px;
}

.project-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.project-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  transition: color .2s;
}

.project:hover .project-title {
  color: var(--accent);
}

.project-date {
  font-size: 9.5px;
  color: var(--muted2);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.proj-cue-arrow {
  width: 12px;
  height: 12px;
  color: var(--muted2);
  flex-shrink: 0;
  transition: transform .2s ease, color .2s;
}

.project:hover .proj-cue-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

[dir="rtl"] .project:hover .proj-cue-arrow {
  transform: translate(-2px, -2px);
}

.project-desc {
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 30px;
}

.project-body .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  justify-content: flex-start;
}

.project-body .tags span {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 2.5px 7px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--line2);
  color: var(--muted);
  transition: .2s;
  white-space: nowrap;
}

.light .project-body .tags span {
  background: #f1f3f6;
  border-color: #dce1e7;
  color: #555f6d;
}

.project:hover .project-body .tags span {
  border-color: rgba(37, 99, 235, .35);
  color: var(--text);
}

.proj-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px
}

.pg-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: .2s
}

.pg-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.pg-btn:disabled {
  opacity: .35;
  cursor: not-allowed
}

.pg-btn svg {
  width: 14px;
  height: 14px
}

.pg-pages {
  display: flex;
  gap: 5px
}

.pg-num {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 8px;
  font: 700 11px Inter;
  cursor: pointer;
  transition: .2s
}

.pg-num:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.pg-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .25)
}

.project.pg-hidden {
  display: none
}

/* project detail — idea A minimal centered */
.project-detail {
  max-width: 920px;
  margin: 0 auto
}

.pd-hero {
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel2)
}

.pd-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.pd-hero-ph {
  background: linear-gradient(135deg, var(--ph1), var(--ph2));
  display: flex;
  align-items: center;
  justify-content: center
}

.pd-hero-ph span:first-child {
  font-size: 42px;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
  letter-spacing: .06em
}

.pd-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(37, 99, 235, .95);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
}

.pd-head {
  margin: 14px 0 10px
}

.pd-head h1 {
  font-size: 22px;
  margin: 4px 0 8px;
  letter-spacing: -.03em
}

.pd-head .tags {
  justify-content: flex-start
}

.pd-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 14px
}

.pd-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0
}

.pd-gallery img,
.pd-gallery .ph {
  height: 150px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden
}

.pd-gallery img {
  width: 100%;
  object-fit: cover;
  display: block
}

.pd-gallery .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 18px Inter;
  color: rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, var(--ph1), var(--ph2))
}

.pd-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0
}

.pd-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font: 700 11px Inter;
  transition: .2s
}

.pd-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.pd-links a.live {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2)
}

.pd-links a.live:hover {
  background: #1d4ed8
}

.pd-links a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0
}

.pd-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px
}

.pd-meta-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2)
}

.pd-meta-box small {
  display: block;
  color: var(--muted2);
  font-size: 8px;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px
}

.pd-meta-box p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6
}

.pd-meta-box .tags {
  justify-content: flex-start
}

.pd-nav {
  display: flex;
  gap: 8px;
  margin-top: 14px
}

.pd-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font: 700 10px Inter;
  transition: .2s
}

.pd-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.pd-nav-btn svg {
  width: 12px;
  height: 12px
}

.timeline {
  position: relative;
  padding-left: 17px
}

.timeline:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 3px;
  width: 1px;
  background: var(--line2)
}

.timeline-item {
  position: relative;
  padding: 0 0 25px 14px
}

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

.dot {
  position: absolute;
  left: -1px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08)
}

.time {
  font-size: 9px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em
}

.timeline-item h3 {
  margin: 5px 0 2px;
  font-size: 13px
}

.company {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px
}

.timeline-item>p:not(.company) {
  color: var(--muted);
  font-size: 10.5px;
  max-width: 680px
}

.timeline-item .tags {
  justify-content: flex-start
}

.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  margin-top: 9px;
  transition: .25s
}

.edu-card:hover {
  transform: translateX(5px);
  border-color: rgba(37, 99, 235, .38)
}

.edu-card h3 {
  font-size: 13px;
  margin: 4px 0
}

.edu-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px
}

.grade {
  font-size: 9px;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, .35);
  border-radius: 999px;
  padding: 5px 8px;
  white-space: nowrap
}

.edu-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px
}

.extra-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  transition: .25s
}

.extra-card:hover {
  border-color: rgba(37, 99, 235, .28)
}

.extra-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px
}

.extra-head h4 {
  margin: 0;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2)
}

.extra-head svg {
  width: 14px;
  height: 14px;
  color: var(--accent)
}

.lang-bars {
  display: grid;
  gap: 11px
}

.lang-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px
}

.lang-meta span:last-child {
  color: var(--accent);
  font-weight: 700;
  font-size: 9px
}

.bar {
  height: 6px;
  background: var(--panel3);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line)
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 99px
}

.soft-chips {
  justify-content: flex-start
}

.soft-note {
  color: var(--muted);
  font-size: 10.5px;
  margin: 10px 0 0;
  line-height: 1.55
}

.courses {
  display: grid;
  gap: 8px
}

.course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 11px;
  transition: .25s
}

.course:hover {
  transform: translateX(5px);
  border-color: rgba(37, 99, 235, .42)
}

.course h3 {
  font-size: 12px;
  margin: 0 0 2px
}

.course p {
  margin: 0;
  color: var(--muted2);
  font-size: 10px
}

.arrow {
  color: var(--accent);
  font-size: 16px
}

.bottom-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px
}

.bottom-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  text-decoration: none;
  transition: .22s
}

.bottom-link:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12)
}

.bl-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--panel3);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--accent);
  flex-shrink: 0
}

.bl-icon svg {
  width: 16px;
  height: 16px
}

.bl-text {
  flex: 1;
  min-width: 0
}

.bl-text strong {
  display: block;
  font-size: 11px;
  color: var(--text);
  line-height: 1.1
}

.bl-text span {
  display: block;
  font-size: 10px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.bl-go {
  width: 14px;
  height: 14px;
  color: var(--muted2);
  flex-shrink: 0
}

/* Contact popup — creative redesign */
#contactModal .modal-box.contact-box {
  padding: 20px 18px 14px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  width: min(560px, calc(100% - 24px))
}

.contact-hero-top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px
}

.contact-hero-top h2 {
  margin: 4px 0 6px;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -.03em
}

.contact-hero-top h2 span {
  color: var(--accent);
  font-style: italic
}

.contact-hero-top p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  max-width: 360px
}

.contact-avatar-mini {
  flex-shrink: 0;
  text-align: center
}

.contact-avatar-mini img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  display: block;
  margin: 0 auto 6px
}

.contact-avail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7.5px;
  letter-spacing: .1em;
  font-weight: 800;
  color: #6ee7a5;
  background: rgba(110, 231, 165, .1);
  border: 1px solid rgba(110, 231, 165, .18);
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap
}

.contact-avail i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58d58b;
  box-shadow: 0 0 8px rgba(88, 213, 139, .6);
  flex-shrink: 0
}

.contact-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .15), transparent 62%), var(--panel2);
  border: 1px solid rgba(37, 99, 235, .28);
  text-decoration: none;
  margin-bottom: 10px;
  transition: transform .2s, border-color .2s, box-shadow .2s
}

.contact-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .12)
}

.ci-icon-feature {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  position: relative;
  display: inline-block;
  box-sizing: border-box
}

.ci-icon-feature svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  display: block
}

.cf-text {
  flex: 1;
  min-width: 0
}

.cf-text strong {
  font-size: 12px;
  color: var(--text);
  line-height: 1.1;
  display: block
}

.cf-text span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.cf-copy {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  background: var(--text);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: .2s
}

.contact-feature:hover .cf-copy {
  background: var(--accent);
  color: #fff
}

.contact-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px
}

.contact-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  color: var(--muted2);
  font-size: 8.5px;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase
}

.contact-divider:before,
.contact-divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line)
}

.contact-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 11px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 11px;
  text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
  min-height: 54px
}

.contact-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .35);
  background: var(--panel3)
}

.contact-item.social:hover {
  border-color: rgba(37, 99, 235, .28)
}

.ci-icon {
  width: 32px;
  height: 32px;
  position: relative;
  background: var(--panel3);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  flex-shrink: 0;
  box-sizing: border-box;
  display: inline-block
}

.ci-icon svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  display: block
}

.contact-item div {
  flex: 1;
  min-width: 0
}

.contact-item strong {
  display: block;
  font-size: 11px;
  color: var(--text);
  line-height: 1.1;
  font-weight: 700
}

.contact-item span {
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 1px
}

.ci-go {
  width: 12px;
  height: 12px;
  color: var(--muted2);
  flex-shrink: 0;
  margin-left: auto;
  opacity: .7
}

#contactModal .modal-close {
  top: 12px;
  right: 12px;
  font-size: 20px
}

#confirmModal {
  z-index: 1100
}

/* ── CONFIRM BOX (external link) ── */
.modal-box.confirm-box {
  padding: 22px 22px 20px;
  width: min(480px, calc(100% - 32px));
  background: rgba(15, 18, 24, .88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(38, 44, 56, .6);
  border-radius: 20px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(37, 99, 235, .08)
}

.cf-copy {
  cursor: pointer;
  user-select: none
}

.cf-copy.copied {
  background: #16a34a !important;
  color: #fff !important
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 14px
}

.light .contact-card {
  background: var(--panel2);
  border-color: var(--line)
}

.contact-card h2 {
  margin: 0 0 4px;
  font-size: 19px;
  letter-spacing: -.03em
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5
}

.contact-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  font: 700 11px Inter;
  cursor: pointer;
  transition: all .22s
}

.light .contact-copy-btn {
  background: var(--panel);
  border-color: var(--line2);
  color: var(--text)
}

.contact-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  background: rgba(37, 99, 235, .06)
}

.contact-copy-btn.copied {
  border-color: #58d58b;
  color: #58d58b;
  background: rgba(88, 213, 139, .1)
}

.contact-copy-btn svg {
  width: 13px;
  height: 13px
}

.light .contact-avail {
  color: #15803d;
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .25)
}

.light .contact-avail i {
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, .5)
}

.light .contact-feature {
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), transparent 62%), #f8fafc;
  border-color: rgba(37, 99, 235, .25)
}

.light .contact-item {
  background: #f8fafc;
  border-color: var(--line)
}

.light .contact-item:hover {
  background: #fff;
  border-color: rgba(37, 99, 235, .35)
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: var(--text);
  color: var(--bg);
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1
}

.contact-btn:hover {
  background: var(--accent);
  color: #fff
}

.contact-btn svg {
  width: 14px
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 3px 0 0;
  color: var(--muted2);
  font-size: 9px
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s cubic-bezier(.16, 1, .3, 1), transform .65s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform
}

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

.skill-group:nth-child(2),
.project:nth-child(2),
.timeline-item:nth-child(2),
.edu-card:nth-child(2),
.course:nth-child(2) {
  transition-delay: .06s
}

.skill-group:nth-child(3),
.project:nth-child(3),
.course:nth-child(3) {
  transition-delay: .12s
}

.project:nth-child(4) {
  transition-delay: .18s
}

.project:nth-child(5) {
  transition-delay: .24s
}

.project:nth-child(6) {
  transition-delay: .3s
}

.project:nth-child(7) {
  transition-delay: .36s
}

.project:nth-child(8) {
  transition-delay: .42s
}

.project:nth-child(9) {
  transition-delay: .48s
}

.project:nth-child(10) {
  transition-delay: .54s
}

/* ── MODAL OVERLAY ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease
}

.modal.open {
  opacity: 1;
  pointer-events: auto
}

/* ── MODAL BACKDROP ── */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px)
}

/* ── MODAL BOX (generic) ── */
.modal-box {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 32px));
  max-height: min(85vh, 900px);
  padding: 0;
  border: 1px solid rgba(38, 44, 56, .6);
  background: rgba(15, 18, 24, .82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(37, 99, 235, .08);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  overflow: hidden
}

.modal.open .modal-box {
  transform: translateY(0) scale(1)
}

/* ── MODAL CLOSE BUTTON ── */
.modal-close {
  position: absolute !important;
  right: 16px !important;
  top: 14px !important;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 18, 24, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all .2s ease
}

.modal-close:hover {
  background: rgba(239, 68, 68, .3);
  border-color: rgba(239, 68, 68, .5);
  color: #fff;
  transform: scale(1.08)
}

.modal-box h2 {
  margin: 7px 0 9px;
  font-size: 20px
}

.modal-box p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 14px
}

.modal-box .tags {
  justify-content: flex-start
}

.modal-proj {
  --cat: #2563eb;
  --cat2: #38bdf8;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, .2);
  width: min(940px, calc(100% - 32px));
  max-height: min(85vh, 900px);
  overflow: hidden;
  background: rgba(15, 18, 24, .88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(37, 99, 235, .1);
  transform: translateY(20px) scale(.97);
  opacity: 0;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease
}

.modal.open .modal-proj {
  transform: translateY(0) scale(1);
  opacity: 1
}

.modal-proj.cat-design,
.modal-proj.cat-tools,
.modal-proj.cat-data,
.modal-proj.cat-dev {
  --cat: #2563eb;
  --cat2: #38bdf8
}

.modal-proj .modal-close {
  top: 14px !important;
  right: 14px !important;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 18, 24, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 18px;
  z-index: 50;
  transition: .2s
}

.modal-proj .modal-close:hover {
  background: rgba(239, 68, 68, .45);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.1)
}

.modal-hero {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--panel2);
  border-bottom: 1px solid var(--line)
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.modal-hero-ph {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ph1), var(--ph2))
}

.modal-hero-ph span {
  font-size: 34px;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  letter-spacing: .06em
}

.modal-hero .pd-badge {
  top: 14px;
  left: 14px
}

.modal-proj-head {
  padding: 14px 18px 0
}

.modal-proj-head .eyebrow {
  margin-bottom: 4px;
  font-size: 8px
}

.modal-proj-head h2 {
  margin: 4px 0 6px;
  font-size: 20px;
  letter-spacing: -.035em;
  background: linear-gradient(135deg, var(--text) 60%, color-mix(in srgb, var(--cat) 80%, var(--text)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.modal-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap
}

.modal-date {
  font-size: 10px;
  color: var(--muted2);
  font-weight: 600
}

.modal-proj .cat-pill {
  margin-left: 0;
  font-size: 8px;
  padding: 3px 9px
}

.modal-proj .metric-pill {
  margin-left: 0
}

.modal-proj p {
  padding: 0 18px;
  margin: 10px 0 10px;
  font-size: 11px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.modal-proj .tags {
  padding: 0 18px
}

.modal-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px 0
}

.modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font: 700 10px Inter;
  transition: .2s
}

.modal-links a:hover {
  border-color: var(--cat);
  color: var(--cat);
  transform: translateY(-1px)
}

.modal-links a.live {
  background: var(--cat);
  border-color: var(--cat);
  color: #fff
}

.modal-links a.live:hover {
  filter: brightness(1.08);
  color: #fff
}

.modal-links a svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0
}

.modal-proj-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 18px 18px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--panel2))
}

.modal-go-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--cat), var(--cat2, var(--accent)));
  color: #fff;
  border-radius: 10px;
  font: 800 11px Inter;
  text-decoration: none;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--cat) 38%, transparent);
  transition: .2s
}

.modal-go-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--cat) 45%, transparent);
  filter: brightness(1.06)
}

.modal-go-btn svg {
  width: 14px;
  height: 14px
}

@keyframes spin {
  to {
    transform: rotate(380deg)
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(37, 99, 235, 0), 0 0 22px rgba(37, 99, 235, .6)
  }
}

@keyframes blink {
  50% {
    opacity: 0
  }
}

.pfilter-row {
  margin-bottom: 14px;
  flex-wrap: wrap
}

@media(max-width:900px) {
  .float-controls {
    right: 10px;
    top: auto;
    bottom: 14px;
    transform: none;
    flex-direction: row
  }

  .lang-switch {
    flex-direction: row
  }

  .shell {
    grid-template-columns: 1fr
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .sidebar-scroll {
    position: relative;
    max-height: none
  }

  .quick-links {
    display: none
  }

  .socials {
    margin-top: 12px
  }

  .content {
    padding: 26px 26px 84px
  }

  .skill-groups,
  .projects,
  .projects-all {
    grid-template-columns: 1fr 1fr
  }
}

.metric-pill {
  display: inline-block;
  background: rgba(37, 99, 235, .15);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, .3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-left: 4px
}

.pd-bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 18px 0
}

.pd-bento-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.pd-bento-card .bento-tag {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent)
}

.pd-bento-card strong {
  font-size: 12px;
  color: var(--text);
  line-height: 1.3
}

.pd-bento-card p {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.55
}

.pd-highlights {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px
}

.pd-highlights h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 6px
}

.pd-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.pd-highlights li {
  font-size: 11px;
  color: var(--text);
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 8px
}

.pd-highlights li:before {
  content: "✦";
  color: var(--accent);
  font-weight: 900;
  font-size: 10px;
  line-height: 1.5;
  flex-shrink: 0
}

.pd-next-card {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: .25s
}

.pd-next-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25)
}

.pd-next-info small {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 2px
}

.pd-next-info strong {
  display: block;
  font-size: 13px;
  color: var(--text)
}

.pd-next-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel3);
  border: 1px solid var(--line);
  color: var(--text);
  flex-shrink: 0
}

@media(max-width:720px) {
  .edu-extra {
    grid-template-columns: 1fr
  }

  .bottom-links {
    grid-template-columns: 1fr
  }

  .contact-row2,
  .contact-socials {
    grid-template-columns: 1fr
  }

  .contact-hero-top {
    flex-direction: column
  }

  .contact-avatar-mini {
    display: none
  }
}

@media(max-width:760px) {
  .pd-bento {
    grid-template-columns: 1fr
  }
}

@media(max-width:620px) {
  .shell {
    width: calc(100% - 16px);
    margin: 14px auto 18px
  }

  .content {
    padding: 21px 21px 84px
  }

  .skill-groups,
  .projects,
  .projects-all {
    grid-template-columns: 1fr
  }

  .projects-home {
    max-width: none
  }

  .projects-home .project-image {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .project-image {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .pd-meta {
    grid-template-columns: 1fr
  }

  .pd-hero {
    height: 200px
  }

  .contact-card {
    align-items: flex-start;
    flex-direction: column
  }

  .edu-card {
    align-items: flex-start;
    flex-direction: column
  }

  .grade {
    margin-top: -5px
  }

  .cursor-glow {
    display: none
  }
}

/* Category themes + carousel — unified to portfolio default theme */
.project-detail,
.project-detail.cat-dev,
.project-detail.cat-design,
.project-detail.cat-tools,
.project-detail.cat-data {
  --cat: #2563eb;
  --cat2: #38bdf8;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cat), var(--cat2));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat) 35%, transparent);
  margin-left: 8px;
  vertical-align: middle
}

.cat-pill svg {
  width: 11px;
  height: 11px
}

.pd-cat-hero {
  border-color: color-mix(in srgb, var(--cat) 30%, var(--line))
}

.pd-flow {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px
}

.pd-flow h3 {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted2)
}

.pd-flow-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.pd-flow-step {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel3);
  font-size: 10px;
  font-weight: 700;
  color: var(--text)
}

.pd-flow-step small {
  display: block;
  font-size: 8px;
  color: var(--cat);
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 2px
}

.pd-flow-arrow {
  color: var(--cat);
  font-weight: 900;
  flex-shrink: 0
}

/* ── CAROUSEL (project.html) ── */
.pd-carousel {
  position: relative;
  margin: 14px 0;
  border: 1px solid rgba(38, 44, 56, .6);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 18, 24, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px)
}

.pd-carousel-viewport {
  overflow: hidden;
  position: relative
}

.pd-carousel-track {
  display: flex;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1)
}

.pd-carousel-slide {
  min-width: 100%;
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--panel3)
}

.pd-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease
}

.pd-carousel-slide.ph {
  background: linear-gradient(135deg, var(--ph1), var(--ph2));
  color: rgba(255, 255, 255, .92);
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  padding: 0 18px
}

.pd-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(15, 18, 24, .75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: all .2s ease
}

.pd-carousel-btn:hover {
  background: var(--cat, #2563eb);
  border-color: var(--cat, #2563eb);
  transform: translateY(-50%) scale(1.1)
}

.pd-carousel-btn.prev { left: 14px }
.pd-carousel-btn.next { right: 14px }
.pd-carousel-btn svg { width: 18px; height: 18px }

.pd-carousel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid rgba(38, 44, 56, .6);
  background: rgba(15, 18, 24, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px)
}

.pd-carousel-dots {
  display: flex;
  gap: 6px
}

.pd-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  padding: 0;
  transition: all .25s cubic-bezier(.2, .8, .25, 1)
}

.pd-carousel-dot:hover {
  background: rgba(255, 255, 255, .6);
  transform: scale(1.2)
}

.pd-carousel-dot.active {
  background: var(--cat, #2563eb);
  width: 18px;
  border-radius: 999px;
  transform: none
}

.pd-carousel-count {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(10, 12, 18, .6);
  backdrop-filter: blur(8px);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08)
}

.pd-carousel-cap {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%
}

/* ── HERO CAROUSEL ── */
.pd-hero-carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(38, 44, 56, .6);
  background: rgba(15, 18, 24, .88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .05)
}

.pd-carousel-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 10;
  pointer-events: none;
  transition: width .05s linear
}

.pd-hero-carousel .pd-carousel-viewport {
  overflow: hidden;
  position: relative
}

.pd-hero-carousel .pd-carousel-track {
  display: flex;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
  will-change: transform
}

.pd-hero-carousel .pd-carousel-slide {
  min-width: 100%;
  height: 250px
}

.pd-hero-carousel .pd-badge {
  top: 12px;
  left: 12px
}

.pd-hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 16, 23, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1);
  z-index: 5
}

.pd-hero-count {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #f5f7fa
}

.pd-hero-control {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(13, 16, 23, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  z-index: 5;
}

.pd-autoplay-toggle {
  background: none;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, color .2s;
}

.pd-autoplay-toggle:hover {
  color: #fff;
  transform: scale(1.15);
}

.pd-autoplay-toggle svg {
  width: 12px;
  height: 12px;
}

.pd-hero-count {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #f5f7fa;
}

.pd-overview {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  overflow: hidden
}

.pd-row {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line)
}

.pd-row:last-child {
  border-bottom: 0
}

.pd-row small {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cat, #2563eb);
  margin-bottom: 3px
}

.pd-row p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text)
}

.pd-next {
  display: none
}

/* detail learned card */
.pd-learn-sec {
  margin: 20px 0 4px
}

.pd-learn-sec>.eyebrow {
  margin-bottom: 12px
}

.pd-learn-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, .28);
  background: rgba(16, 185, 129, .05)
}

.pd-learn-ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, .14);
  color: #34d399;
  display: grid;
  place-items: center;
  flex-shrink: 0
}

.pd-learn-ic svg {
  width: 20px;
  height: 20px
}

.pd-learn-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted)
}

/* detail prev / all / next footer */
.pd-prevnext {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 18px
}

.pd-pn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  text-decoration: none;
  color: inherit;
  transition: .2s;
  min-width: 0
}

.pd-pn:hover {
  border-color: var(--cat, #2563eb);
  transform: translateY(-2px)
}

.pd-pn.next {
  flex-direction: row-reverse;
  text-align: right
}

.pd-pn img,
.pd-pn .pn-ph {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0
}

.pd-pn .pn-ph {
  display: grid;
  place-items: center;
  font: 800 14px Inter;
  color: rgba(255, 255, 255, .92)
}

.pd-pn>span {
  min-width: 0;
  flex: 1
}

.pd-pn small {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted2);
  margin-bottom: 2px
}

.pd-pn strong {
  font-size: 12.5px;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.pd-pn-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
  color: var(--accent);
  font: 700 12px Inter;
  text-decoration: none;
  transition: .2s;
  white-space: nowrap
}

.pd-pn-all:hover {
  border-color: var(--cat, #2563eb);
  transform: translateY(-2px)
}

.pd-pn-all svg {
  width: 15px;
  height: 15px
}

@media(max-width:700px) {
  .pd-prevnext {
    grid-template-columns: 1fr 1fr
  }

  .pd-pn-all {
    grid-column: 1/-1;
    justify-content: center
  }
}

@media(max-width:620px) {
  .pd-hero-carousel .pd-carousel-slide {
    height: 190px
  }
}

/* detail hero — pro split: header top, visual + side panel */
.pd-hero2 {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 12px 0 26px;
  padding: 20px;
  border: 1px solid var(--line);
}

.pd-info-top {
  width: 100%;
  max-width: 100%;
}

.pd-info-top .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pd-info-top h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -.032em;
  line-height: 1.12;
  color: var(--text);
  max-width: 720px;
}

.pd-lede {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.55;
  max-width: 720px;
}

.pd-info-top .pd-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  max-width: 720px;
}

/* keep legacy selectors working */
.pd-info .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pd-info h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--text);
}

.pd-info .pd-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px;
  max-width: 740px;
}

.pd-info .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px;
  justify-content: flex-start;
}

.pd-hero-split {
  display: grid;
  grid-template-columns: 1.7fr .85fr;
  gap: 18px;
  align-items: stretch;
}

.pd-side {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.pd-side-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pd-side .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  justify-content: flex-start;
}

.pd-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.pd-side .pd-facts {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.pd-fact {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  transition: transform .2s, border-color .2s;
  min-width: 0;
}

.pd-fact:hover {
  border-color: rgba(37, 99, 235, .4);
  transform: translateY(-2px);
}

.pd-fact-ic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, .1);
  border: 1px solid rgba(37, 99, 235, .25);
  color: var(--accent);
  flex-shrink: 0;
}

.pd-fact-ic svg {
  width: 14px;
  height: 14px;
}

.pd-fact small {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 2px;
}

.pd-fact strong {
  font-size: 11px;
  color: var(--text);
  line-height: 1.4;
  display: block;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pd-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font: 700 12px Inter;
  text-decoration: none;
  transition: .2s;
  cursor: pointer;
  border: 1px solid transparent
}

.pd-btn svg {
  width: 14px;
  height: 14px
}

.pd-btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25)
}

.pd-btn.primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px)
}

.pd-btn.ghost {
  background: var(--panel2);
  border-color: var(--line);
  color: var(--text)
}

.pd-btn.ghost:hover {
  border-color: var(--cat, #2563eb);
  color: var(--cat, #2563eb);
  transform: translateY(-2px)
}

.pd-private {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted2);
  font: 700 11px Inter
}

.pd-visual {
  min-width: 0;
  width: 100%;
}

.pd-visual .pd-hero-carousel {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080a10;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
}

.pd-visual .pd-hero-carousel .pd-carousel-slide {
  height: 440px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px 28px;
  background: #080a10;
}

.pd-visual .pd-carousel-slide .slide-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(.28) saturate(1.3);
  opacity: .8;
  transform: scale(1.15);
  pointer-events: none;
  z-index: 1;
  transition: opacity .4s ease;
}

.pd-visual .pd-carousel-slide img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px -15px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .1);
  display: block;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  cursor: pointer;
}

.pd-visual .pd-carousel-slide:hover img {
  transform: scale(1.018);
}

.pd-visual .pd-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 16, 23, .8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(.88);
  transition: .22s cubic-bezier(.2, .8, .25, 1);
  pointer-events: auto;
}

.pd-visual .pd-zoom-hint svg {
  width: 15px;
  height: 15px;
}

.pd-visual .pd-carousel-slide:hover .pd-zoom-hint {
  opacity: 1;
  transform: scale(1);
}

.pd-visual .pd-zoom-hint:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

/* Carousel interactive thumbnail navigation strip */
.pd-thumb-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
}

.pd-thumb-strip::-webkit-scrollbar {
  height: 4px;
}

.pd-thumb-strip::-webkit-scrollbar-thumb {
  background: var(--line2);
  border-radius: 999px;
}

.pd-thumb-item {
  flex-shrink: 0;
  width: 76px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel2);
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1), border-color .2s, box-shadow .2s, opacity .2s;
  opacity: .5;
}

.pd-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb-item .pd-thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--ph1), var(--ph2));
}

.pd-thumb-item:hover {
  opacity: .85;
  border-color: var(--line2);
  transform: translateY(-2px);
}

.pd-thumb-item.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px rgba(37, 99, 235, .4);
  transform: translateY(-2px);
}

@media(max-width:900px) {
  .pd-hero2 {
    padding: 16px;
  }
  .pd-hero-split {
    grid-template-columns: 1fr;
  }
  .pd-side .pd-facts {
    grid-template-columns: 1fr 1fr;
  }
  .pd-visual .pd-hero-carousel .pd-carousel-slide {
    height: 360px;
    padding: 16px 20px;
  }
}

@media(max-width:580px) {
  .pd-info-top h1,
  .pd-info h1 {
    font-size: 22px;
  }
  .pd-side .pd-facts,
  .pd-facts {
    grid-template-columns: 1fr;
  }
  .pd-visual .pd-hero-carousel .pd-carousel-slide {
    height: 240px;
    padding: 12px;
  }
  .pd-thumb-item {
    width: 60px;
    height: 38px;
  }
}

/* detail numbered sections (01 to 07) */
.pd-sec {
  margin: 22px 0 0
}

.pd-sec>.eyebrow {
  margin-bottom: 10px;
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--muted2);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px
}

.pd-sec>.eyebrow span.num {
  color: var(--cat, #2563eb)
}

.pd-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  padding: 18px;
  transition: border-color .2s
}

.pd-card:hover {
  border-color: color-mix(in srgb, var(--cat, #2563eb) 35%, var(--line))
}

.pd-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted)
}

.pd-card p b {
  color: var(--text)
}

/* 02 contribution */
.pd-contrib {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: flex-start
}

.pd-contrib-role {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  min-width: 180px
}

.pd-contrib-role small {
  font-size: 9px;
  color: var(--muted2);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase
}

.pd-contrib-role strong {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4
}

.pd-contrib-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted)
}

@media(max-width:680px) {
  .pd-contrib {
    grid-template-columns: 1fr;
    gap: 12px
  }

  .pd-contrib-role {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 12px;
    min-width: 0
  }
}

/* 03 features */
.pd-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px
}

.pd-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  transition: .2s
}

.pd-feature-item:hover {
  border-color: rgba(37, 99, 235, .35);
  transform: translateX(3px)
}

.pd-feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--cat, #2563eb);
  flex-shrink: 0;
  margin-top: 2px
}

.pd-feature-item span {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55
}

/* 04 technologies */
.pd-tech-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  padding: 18px
}

.pd-tech-card .tags {
  justify-content: flex-start;
  margin-bottom: 14px
}

.pd-tech-why {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--panel3);
  border: 1px dashed var(--line)
}

.pd-tech-why svg {
  width: 15px;
  height: 15px;
  color: var(--cat, #2563eb);
  flex-shrink: 0;
  margin-top: 2px
}

.pd-tech-why p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted)
}

.pd-tech-why p b {
  color: var(--text)
}

/* 06 result */
.pd-result-card {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  padding: 18px
}

.pd-result-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(37, 99, 235, .12);
  border: 1px solid rgba(37, 99, 235, .3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0
}

.pd-result-stat svg {
  width: 16px;
  height: 16px
}

.pd-result-desc {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0
}

@media(max-width:680px) {
  .pd-result-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px
  }
}

/* detail duo — challenges (red) & solutions (green) */
.pd-duo-sec {
  margin: 22px 0 0
}

.pd-duo-sec>.eyebrow {
  margin-bottom: 10px;
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--muted2);
  font-weight: 800
}

.pd-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.pd-duo-card {
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel2)
}

.pd-duo-card.red {
  background: rgba(239, 68, 68, .05);
  border-color: rgba(239, 68, 68, .28)
}

.pd-duo-card.green {
  background: rgba(16, 185, 129, .05);
  border-color: rgba(16, 185, 129, .28)
}

.pd-duo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 800
}

.pd-duo-card.red .pd-duo-head {
  color: #f87171
}

.pd-duo-card.green .pd-duo-head {
  color: #34d399
}

.pd-duo-head svg {
  width: 16px;
  height: 16px
}

.pd-duo-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px
}

.pd-duo-card.red li {
  position: relative;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55
}

.pd-duo-card.red li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f87171
}

.pd-duo-card.green li {
  display: flex;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55
}

.pd-duo-card.green li svg {
  width: 14px;
  height: 14px;
  color: #34d399;
  flex-shrink: 0;
  margin-top: 2px
}

[dir="rtl"] .pd-duo-card.red li {
  padding-left: 0;
  padding-right: 16px
}

[dir="rtl"] .pd-duo-card.red li:before {
  left: auto;
  right: 0
}

/* detail contact banner */
.pd-cta-sec {
  margin: 20px 0 4px
}

.pd-cta-sec>.eyebrow {
  margin-bottom: 12px
}

.pd-cta-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 14px;
  padding: 16px 18px
}

.pd-cta-ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .3)
}

.pd-cta-ic svg {
  width: 18px;
  height: 18px
}

.pd-cta-tx {
  flex: 1;
  min-width: 0
}

.pd-cta-tx strong {
  display: block;
  font-size: 13.5px;
  color: var(--text)
}

.pd-cta-tx span {
  font-size: 11px;
  color: var(--muted)
}

@media(max-width:700px) {
  .pd-duo {
    grid-template-columns: 1fr
  }

  .pd-cta-banner {
    flex-wrap: wrap
  }
}

/* lightbox — fullscreen image viewer */
/* ── LIGHTBOX (project.html) ── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease
}

.lb.open {
  opacity: 1;
  pointer-events: auto
}

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

.lb-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(15, 18, 24, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f5f7fa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s ease
}

.lb-close:hover {
  background: rgba(239, 68, 68, .3);
  border-color: rgba(239, 68, 68, .5);
  color: #fff
}

.lb-stage {
  position: relative;
  z-index: 2;
  width: min(900px, 92vw);
  max-height: 85vh;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 18, 24, .88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(38, 44, 56, .6);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(37, 99, 235, .08);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  opacity: 0
}

.lb.open .lb-stage {
  transform: translateY(0) scale(1);
  opacity: 1
}

.lb-track {
  display: flex;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1)
}

.lb-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 20px
}

.lb-slide img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  background: #000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
  transition: transform .45s cubic-bezier(.2, .8, .25, 1);
  user-select: none
}

.lb-slide.ph {
  border-radius: 14px;
  min-height: 50vh;
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  background: linear-gradient(135deg, var(--ph1), var(--ph2))
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(15, 18, 24, .75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s ease
}

.lb-btn:hover {
  background: var(--cat, #2563eb);
  border-color: var(--cat, #2563eb)
}

.lb-btn.prev { left: 14px }
.lb-btn.next { right: 14px }
.lb-btn svg { width: 18px; height: 18px }

.lb-foot {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px
}

.lb-dots {
  display: flex;
  gap: 6px
}

.lb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  padding: 0;
  transition: all .25s cubic-bezier(.2, .8, .25, 1)
}

.lb-dot:hover {
  background: rgba(255, 255, 255, .7);
  transform: scale(1.2)
}

.lb-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 999px;
  transform: none
}

.lb-count {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: rgba(10, 12, 18, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: .04em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3)
}

/* zoom interaction on carousel slides */
.pd-carousel-slide {
  cursor: pointer
}

.pd-carousel-slide img {
  transition: transform .5s ease
}

.pd-carousel-slide:hover img {
  transform: scale(1.04)
}

.pd-zoom-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .25s, transform .25s;
  pointer-events: none
}

.pd-carousel-slide:hover .pd-zoom-hint {
  opacity: 1;
  transform: scale(1)
}

.pd-zoom-hint svg {
  width: 14px;
  height: 14px
}

@media(max-width:620px) {
  .lb-btn.prev {
    left: 8px
  }

  .lb-btn.next {
    right: 8px
  }

  .lb-btn {
    width: 38px;
    height: 38px
  }
}

/* ---------- PROJECT POPUP v3 — premium glassmorphic split layout ---------- */
#projectModal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px
}

.modal-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100%
}

.modal-visual {
  position: relative;
  background: radial-gradient(circle at center, #1b202c 0%, #0d0f14 100%);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid color-mix(in srgb, var(--cat) 22%, var(--line))
}

.modal-photo-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  display: flex
}

.modal-photo-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .45s cubic-bezier(.22, .9, .28, 1);
  will-change: transform
}

.modal-photo-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px
}

.modal-photo-slide .slide-bg {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(.32) saturate(1.4);
  opacity: .75;
  transform: scale(1.1);
  pointer-events: none;
  z-index: 1;
  transition: opacity .4s ease
}

.modal-photo-slide img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
  display: block;
  transition: transform .45s cubic-bezier(.2, .8, .25, 1);
  user-select: none
}

.modal-photo-viewport:hover .modal-photo-slide img {
  transform: scale(1.025)
}

.modal-photo-slide.ph {
  position: relative;
  z-index: 2;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ph1), var(--ph2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  width: calc(100% - 32px);
  height: calc(100% - 32px)
}

.modal-photo-slide .image-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: opacity .28s ease, background .28s ease
}

.modal-photo-slide .image-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(15, 18, 24, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .5);
  transform: translateY(6px) scale(.95);
  transition: transform .28s cubic-bezier(.2, .8, .25, 1)
}

.modal-photo-slide .image-overlay svg,
.modal-photo-slide .image-overlay i {
  width: 15px;
  height: 15px;
  flex-shrink: 0
}

.modal-photo-viewport:hover .image-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, .22)
}

.modal-photo-viewport:hover .image-overlay span {
  transform: translateY(0) scale(1)
}

.modal-visual .pd-badge {
  top: 14px;
  left: 14px;
  z-index: 5
}

.modal-photo-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(15, 18, 24, .75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  transition: all .2s ease
}

.modal-photo-btn:hover {
  background: var(--cat);
  border-color: var(--cat);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--cat) 50%, transparent)
}

.modal-photo-btn.prev {
  left: 14px
}

.modal-photo-btn.next {
  right: 14px
}

.modal-photo-btn svg {
  width: 18px;
  height: 18px
}

.modal-photo-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  padding: 5px 10px;
  background: rgba(10, 12, 18, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px
}

.modal-photo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  padding: 0;
  transition: all .25s cubic-bezier(.2, .8, .25, 1)
}

.modal-photo-dot:hover {
  background: rgba(255, 255, 255, .7);
  transform: scale(1.2)
}

.modal-photo-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 999px;
  transform: none
}

.modal-photo-count {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 5;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: rgba(10, 12, 18, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: .04em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3)
}

.modal-info-side {
  display: flex;
  flex-direction: column;
  padding: 24px 28px 22px;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--panel) 0%, color-mix(in srgb, var(--cat) 4%, var(--panel)) 100%)
}

.pd-facts.modal-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 12px 0 4px
}

.modal-proj .modal-info-side .modal-proj-head {
  padding: 0
}

.modal-proj .modal-info-side p {
  padding: 0
}

.modal-proj .modal-info-side .tags {
  padding: 0
}

.modal-proj .modal-info-side .modal-links {
  padding: 12px 0 0
}

.modal-proj .modal-info-side .modal-proj-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: auto;
  padding: 22px 0 2px;
  border-top: 1px solid var(--line)
}

#modalClose2 {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 10px;
  padding: 11px 20px;
  font: 700 11.5px Inter;
  cursor: pointer;
  transition: .2s
}

#modalClose2:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.modal-proj .modal-info-side .modal-go-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cat), var(--cat2, var(--accent)));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--cat) 38%, transparent)
}

.modal-proj .modal-info-side .modal-go-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--cat) 45%, transparent);
  filter: brightness(1.08)
}

.modal-proj .modal-info-side .modal-go-btn svg {
  transition: transform .25s
}

.modal-proj .modal-info-side .modal-go-btn:hover svg {
  transform: translate(3px, -3px)
}

.modal-proj .modal-info-side .modal-links .pd-private {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px dashed var(--line2);
  border-radius: 9px;
  color: var(--muted);
  font: 700 10px Inter;
  text-decoration: none
}

.modal-proj .modal-close {
  background: color-mix(in srgb, var(--panel2) 88%, var(--cat) 12%);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--cat) 22%, var(--line))
}

.modal-proj .modal-close:hover {
  background: var(--cat);
  border-color: var(--cat);
  color: #fff
}

.modal-prevnext {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: min(920px, calc(100% - 32px))
}

.mpn-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: .22s;
  min-width: 0;
  backdrop-filter: blur(8px)
}

.mpn-card.next {
  flex-direction: row-reverse;
  text-align: right
}

.mpn-card:hover {
  border-color: var(--cat, #2563eb);
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--cat, #2563eb) 6%, var(--panel))
}

.mpn-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--panel2);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff
}

.mpn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.mpn-tx small {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--muted2)
}

.mpn-tx strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mpn-counter {
  align-self: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted2);
  white-space: nowrap
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(14px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.modal.open .modal-info-side>* {
  animation: modalRise .45s cubic-bezier(.22, .9, .28, 1) both
}

.modal.open .modal-info-side>*:nth-child(2) {
  animation-delay: .05s
}

.modal.open .modal-info-side>*:nth-child(3) {
  animation-delay: .1s
}

.modal.open .modal-info-side>*:nth-child(4) {
  animation-delay: .15s
}

.modal.open .modal-info-side>*:nth-child(5) {
  animation-delay: .2s
}

.modal.open .modal-info-side>*:nth-child(6) {
  animation-delay: .25s
}

.modal.open .modal-prevnext {
  animation: modalRise .45s .15s both
}

@media(max-width:760px) {
  .modal-proj {
    width: calc(100% - 24px);
    max-height: calc(100vh - 120px);
    overflow-y: auto
  }

  .modal-split {
    grid-template-columns: 1fr
  }

  .modal-visual {
    min-height: 300px;
    height: 300px
  }

  .modal-photo-viewport {
    height: 300px
  }

  .modal-photo-slide {
    padding: 10px
  }

  .modal-info-side {
    overflow: visible;
    padding: 20px 18px 18px
  }

  .mpn-tx strong {
    font-size: 12px
  }

  .modal-prevnext {
    gap: 8px
  }
}

/* Active link styling for scroll spy */
.quick-links a.active {
  color: var(--text);
  padding-left: 8px;
  border-left: 2px solid var(--accent);
  background: rgba(37, 99, 235, .07);
  border-radius: 0 6px 6px 0;
}

.project-detail {
  animation: detailFadeIn .35s cubic-bezier(.2, .8, .25, 1) both;
}

@keyframes detailFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.pd-carousel-slide {
  cursor: pointer
}

/* RTL support for Arabic */
[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', Inter, system-ui, sans-serif
}

/* Role-line typing animation must always be LTR regardless of page direction */
[dir="rtl"] .role-line {
  direction: ltr;
  unicode-bidi: embed;
  text-align: center
}

[dir="rtl"] .shell {
  direction: rtl
}

[dir="rtl"] .sidebar {
  border-right: 0;
  border-left: 1px solid var(--line)
}

[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 17px
}

[dir="rtl"] .timeline:before {
  left: auto;
  right: 3px
}

[dir="rtl"] .timeline-item {
  padding: 0 14px 25px 0
}

[dir="rtl"] .dot {
  left: auto;
  right: -1px
}

[dir="rtl"] .float-controls {
  right: auto;
  left: 18px
}

[dir="rtl"] .resume span {
  margin-left: 0;
  margin-right: auto
}

[dir="rtl"] .quick-links a svg {
  margin-left: 0;
  margin-right: auto
}

[dir="rtl"] .quick-links a:hover {
  padding-left: 4px;
  padding-right: 8px
}

[dir="rtl"] .quick-links a.active {
  padding-left: 4px;
  padding-right: 8px;
  border-left: 0;
  border-right: 2px solid var(--accent);
  border-radius: 6px 0 0 6px;
}

[dir="rtl"] .pd-contrib-role {
  border-right: 0;
  border-left: 1px solid var(--line);
  padding-right: 0;
  padding-left: 18px;
}

[dir="rtl"] .pd-feature-item:hover {
  transform: translateX(-3px)
}

[dir="rtl"] .pd-top-btn svg {
  transform: scaleX(-1)
}

[dir="rtl"] .back-link svg {
  transform: scaleX(-1)
}

[dir="rtl"] .modal-close {
  right: auto !important;
  left: 16px !important
}

[dir="rtl"] #contactModal .modal-close {
  right: auto !important;
  left: 16px !important
}

[dir="rtl"] .modal-proj .modal-close {
  right: auto !important;
  left: 14px !important
}

[dir="rtl"] .ci-go {
  margin-left: 0;
  margin-right: auto;
  transform: scaleX(-1)
}

[dir="rtl"] .pd-pn.prev {
  flex-direction: row-reverse;
  text-align: right
}

[dir="rtl"] .pd-pn.next {
  flex-direction: row;
  text-align: left
}

[dir="rtl"] .mpn-card.prev {
  flex-direction: row-reverse;
  text-align: right
}

[dir="rtl"] .mpn-card.next {
  flex-direction: row;
  text-align: left
}

@media(max-width:900px) {
  [dir="rtl"] .float-controls {
    left: 10px;
    right: auto
  }
}

@media(max-width:680px) {
  [dir="rtl"] .pd-contrib-role {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
    padding-bottom: 12px;
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important
  }

  .reveal {
    opacity: 1;
    transform: none
  }
}

/* ============================================================
   TOOLTIP SYSTEM (Glassmorphism & Micro-animations)
   ============================================================ */
[data-tip] {
  position: relative;
}

/* Elevate hovered tooltip trigger above surrounding elements */
[data-tip]:hover,
[data-tip]:focus-visible {
  z-index: 90;
}

/* Elements that must always retain absolute positioning */
.modal-close,
.modal-close[data-tip],
.pd-carousel-btn,
.pd-carousel-btn[data-tip],
.pd-zoom-hint,
.pd-zoom-hint[data-tip],
.lb-close,
.lb-btn {
  position: absolute !important;
}

/* CSS tooltip pseudo-elements DISABLED — JS position:fixed tooltip system used instead (never clipped by overflow:hidden) */
[data-tip]::after,
[data-tip]::before {
  display: none !important;
}

/* Hide empty tooltips and modal navigation cards */
[data-tip=""]::after,
[data-tip=""]::before,
.modal-prevnext [data-tip]::after,
.modal-prevnext [data-tip]::before {
  display: none !important;
}

/* Filter rows — tooltips shown BELOW buttons (shell overflow:hidden clips anything going upward) */
.filter-row {
  position: relative;
  z-index: 100 !important;
  overflow: visible;
}

.filter-row:hover,
.filter-row:focus-within {
  z-index: 200 !important;
}

.filter,
.pfilter {
  position: relative;
}

.filter:hover,
.pfilter:hover,
.filter:focus-visible,
.pfilter:focus-visible {
  z-index: 300 !important;
}

.project:hover,
.project:focus-within {
  z-index: 40;
}

.skill-group:hover {
  z-index: 35;
}

/* ── PROJECT TOP BAR (back link + prev/next nav) ── */
.pd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px
}

.pd-top-nav {
  position: relative;
  z-index: 20;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 8px
}

.pd-top-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(38, 44, 56, .6);
  background: rgba(15, 18, 24, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: all .2s ease
}

.pd-top-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

.pd-top-btn svg {
  width: 15px;
  height: 15px
}

.pd-top-count {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted);
  background: rgba(10, 12, 18, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap
}

/* Ensure tooltips inside modals are on top of all modal dialog boxes */
.modal [data-tip]::after,
.modal [data-tip]::before {
  z-index: 100005 !important;
}

/* Light Mode */
body.light [data-tip]::after {
  background: rgba(255, 255, 255, 0.96);
  color: #171a20;
  box-shadow: 0 10px 24px -2px rgba(26, 35, 50, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.09);
}

body.light [data-tip]::before {
  border-top-color: rgba(255, 255, 255, 0.96);
}

/* Placement: Bottom */
[data-tip].tip-bottom::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}

[data-tip].tip-bottom::before {
  bottom: auto;
  top: calc(100% + 3px);
  border-top-color: transparent;
  border-bottom-color: rgba(15, 18, 24, 0.94);
  transform: translateX(-50%) translateY(-4px);
}

body.light [data-tip].tip-bottom::before {
  border-bottom-color: rgba(255, 255, 255, 0.96);
}

[data-tip].tip-bottom:hover::after,
[data-tip].tip-bottom:focus-visible::after,
[data-tip].tip-bottom:hover::before,
[data-tip].tip-bottom:focus-visible::before {
  transform: translateX(-50%) translateY(0);
}

/* Placement: Bottom End (Anchors to right in LTR, inward to avoid edge clipping) */
[data-tip].tip-bottom-end::after {
  bottom: auto;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

[data-tip].tip-bottom-end::before {
  bottom: auto;
  top: calc(100% + 3px);
  left: auto;
  right: 12px;
  border-top-color: transparent;
  border-bottom-color: rgba(15, 18, 24, 0.94);
  transform: translateY(-4px);
}

body.light [data-tip].tip-bottom-end::before {
  border-bottom-color: rgba(255, 255, 255, 0.96);
}

[data-tip].tip-bottom-end:hover::after,
[data-tip].tip-bottom-end:focus-visible::after,
[data-tip].tip-bottom-end:hover::before,
[data-tip].tip-bottom-end:focus-visible::before {
  transform: translateY(0);
}

/* Placement: Bottom Start (Anchors to left in LTR, inward to avoid edge clipping) */
[data-tip].tip-bottom-start::after {
  bottom: auto;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  transform: translateY(-4px);
}

[data-tip].tip-bottom-start::before {
  bottom: auto;
  top: calc(100% + 3px);
  left: 14px;
  right: auto;
  border-top-color: transparent;
  border-bottom-color: rgba(15, 18, 24, 0.94);
  transform: translateY(-4px);
}

body.light [data-tip].tip-bottom-start::before {
  border-bottom-color: rgba(255, 255, 255, 0.96);
}

[data-tip].tip-bottom-start:hover::after,
[data-tip].tip-bottom-start:focus-visible::after,
[data-tip].tip-bottom-start:hover::before,
[data-tip].tip-bottom-start:focus-visible::before {
  transform: translateY(0);
}

/* Placement: Left (e.g. for float-controls on right) */
[data-tip].tip-left::after {
  bottom: auto;
  left: auto;
  right: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
}

[data-tip].tip-left::before {
  bottom: auto;
  left: auto;
  right: calc(100% + 3px);
  top: 50%;
  border-top-color: transparent;
  border-left-color: rgba(15, 18, 24, 0.94);
  transform: translateY(-50%) translateX(4px);
}

body.light [data-tip].tip-left::before {
  border-left-color: rgba(255, 255, 255, 0.96);
}

[data-tip].tip-left:hover::after,
[data-tip].tip-left:focus-visible::after,
[data-tip].tip-left:hover::before,
[data-tip].tip-left:focus-visible::before {
  transform: translateY(-50%) translateX(0);
}

/* Placement: Right */
[data-tip].tip-right::after {
  bottom: auto;
  left: calc(100% + 9px);
  right: auto;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
}

[data-tip].tip-right::before {
  bottom: auto;
  left: calc(100% + 3px);
  right: auto;
  top: 50%;
  border-top-color: transparent;
  border-right-color: rgba(15, 18, 24, 0.94);
  transform: translateY(-50%) translateX(-4px);
}

body.light [data-tip].tip-right::before {
  border-right-color: rgba(255, 255, 255, 0.96);
}

[data-tip].tip-right:hover::after,
[data-tip].tip-right:focus-visible::after,
[data-tip].tip-right:hover::before,
[data-tip].tip-right:focus-visible::before {
  transform: translateY(-50%) translateX(0);
}

/* RTL Support for Tooltips */
[dir="rtl"] [data-tip]::after {
  font-family: 'Noto Sans Arabic', Inter, system-ui, sans-serif;
}

/* In RTL, float-controls is on the left side of viewport, so tip-left should flip to tip-right */
[dir="rtl"] .float-controls [data-tip].tip-left::after {
  right: auto;
  left: calc(100% + 9px);
  transform: translateY(-50%) translateX(-4px);
}

[dir="rtl"] .float-controls [data-tip].tip-left::before {
  right: auto;
  left: calc(100% + 3px);
  border-left-color: transparent;
  border-right-color: rgba(15, 18, 24, 0.94);
  transform: translateY(-50%) translateX(-4px);
}

body.light [dir="rtl"] .float-controls [data-tip].tip-left::before {
  border-right-color: rgba(255, 255, 255, 0.96);
}

[dir="rtl"] .float-controls [data-tip].tip-left:hover::after,
[dir="rtl"] .float-controls [data-tip].tip-left:focus-visible::after,
[dir="rtl"] .float-controls [data-tip].tip-left:hover::before,
[dir="rtl"] .float-controls [data-tip].tip-left:focus-visible::before {
  transform: translateY(-50%) translateX(0);
}

/* RTL: In RTL, start/end flip horizontally */
[dir="rtl"] [data-tip].tip-bottom-end::after {
  right: auto;
  left: 0;
}

[dir="rtl"] [data-tip].tip-bottom-end::before {
  right: auto;
  left: 12px;
}

[dir="rtl"] [data-tip].tip-bottom-start::after {
  left: auto;
  right: 0;
}

[dir="rtl"] [data-tip].tip-bottom-start::before {
  left: auto;
  right: 14px;
}

/* Touch devices: disable tooltips to prevent sticking on tap */
@media (hover: none) and (pointer: coarse) {

  [data-tip]::after,
  [data-tip]::before {
    display: none !important;
  }
}

/* Light mode — project modal overrides */
body.light .modal-proj {
  box-shadow: 0 30px 80px rgba(26, 35, 50, .22), 0 0 0 1px color-mix(in srgb, var(--cat) 18%, transparent)
}

body.light .modal-proj .modal-close {
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--cat) 22%, var(--line))
}

body.light .modal-proj .modal-close:hover {
  background: var(--cat);
  color: #fff
}

body.light .modal-visual {
  border-right-color: color-mix(in srgb, var(--cat) 16%, var(--line))
}

body.light .mpn-card {
  background: #fff;
  box-shadow: 0 2px 12px rgba(26,35,50,.06)
}

body.light .mpn-card:hover {
  background: color-mix(in srgb, var(--cat, #2563eb) 5%, #fff)
}

/* Light mode — glass element overrides */
body.light .modal-box,
body.light .modal-proj {
  background: rgba(255, 255, 255, .9);
  border-color: var(--line2)
}

body.light .modal-close {
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  border-color: var(--line)
}

body.light .lb-stage {
  background: rgba(255, 255, 255, .92);
  border-color: var(--line2)
}

body.light .lb-close {
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  border-color: var(--line)
}

body.light .pd-carousel,
body.light .pd-hero-carousel,
body.light .pd-carousel-foot {
  background: rgba(255, 255, 255, .9);
  border-color: var(--line2)
}

body.light .pd-top-btn,
body.light .pd-top-count,
body.light .pd-carousel-count {
  background: rgba(255, 255, 255, .9);
  border-color: var(--line2);
  color: var(--muted)
}