/* ── SPACING SCALE ── */
:root {
  /* Font scale */
  --text-xs:   0.72rem;   /* labels, tags, meta */
  --text-sm:   0.82rem;   /* small body, buttons */
  --text-base: 0.95rem;   /* body text */
  --text-lg:   1rem;      /* card titles, nav */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 3.5rem;
  --space-2xl: 7rem;
}

/* ── LIGHT THEME ── */
:root,
[data-theme="light"] {
  --bg: #f4f3ef;
  --bg2: #eeede8;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink2: #3a3a3a;
  --ink3: #7a7a7a;
  --border: rgba(10, 10, 10, 0.1);
  --accent: #1a56db;
  --accent-light: #dce9ff;
  --accent-hover: #1344b8;
  --tag-bg: #e8e7e2;
  --nav-bg: rgba(244, 243, 239, 0.88);
  --toggle-icon: "☀️";
}

/* ── DARK THEME ── */
[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg2: #141414;
  --card: #1a1a1a;
  --ink: #f0f0f0;
  --ink2: #a8a8a8;
  --ink3: #606060;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #4f8ef7;
  --accent-light: rgba(79, 142, 247, 0.13);
  --accent-hover: #6fa3f9;
  --tag-bg: #222222;
  --nav-bg: rgba(13, 13, 13, 0.88);
  --toggle-icon: "🌙";
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  transition:
    background 0.35s ease,
    color 0.35s ease;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── SCROLL PROGRESS ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    box-shadow 0.3s ease,
    background 0.35s ease;
}

nav.scrolled {
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 50%;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.nav-logo-img:hover {
  transform: rotate(15deg) scale(1.05);
}

[data-theme="dark"] .nav-logo-img {
  filter: invert(1);
}

.nav-brand span {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ink2);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--accent);
  background: var(--accent-light);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 1.5rem 2rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: var(--ink2);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.nav-active {
  color: var(--accent);
}

/* ── LAYOUT ── */
section {
  padding: var(--space-2xl) 0;
  scroll-margin-top: 64px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: "";
  flex: 0 0 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--ink3);
  font-size: var(--text-lg);
  max-width: 600px;
  margin-bottom: 3.5rem;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

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

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(26, 86, 219, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-badge {
  border-color: rgba(79, 142, 247, 0.25);
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

[data-theme="dark"] .hero-badge::before {
  background: var(--accent);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.hero-name {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-name .accent {
  color: var(--accent);
}

.hero-title {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--ink3);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.hero-bio {
  color: var(--ink2);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}

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

.hero-img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-img-frame {
  width: 340px;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero-img-frame {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.hero-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.hero-img-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--card);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  font-size: 0.8rem;
  font-weight: 600;
}

[data-theme="dark"] .hero-img-badge {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-img-badge .num {
  font-family: "Unbounded", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  display: block;
}

.hero-dots {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 80px;
  height: 80px;
  background-image: radial-gradient(var(--border) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
}

.hero-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  right: -52px;
  top: 50%;
  transform: translateY(-50%);
}

.hero-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero-social a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.1);
}

.hero-bg-text {
  position: absolute;
  bottom: 2rem;
  right: 0;
  left: 0;
  text-align: center;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(4rem, 14vw, 12rem);
  font-weight: 900;
  color: rgba(10, 10, 10, 0.025);
  letter-spacing: -0.04em;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

[data-theme="dark"] .hero-bg-text {
  color: rgba(255, 255, 255, 0.025);
}

/* ── ABOUT ── */
#about {
  background: var(--bg2);
}

.about-grid {
  display: block;
}

.about-content p {
  color: var(--ink2);
  margin-bottom: 1.25rem;
  font-size: var(--text-base);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.highlight-card {
  background: var(--card);
  border-radius: 12px;
  padding: var(--space-md);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.highlight-card .icon {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.highlight-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.highlight-card p {
  font-size: 0.78rem;
  color: var(--ink3);
  margin: 0;
}

/* ── TECH STACK ── */
#tech {
  background: var(--bg);
  padding: var(--space-2xl) 0;
}

.tech-scroll {
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.tech-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scroll-left 30s linear infinite;
}

.tech-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.tech-icon-card {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.tech-icon-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.tech-icon-card img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.tech-icon-card span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink2);
}

/* ── SKILLS ── */
#skills {
  background: var(--bg2);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
  transform: translateY(-3px);
}

[data-theme="dark"] .skill-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.skill-card-title {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-card-title::before {
  content: "#";
  opacity: 0.5;
}

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

/* Skill level color palette */
:root {
  --skill-expert:        #059669;
  --skill-expert-bg:     rgba(5,150,105,0.12);
  --skill-advanced:      #1a56db;
  --skill-advanced-bg:   rgba(26,86,219,0.12);
  --skill-intermediate:  #d97706;
  --skill-intermediate-bg: rgba(217,119,6,0.12);
  --skill-beginner:      #333333;
  --skill-beginner-bg:   rgba(200,200,200,0.3);
}
[data-theme="dark"] {
  --skill-expert:        #10b981;
  --skill-expert-bg:     rgba(16,185,129,0.15);
  --skill-advanced:      #93c5fd;
  --skill-advanced-bg:   rgba(79,142,247,0.15);
  --skill-intermediate:  #fbbf24;
  --skill-intermediate-bg: rgba(245,158,11,0.15);
  --skill-beginner:      #e0e0e0;
  --skill-beginner-bg:   rgba(100,100,100,0.2);
}

.tag {
  background: var(--tag-bg);
  color: var(--ink2);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.tag.expert {
  background: var(--skill-expert-bg);
  color: var(--skill-expert);
}

.tag.advanced {
  background: var(--skill-advanced-bg);
  color: var(--skill-advanced);
}

.tag.intermediate {
  background: var(--skill-intermediate-bg);
  color: var(--skill-intermediate);
}

.tag.beginner {
  background: var(--skill-beginner-bg);
  color: var(--skill-beginner);
}

/* ── SKILL FILTER BUTTONS ── */
.skill-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.skill-filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--card);
  transition: all 0.2s ease;
  color: var(--ink2);
}

.skill-filter-btn[data-level="all"] {
  border-color: var(--border);
  color: var(--ink2);
}
.skill-filter-btn[data-level="all"].active,
.skill-filter-btn[data-level="all"]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.skill-filter-btn[data-level="expert"] {
  background: var(--skill-expert-bg);
  color: var(--skill-expert);
  border-color: transparent;
}
.skill-filter-btn[data-level="expert"].active,
.skill-filter-btn[data-level="expert"]:hover {
  border-color: var(--skill-expert);
}

.skill-filter-btn[data-level="advanced"] {
  background: var(--skill-advanced-bg);
  color: var(--skill-advanced);
  border-color: transparent;
}
.skill-filter-btn[data-level="advanced"].active,
.skill-filter-btn[data-level="advanced"]:hover {
  border-color: var(--skill-advanced);
}

.skill-filter-btn[data-level="intermediate"] {
  background: var(--skill-intermediate-bg);
  color: var(--skill-intermediate);
  border-color: transparent;
}
.skill-filter-btn[data-level="intermediate"].active,
.skill-filter-btn[data-level="intermediate"]:hover {
  border-color: var(--skill-intermediate);
}

.skill-filter-btn[data-level="beginner"] {
  background: var(--skill-beginner-bg);
  color: var(--skill-beginner);
  border-color: transparent;
}
.skill-filter-btn[data-level="beginner"].active,
.skill-filter-btn[data-level="beginner"]:hover {
  border-color: var(--skill-beginner);
}

/* ── EXPERIENCE ── */
#experience {
  background: var(--bg);
}

.timeline {
  position: relative;
}

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

.exp-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: var(--space-xl);
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.2);
}

.exp-header {
  margin-bottom: 1rem;
}

.exp-company {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.exp-company a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.exp-company a:hover {
  color: var(--accent);
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink3);
  margin-bottom: 0.5rem;
}

.exp-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.exp-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.role-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.exp-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.exp-section-title {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem 0.6rem;
}

.exp-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 1.5rem 0;
}

.exp-acc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1.5rem 0.5rem;
}

.exp-acc-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.65;
}

.exp-acc-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 2px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.5rem 1.5rem;
}

.tool-tag {
  font-family: "JetBrains Mono", monospace;
  background: var(--tag-bg);
  color: var(--ink2);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* ── PROJECTS ── */
#projects {
  background: var(--bg2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

[data-theme="dark"] .project-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--accent-light), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}

.project-img-thumb {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-img-thumb:hover img {
  transform: scale(1.02);
}

.project-img-thumb .thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.project-img-thumb:hover .thumb-overlay {
  background: rgba(0, 0, 0, 0.45);
}

.project-img-thumb .thumb-overlay span {
  opacity: 0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.3s ease;
}

.project-img-thumb:hover .thumb-overlay span {
  opacity: 1;
}

.project-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-year {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.project-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  margin-top: -0.5rem;
}

[data-theme="dark"] .project-active-badge {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.25);
}

.project-active-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

[data-theme="dark"] .project-active-badge::before {
  background: #4ade80;
}

.project-title {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--ink2);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.project-icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink2);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.project-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.project-icon-overview {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
.project-icon-overview:hover {
  background: var(--accent);
  color: #fff;
}
.project-link-dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.project-link-dark:hover {
  opacity: 0.8;
  color: var(--bg);
}
.project-link-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.project-link-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ── CERTIFICATIONS ── */
#certifications {
  background: var(--bg);
}

.certs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.certs-filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink2);
  transition: all 0.25s ease;
}
.certs-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.certs-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.certs-show-more {
  text-align: center;
  margin-top: 2rem;
}
.cert-card.cert-hidden {
  display: none;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .cert-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cert-icon {
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
}

.cert-title {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
}

.cert-issuer {
  font-size: 0.75rem;
  color: var(--ink3);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cert-date {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: 1rem;
}

.cert-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── CONTACT ── */
#contact {
  background: var(--bg2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--ink2);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(6px);
}

.contact-link .icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-link .info strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-link .info span {
  font-size: 0.78rem;
  color: var(--ink3);
}

.contact-form {
  background: var(--card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.4);
  padding: 2.5rem 0 5.5rem 0;
  text-align: center;
  font-size: 0.8rem;
}

[data-theme="dark"] footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
}

footer strong {
  color: rgba(255, 255, 255, 0.85);
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

footer .footer-links a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s;
}

footer .footer-links a:hover {
  color: #fff;
}

/* ── BACK TO TOP ── */
#back-top {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#back-top.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#back-top:hover {
  background: var(--accent);
  transform: translateX(-50%) translateY(-2px);
}

/* ── DRAWER TABS ── */
.drawer-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -1.75rem 1.5rem;
  padding: 0 1.75rem;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.drawer-tabs::-webkit-scrollbar { display: none; }

.drawer-tab-btn {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: "Manrope", sans-serif;
  white-space: nowrap;
}

.drawer-tab-btn:hover {
  color: var(--accent);
}

.drawer-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.drawer-tab-panel {
  display: none;
}

.drawer-tab-panel.active {
  display: block;
}

/* Roadmap styles */
.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s;
}

.roadmap-item:hover {
  border-color: var(--accent);
}

.roadmap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.roadmap-dot.done {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.roadmap-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(79, 142, 247, 0.5);
  animation: pulse-dot 2s infinite;
}

.roadmap-dot.planned {
  background: var(--border);
  border: 2px solid var(--ink3);
}

.roadmap-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.roadmap-sublabel {
  font-size: 0.74rem;
  color: var(--ink3);
  margin-top: 0.15rem;
}

.roadmap-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.roadmap-badge.done {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.roadmap-badge.active {
  background: rgba(79, 142, 247, 0.13);
  color: var(--accent);
}

.roadmap-badge.planned {
  background: var(--tag-bg);
  color: var(--ink3);
}

[data-theme="dark"] .roadmap-badge.done {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
}

[data-theme="dark"] .roadmap-dot.done {
  background: #4ade80;
}

/* ── DRAWER PANEL ── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.35s ease;
}

.drawer-backdrop.open {
  background: rgba(0, 0, 0, 0.25);
  pointer-events: all;
}

[data-theme="dark"] .drawer-backdrop.open {
  background: rgba(0, 0, 0, 0.5);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  width: min(480px, 100vw);
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="dark"] .drawer {
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 1.75rem 1.25rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.drawer-type-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
}

.drawer-title {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.drawer-subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--ink3);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.drawer-close:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
  scroll-behavior: smooth;
}

.drawer-body::-webkit-scrollbar {
  width: 4px;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.drawer-section {
  margin-bottom: 2rem;
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.drawer-section-title {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-section-title::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--ink3);
}

.drawer-desc {
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.8;
}

.case-study-quote {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink2);
  line-height: 1.6;
}
.case-study-quote .fa-quote-left {
  color: var(--accent);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  opacity: 0.7;
}

.drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.drawer-list li {
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.65;
  padding-left: 1.2rem;
  position: relative;
}

.drawer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

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

.drawer-tag {
  font-family: "JetBrains Mono", monospace;
  background: var(--tag-bg);
  color: var(--ink2);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.drawer-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
}

.drawer-kv-key {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink3);
  white-space: nowrap;
}

.drawer-kv-val {
  font-size: 0.82rem;
  color: var(--ink2);
}

.drawer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.drawer-badge.active-dev {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}
[data-theme="dark"] .drawer-badge.active-dev {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.25);
}
.drawer-badge.active-dev::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
[data-theme="dark"] .drawer-badge.active-dev::before {
  background: #4ade80;
}

.drawer-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: var(--card);
}

.drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
}

.drawer-btn-primary {
  background: var(--accent);
  color: #fff;
}

.drawer-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.drawer-btn-ghost {
  background: var(--bg2);
  color: var(--ink2);
  border: 1px solid var(--border);
}

.drawer-btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink3);
}

/* ── IMAGE CAROUSEL ── */
.carousel-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: 1.5rem;
  user-select: none;
}

.carousel-track {
  display: flex;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide .carousel-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-light), var(--bg2));
  color: var(--accent);
  gap: 0.5rem;
}

.carousel-placeholder i {
  font-size: 2.5rem;
}

.carousel-placeholder span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink3);
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1.5rem 1rem 0.75rem;
  text-align: center;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 0 0.25rem;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* cert image preview */
.cert-img-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  background: var(--bg2);
}

.cert-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s;
}

.cert-img-wrap img:hover {
  transform: scale(1.02);
}

.cert-img-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  gap: 0.5rem;
}

.cert-img-placeholder i {
  font-size: 2rem;
}

.cert-img-placeholder span {
  font-size: 0.75rem;
  color: var(--ink3);
  font-weight: 600;
}

/* "View Details" button on cards */
/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-img-wrap {
    order: -1;
    padding-top: 1.5rem;
  }

  .hero-img-frame {
    width: 260px;
    height: 300px;
  }

  .hero-social {
    display: none;
  }

  .hero-bio {
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  section {
    padding: 5rem 0;
  }

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

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

  .about-highlights {
    grid-template-columns: 1fr 1fr;
  }
}
/* ── CHATBOT ── */
#chatHead {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.chat-head-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.45);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
#chatHead:hover .chat-head-avatar {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(79, 142, 247, 0.55);
}
.chat-head-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px var(--bg);
  animation: pulse-dot 2s infinite;
}
.chat-head-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink2);
  letter-spacing: 0.04em;
  background: var(--card);
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
#chatPanel {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  z-index: 299;
  width: 340px;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
[data-theme="dark"] #chatPanel {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
#chatPanel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.chat-header-name {
  font-size: 0.88rem;
  font-weight: 700;
}
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--ink3);
}
.chat-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}
.chat-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: var(--tag-bg);
  color: var(--ink3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.chat-close-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.chat-msg {
  display: flex;
}
.chat-msg.bot {
  justify-content: flex-start;
}
.chat-msg.user {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: 82%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.chat-msg.bot .chat-bubble {
  background: var(--bg2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-typing .chat-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.7rem 1rem;
}
.chat-typing .chat-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink3);
  display: inline-block;
  animation: chat-bounce 1.2s infinite;
}
.chat-typing .chat-bubble span:nth-child(2) {
  animation-delay: 0.2s;
}
.chat-typing .chat-bubble span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes chat-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
}
.chat-input-wrap {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--card);
}
.chat-input-wrap input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-wrap input:focus {
  border-color: var(--accent);
}

/* iOS Safari: prevent zoom on input focus (font-size must be >= 16px) */
@supports (-webkit-touch-callout: none) {
  .form-group input,
  .form-group textarea,
  .chat-input-wrap input {
    font-size: 16px;
  }
}
.chat-input-wrap button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}
.chat-input-wrap button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}
.chat-input-wrap button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
@media (max-width: 480px) {
  #chatPanel {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 6rem;
  }
  #chatHead {
    right: 1rem;
    bottom: 1rem;
  }
}
/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .tech-track {
    animation: none !important;
  }
}

/* ── COPY EMAIL BUTTON ── */
.copy-email-btn {
  width: 24px; height: 24px;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink3);
  cursor: pointer; font-size: 0.7rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.copy-email-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── CHAT SUGGESTIONS ── */
.chat-suggestions {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 0 0 0.5rem;
}
.chat-suggestion-btn {
  text-align: left;
  padding: 0.45rem 0.85rem;
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.chat-suggestion-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
