/* ============================================
   Eman Etoom — Portfolio
   Dark Sidebar + Purple Design (V1 Hero Style)
   ============================================ */

:root {
  --primary: #5d5fef;
  --primary-dark: #4a4cd0;
  --primary-light: #8b8cff;
  --accent: #20c997;
  --grad-1: linear-gradient(135deg, #5d5fef 0%, #8b5cf6 50%, #ec4899 100%);
  --grad-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-soft: linear-gradient(135deg, #f6f7ff 0%, #fbf7ff 100%);
  --dark: #1a1d20;
  --text: #495057;
  --text-muted: #6c757d;
  --light: #f8f9fa;
  --border: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 18px 40px rgba(93,95,239,0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --sidebar-width: 280px;
  --sidebar-bg: #0f0f12;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ============================================
   SIDEBAR (DARK, LEFT)
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Decorative AI/DNA background — transparent overlay that does not
   change the sidebar's dimensions and never intercepts pointer events. */
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("../../Assets/img/sidebar-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0.32;
  filter: contrast(1.1) saturate(1.25) brightness(0.85);
  pointer-events: none;
  z-index: 0;
  /* Subtle slow drift animation for an "alive" feel without distraction */
  animation: sidebarBgDrift 28s ease-in-out infinite alternate;
}

/* Soft dark overlay so the image blends into the sidebar and text
   stays readable. Heaviest at the very top (avatar area) and bottom
   (footer/social area) where we need contrast. */
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse at 50% 18%,
      rgba(15, 15, 18, 0.55) 0%,
      rgba(15, 15, 18, 0.30) 30%,
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(15, 15, 18, 0.0) 0%,
      rgba(15, 15, 18, 0.0) 55%,
      rgba(15, 15, 18, 0.45) 85%,
      rgba(15, 15, 18, 0.92) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* Make sure all real sidebar content sits ABOVE the decorative layers */
.sidebar__inner,
.sidebar__profile,
.sidebar__nav,
.sidebar__footer,
.sidebar__avatar,
.sidebar__name,
.sidebar__title-mini,
.sidebar__nav .item a {
  position: relative;
  z-index: 1;
}

@keyframes sidebarBgDrift {
  0%   { background-position: center top;    transform: scale(1.0); }
  100% { background-position: center bottom; transform: scale(1.06); }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .sidebar::before { animation: none; }
}

/* Mobile: hide the decorative background — keep the sidebar solid
   for a cleaner touch experience and to save bandwidth on phones. */
@media (max-width: 991.98px) {
  .sidebar::before,
  .sidebar::after {
    display: none;
  }
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 32px 20px 24px;
}

.sidebar__profile {
  text-align: center;
  margin-bottom: 24px;
}

.sidebar__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #2a2a2e;
  box-shadow: 0 6px 20px rgba(93,95,239,0.25);
  margin-bottom: 14px;
}

.sidebar__name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  margin-bottom: 4px;
}

.sidebar__nameDot { color: var(--primary); }

.sidebar__title-mini {
  color: #a0a0a8;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.sidebar__nav { flex: 1; margin: 8px 0 16px; }
.sidebar__nav ul { list-style: none; }
.sidebar__nav .item { margin: 3px 0; }
.sidebar__nav .item a {
  display: block;
  padding: 10px 18px;
  color: #c8c8d0;
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 6px;
  transition: all 0.25s ease;
  position: relative;
}
.sidebar__nav .item a:hover {
  color: var(--primary);
  background: rgba(93,95,239,0.08);
}
.sidebar__nav .item.item__active a {
  color: #fff;
  font-weight: 500;
  background: linear-gradient(90deg, rgba(93,95,239,0.18) 0%, transparent 100%);
}
.sidebar__nav .item.item__active a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar__footer { padding-top: 16px; border-top: 1px solid #222228; }
.sidebar__social {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0;
}
.sidebar__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1c1c20;
  color: #b0b0b8;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}
.sidebar__social a:hover {
  background: var(--grad-1);
  color: #fff;
  transform: translateY(-2px);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: #0a0a0c; }
.sidebar::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================
   MAIN CONTENT (RIGHT)
   ============================================ */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ============================================
   MOBILE TOP BAR
   ============================================ */
.mobile-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--sidebar-bg);
  z-index: 999;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1a1a1e;
}
.mobile-bar__brand {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.mobile-bar__brand span { color: var(--primary); }
.mobile-bar__toggle { display: none; }
.mobile-bar__icon {
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-bar__nav {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(15,15,18,0.97);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-bar__nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-bar__nav li a {
  display: block;
  padding: 14px 22px;
  color: #c8c8d0;
  border-bottom: 1px solid #1a1a1e;
  font-size: 0.95rem;
}
.mobile-bar__nav li a:hover { color: var(--primary); }
.mobile-bar__toggle:checked ~ .mobile-bar__nav { max-height: 500px; }

/* ============================================
   UTILITIES
   ============================================ */
.section { padding: 100px 0; position: relative; }

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.title-underline {
  width: 70px;
  height: 4px;
  background: var(--grad-1);
  border-radius: 4px;
  margin: 16px auto 0;
}

.grad-text {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-gradient {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: 50px;
  font-weight: 500;
  padding: 0.65rem 1.4rem;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-gradient {
  background: var(--grad-1);
  color: #fff !important;
  border: 2px solid transparent;
  box-shadow: 0 6px 18px rgba(93,95,239,0.32);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(93,95,239,0.45);
  color: #fff !important;
}

.btn-outline-gradient {
  background: #fff;
  color: var(--primary);
  border: 2px solid;
  position: relative;
}
.btn-outline-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: var(--grad-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btn-outline-gradient:hover {
  background: var(--grad-1);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(93,95,239,0.35);
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
  min-height: calc(100vh - 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(93,95,239,0.08) 0, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236,72,153,0.06) 0, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--grad-1);
  filter: blur(120px);
  opacity: 0.16;
  top: -120px;
  right: -100px;
  z-index: 0;
}

.hero-section::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20c997, #5d5fef);
  filter: blur(110px);
  opacity: 0.13;
  bottom: -120px;
  left: -100px;
  z-index: 0;
}

.hero-section .container { position: relative; z-index: 2; }

.hero-photo-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 0.5rem;
}

.hero-photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--grad-1);
  z-index: 0;
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 20px 50px rgba(93,95,239,0.28);
}

.status-dot {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  background: #20c997;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px rgba(32,201,151,0.3);
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.4rem;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-role {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.1rem;
  min-height: 2.2em;
}

.hero-role .typed::after {
  content: '|';
  display: inline-block;
  margin-left: 4px;
  animation: blink 0.7s infinite;
  color: var(--primary);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.6rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-social { margin-top: 1rem; }

.hero-social li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  border: 2px solid rgba(93,95,239,0.18);
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.hero-social li a:hover {
  background: var(--grad-1);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(93,95,239,0.35);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  animation: scrollBounce 1.6s ease-in-out infinite;
}

.scroll-down i { font-size: 1.4rem; color: var(--primary); }

@keyframes scrollBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ============================================
   ABOUT
   ============================================ */
.section-about { background: #fff; }

.about-photo-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.about-photo {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.about-photo-deco {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--grad-1);
  z-index: 0;
  transform: translate(20px, 20px);
  opacity: 0.85;
}

.about-photo-wrap::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-lg);
  bottom: -25px;
  left: -25px;
  z-index: 0;
}

.about-h3 {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
}

.about-lead { font-size: 1.02rem; color: var(--text); margin-bottom: 1rem; line-height: 1.75; }

#about p { line-height: 1.75; margin-bottom: 1rem; color: var(--text); }

#about p strong { color: var(--primary-dark); font-weight: 600; }

/* ============================================
   Collapsible About Me block
   Structure:
     <div class="about-block" data-collapsed="true">
       <p class="about-block__p">…</p>
       <p class="about-block__p">…</p>
       <p class="about-block__p">…</p>
       <p class="about-block__p">…</p>
     </div>
     <button class="about-readmore">Read more</button>
   - All paragraphs are visually connected (one block)
   - data-collapsed="true"  → block clamped to ~20 lines + fade overlay
   - data-collapsed="false" → full text shown, no clamp
   - JS measures the natural height, then animates max-height
   - Button lives OUTSIDE the block so it stays clickable above the fade
   ============================================ */
.about-block {
  position: relative;
  /* max-height is set by JS so the transition has real from/to values */
  overflow: hidden;
  transition: max-height 0.5s ease;
}

/* Soft bottom fade — applied via ::after on the block so the button
   (sibling) is NOT affected. */
.about-block[data-collapsed="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 70%, #fff 100%);
  pointer-events: none;
}

.about-block[data-collapsed="false"]::after {
  display: none;
}

.about-block__p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 1rem 0;
}

.about-block__p:last-of-type {
  margin-bottom: 0;
}

/* "Read more" / "Show less" button — sits below the whole block */
.about-readmore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 4px 0;
  margin: 14px 0 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.about-readmore:hover {
  color: var(--primary-dark);
}

.about-readmore:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.about-readmore i {
  font-size: 0.9em;
  transition: transform 0.3s ease;
}

/* Rotate chevron when expanded */
.about-block[data-collapsed="false"] ~ .about-readmore i {
  transform: rotate(180deg);
}

/* Mobile tweaks */
@media (max-width: 576px) {
  .about-readmore {
    font-size: 0.9rem;
  }
}

/* Print: always show full text, hide button */
@media print {
  .about-block {
    max-height: none !important;
  }
  .about-block::after { display: none !important; }
  .about-readmore { display: none !important; }
}

.info-list { font-size: 0.95rem; }
.info-list > div { padding: 0.35rem 0; color: var(--text); }
.info-list a { color: var(--text); text-decoration: none; }
.info-list a:hover { color: var(--primary); }
.info-list i { font-size: 1.1rem; }

.counter-row { margin-top: 70px !important; }

.counter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.counter-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.counter-num {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.counter-num::after { content: "+"; font-size: 1.8rem; }

.counter-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   SERVICES
   ============================================ */
.section-services { background: var(--grad-soft); }

.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--grad-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-1);
  color: #fff;
  font-size: 1.85rem;
  box-shadow: 0 8px 18px rgba(93,95,239,0.28);
  transition: transform 0.4s ease;
}

.service-card:hover .service-icon { transform: rotate(-6deg) scale(1.05); }

.service-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.service-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ============================================
   RESUME
   ============================================ */
.section-resume { background: #fff; }

.resume-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 32px;
  box-shadow: var(--shadow-sm);
}

.resume-block-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
}

.resume-block-title i {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

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

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary) 0%, var(--primary-light) 50%, transparent 100%);
}

.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(93,95,239,0.15);
}

.timeline-date {
  display: inline-block;
  background: rgba(93,95,239,0.08);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.timeline-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 4px;
}

.timeline-item h5 {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.timeline-item p { color: var(--text); font-size: 0.92rem; margin: 0; }

.skill-cat {
  color: var(--dark);
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.05rem;
  position: relative;
  padding-left: 14px;
}

.skill-cat::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: var(--grad-1);
}

.skill-chip {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: default;
}

.skill-chip:hover {
  background: var(--grad-1);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(93,95,239,0.32);
}

.awards-list { list-style: none; padding: 0; margin: 0; }
.awards-list li {
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.awards-list li:last-child { border-bottom: 0; }
.awards-list i { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

/* ============================================
   PUBLICATIONS
   ============================================ */
.section-portfolio { background: var(--grad-soft); }

.portfolio-filter {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}

.portfolio-filter .btn {
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  border: 0;
  color: var(--text);
  background: transparent;
}

.portfolio-filter .btn:hover { color: var(--primary); }
.portfolio-filter .btn.active {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(93,95,239,0.32);
}

.pub-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: 100%;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.pub-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.pub-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.pub-badge-published { background: rgba(32,201,151,0.15); color: #168f6c; }
.pub-badge-progress { background: rgba(245,158,11,0.15); color: #b76d00; }
.pub-badge-award { background: rgba(236,72,153,0.15); color: #b30e69; }
.pub-badge-highlight { background: rgba(93,95,239,0.12); color: var(--primary); }

.pub-card h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.pub-authors { color: var(--text-muted); font-size: 0.86rem; font-style: italic; margin-bottom: 6px; }
.pub-journal { color: var(--primary); font-size: 0.88rem; font-weight: 500; margin-bottom: 12px; }
.pub-desc { font-size: 0.9rem; color: var(--text); margin-bottom: 14px; flex-grow: 1; }

.pub-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.pub-link:hover { color: var(--primary-dark); text-decoration: underline; }

.highlight-card {
  background: var(--grad-1);
  color: #fff;
}

.highlight-card h5,
.highlight-card li { color: #fff; }
.highlight-card .bi-check2-circle { color: #fff !important; -webkit-text-fill-color: #fff; }

.pub-item { transition: opacity 0.3s ease, transform 0.3s ease; }
.pub-item.hide { display: none; }

/* ============================================
   VISUAL SHOWCASE
   ============================================ */
.section-showcase {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  position: relative;
}

.section-showcase::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--grad-1);
  filter: blur(140px);
  opacity: 0.10;
  top: 10%;
  right: -150px;
  z-index: 0;
  pointer-events: none;
}

.section-showcase .container { position: relative; z-index: 1; }

.showcase-subtitle {
  margin: 50px 0 24px;
}

.showcase-subtitle h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
}

.showcase-subtitle h3 i { font-size: 1.4rem; }

.showcase-subtitle p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 4px 0 0;
  padding-left: 32px;
}

/* ---- Featured Poster ---- */
.showcase-feature {
  margin: 30px 0 50px;
}

.showcase-feature__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-1);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(93,95,239,0.3);
}

.showcase-feature__badge i { font-size: 1rem; }

.showcase-feature__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.showcase-feature__image {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  transition: transform 0.4s ease;
  max-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
}

.showcase-feature__image:hover { transform: translateY(-4px) scale(1.01); }

.showcase-feature__image img {
  width: 100%;
  height: auto;
  max-height: 720px;
  display: block;
  object-fit: contain;
}

.showcase-feature__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,18,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
  text-align: center;
  cursor: pointer;
}

.showcase-feature__image:hover .showcase-feature__overlay { opacity: 1; }

.showcase-feature__overlay i { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.showcase-feature__overlay span { font-size: 1rem; font-weight: 500; letter-spacing: 0.5px; }

.showcase-feature__caption h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 12px;
}

.showcase-feature__caption p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

.showcase-tag {
  display: inline-block;
  background: rgba(93,95,239,0.1);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.showcase-credit {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
}

.showcase-credit i {
  color: var(--primary);
  font-size: 0.75rem;
}

/* ---- Certificates ---- */
.cert-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cert-card__ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--grad-1);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(93,95,239,0.3);
}

.cert-card__ribbon--blue { background: linear-gradient(135deg, #0d6efd, #20c997); }
.cert-card__ribbon--purple { background: linear-gradient(135deg, #1a1d20, #5d5fef); }
.cert-card__ribbon--gold  { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1a1d20; }
.cert-card__ribbon--teal  { background: linear-gradient(135deg, #0d9488, #2dd4bf); }

.cert-card__img-wrap {
  background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.cert-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

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

.cert-card__caption {
  padding: 18px 22px 22px;
  background: #fff;
  border-top: 1px solid #f0f0f5;
}

.cert-card__caption h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.4;
}

.cert-card__caption p { line-height: 1.6; }

/* ============================================
   Certificates — moving bar (infinite marquee)
   ============================================ */
.cert-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Soft fade-out on both edges so cards disappear smoothly */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.cert-marquee__track {
  display: flex;
  gap: 22px;
  width: max-content;
  /* Duplicate the cards in HTML → animate from 0 to -50% (one full set)
     for a seamless infinite loop */
  animation: cert-marquee-scroll 40s linear infinite;
  will-change: transform;
}

.cert-marquee:hover .cert-marquee__track {
  animation-play-state: paused;
}

.cert-card--marquee {
  flex: 0 0 320px;
  width: 320px;
  height: 100%;
  text-decoration: none;
  color: inherit;
  animation: cert-marquee-tilt-pause 1s ease both;
}

.cert-card--marquee:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 2;
  /* Prevent the parent's translate from being affected — but our
     marquee uses translateX on the track, not on individual cards,
     so this is fine. */
}

@keyframes cert-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .cert-marquee__track {
    animation: none;
    /* Show both sets side-by-side as a static grid */
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}

/* Slightly smaller cards on mobile */
@media (max-width: 575.98px) {
  .cert-card--marquee {
    flex: 0 0 260px;
    width: 260px;
  }
  .cert-marquee__track { gap: 16px; }
  .cert-marquee { -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%); }
}

/* ---- Masonry Showcase (Pinterest-style) ---- */
/* Pure-CSS column-based masonry. Each card keeps its natural aspect
   ratio; the browser packs them like a masonry wall. No fixed heights
   = no empty padding around small/portrait images. */
.showcase-masonry {
  /* Use CSS columns for true masonry. column-gap is the gutter. */
  column-count: 4;
  column-gap: 14px;
  /* Reset Bootstrap row margins */
  margin: 0;
  padding: 0;
}

.showcase-masonry .figure-card,
.showcase-masonry .lab-photo,
.showcase-masonry .design-card {
  display: block;        /* required for column flow */
  width: 100%;
  margin: 0 0 14px;      /* vertical gap between cards in the same column */
  break-inside: avoid;   /* never split a card across columns */
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  /* No fixed height — let the image drive the card size */
  height: auto;
}

.figure-card:hover,
.lab-photo:hover,
.design-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Image wrappers — no padding, no min-height. The image fills the
   card width and shows at its natural aspect ratio. */
.figure-card__img-wrap,
.design-card__img-wrap,
.lab-photo__img-wrap {
  background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
  padding: 0;
  margin: 0;
  display: block;
  min-height: 0;
  flex-grow: 0;
  overflow: hidden;
}

.figure-card img,
.design-card img,
.lab-photo img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;      /* no cap — natural height for masonry */
  object-fit: cover;     /* fill width; the image's natural aspect
                            ratio decides the card's height */
  display: block;
  transition: transform 0.5s ease;
  border-radius: 0;
}

.figure-card:hover img,
.lab-photo:hover img,
.design-card:hover img { transform: scale(1.04); }

/* ============================================
   Science × Design — true Pinterest masonry
   CSS Grid with auto-flow: dense allows some
   cards to span 2 columns for a featured look.
   ============================================ */
.design-masonry {
  /* Override the column-count of the generic showcase-masonry */
  column-count: unset;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 90px;
  grid-auto-flow: dense;
  gap: 14px;
}

/* Featured (1st card) — tall, spans 2 columns and more rows */
.design-masonry .design-card--featured {
  grid-column: span 2;
  grid-row: span 5;
}

/* Wide card (last) — spans 2 columns but only 3 rows */
.design-masonry .design-card--wide {
  grid-column: span 2;
  grid-row: span 3;
}

/* In CSS Grid masonry, every card has a fixed row height from the grid.
   The image must fill its card (cover) — not keep its natural aspect
   ratio — or the card collapses. */
.design-masonry .design-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.design-masonry .design-card__img-wrap {
  width: 100%;
  height: 100%;
}

.figure-card__caption {
  padding: 14px 18px 18px;
}

.figure-card__tag {
  display: inline-block;
  background: rgba(32,201,151,0.15);
  color: #168f6c;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.figure-card__caption h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  line-height: 1.4;
}

.lab-photo__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
  color: #fff;
  padding: 24px 16px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.lab-photo:hover .lab-photo__caption {
  opacity: 1;
  transform: translateY(0);
}

.lab-photo__caption i { color: var(--primary); }

.design-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(93,95,239,0.95) 100%);
  color: #fff;
  padding: 30px 16px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.design-card:hover .design-card__caption { opacity: 1; }

/* ============================================
   ADDITIONAL PROFESSIONAL SKILLS (Compact)
   ============================================ */
.section-extra-skills {
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
  position: relative;
}

.section-extra-skills::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--grad-1);
  filter: blur(140px);
  opacity: 0.08;
  top: 5%;
  left: -150px;
  z-index: 0;
  pointer-events: none;
}

.section-extra-skills .container { position: relative; z-index: 1; }

/* Filter pills */
.extra-skills-filter {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.extra-skills-filter__btn {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.extra-skills-filter__btn:hover { color: var(--primary); }

.extra-skills-filter__btn.active {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(93,95,239,0.32);
  font-weight: 600;
}

/* Use CSS Grid with auto-fit so items always fill the row properly */
#extraSkillsGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

#extraSkillsGrid .extra-skill-item {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  #extraSkillsGrid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (max-width: 575.98px) {
  #extraSkillsGrid { grid-template-columns: 1fr; }
}

/* Compact card */
.skill-compact {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: 100%;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease both;
}

.skill-compact:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.skill-compact__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
}

.skill-compact__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* image fills card area; text inside is already
                            pre-sized to fit the 4:3 canvas */
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

/* Guard against future long titles overflowing the card */
.skill-compact {
  min-width: 0;
}
.skill-compact__body {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.skill-compact:hover .skill-compact__img img { transform: scale(1.06); }

.skill-compact__cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.skill-compact__body {
  padding: 16px 18px 20px;
  flex-grow: 1;
}

.skill-compact__body h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.35;
}

.skill-compact__body p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* CTA variant */
.skill-compact--cta {
  background: var(--grad-1);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 22px;
  border: none;
}

.skill-compact--cta:hover { transform: translateY(-6px); }

.skill-compact--cta i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.95;
}

.skill-compact--cta h5 {
  color: #fff;
  margin-bottom: 8px;
}

.skill-compact--cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
}

.skill-compact--cta .btn {
  background: #fff;
  color: var(--primary);
  border: 0;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.skill-compact--cta .btn:hover {
  background: #fff;
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.extra-skill-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.extra-skill-item.hide {
  display: none;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CONTACT
   ============================================ */

.contact-info-card {
  background: var(--grad-1);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 30px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  top: -60px; right: -60px;
}

.contact-info-card h4 { font-weight: 600; margin-bottom: 12px; font-size: 1.4rem; }
.contact-info-card .text-muted { color: rgba(255,255,255,0.85) !important; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.contact-item:last-of-type { border-bottom: 0; }

.contact-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.contact-value { font-weight: 500; font-size: 0.98rem; }
.contact-value a { color: #fff; }
.contact-value a:hover { color: rgba(255,255,255,0.85); }

.contact-social { display: flex; gap: 10px; margin-top: 20px; }
.contact-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  transition: all var(--transition);
}

.contact-social a:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-3px);
}

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
}

.form-label { font-weight: 500; color: var(--dark); font-size: 0.9rem; margin-bottom: 6px; }

.form-control {
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  transition: all var(--transition);
  background: #fafbff;
}

.form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(93,95,239,0.12);
}

textarea.form-control { resize: vertical; min-height: 130px; }

.form-status { font-weight: 500; transition: color 0.3s ease; }
.form-status.success { color: #168f6c; }
.form-status.error { color: #d93030; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0f1014;
  color: #d4d6e0;
  padding: 36px 0;
  font-size: 0.9rem;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 6px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--grad-1);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(93,95,239,0.32);
}

.brand-dot { color: var(--primary); font-weight: 700; font-size: 1.5rem; }

.footer-text { color: #9ea1b3; font-size: 0.9rem; }

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #d4d6e0;
  margin: 0 3px;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--grad-1);
  color: #fff;
  transform: translateY(-3px);
}

.footer-copy { color: #6c7080; font-size: 0.85rem; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px 60px;
}

.lightbox--open { opacity: 1; visibility: visible; }

.lightbox__stage {
  max-width: 92%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  line-height: 1;
}

.lightbox__close { top: 24px; right: 24px; font-size: 1.6rem; }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.lightbox__prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__next:hover { transform: translateY(-50%) scale(1.05); }

.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80%;
  background: rgba(0,0,0,0.4);
  padding: 10px 22px;
  border-radius: 50px;
  letter-spacing: 0.3px;
}

@media (max-width: 767.98px) {
  .lightbox { padding: 16px; }
  .lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox__prev, .lightbox__next { width: 40px; height: 40px; }
  .lightbox__caption { font-size: 0.8rem; padding: 8px 16px; }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--grad-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 8px 22px rgba(93,95,239,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { color: #fff; transform: translateY(-3px); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199.98px) {
  :root { --sidebar-width: 240px; }
}

@media (max-width: 991.98px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-100%); }
  .mobile-bar { display: flex; }
  .main-content { margin-left: 0; padding-top: 60px; }
  .section { padding: 70px 0; }
  .hero-section { padding: 60px 0; min-height: calc(100vh - 60px); }
  .hero-photo-wrapper { width: 180px; height: 180px; }
  .scroll-down { display: none; }
}

@media (max-width: 767.98px) {
  .section { padding: 60px 0; }
  .section-title { margin-bottom: 40px; }
  .about-photo-wrap { margin-bottom: 30px; }
  .about-photo-deco { transform: translate(10px, 10px); }
  .about-photo-wrap::before { bottom: -15px; left: -15px; }
  .resume-block { padding: 28px 22px; }
  .contact-info-card,
  .contact-form { padding: 28px 22px; }
  .hero-cta .btn { width: 100%; max-width: 280px; }

  .showcase-feature__inner { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .showcase-feature__caption h3 { font-size: 1.15rem; }
  /* Masonry: drop to 2 columns on tablet */
  .showcase-masonry { column-count: 2; column-gap: 12px; }
  .showcase-masonry .figure-card,
  .showcase-masonry .lab-photo,
  .showcase-masonry .design-card { margin-bottom: 12px; }
  /* Design grid: 2 columns on tablet, featured spans 1 col */
  .design-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 80px;
  }
  .design-masonry .design-card--featured,
  .design-masonry .design-card--wide { grid-column: span 1; grid-row: span 4; }
}

@media (max-width: 575.98px) {
  .hero-photo-wrapper { width: 150px; height: 150px; }
  .hero-name { font-size: 2.1rem; }
  .timeline { padding-left: 28px; }
  .timeline-dot { left: -24px; }
  /* Masonry: 2 columns on phone too, slightly tighter gap */
  .showcase-masonry { column-count: 2; column-gap: 10px; }
  .showcase-masonry .figure-card,
  .showcase-masonry .lab-photo,
  .showcase-masonry .design-card { margin-bottom: 10px; }
  .design-masonry {
    grid-template-columns: 1fr;
    grid-auto-rows: 100px;
  }
  .design-masonry .design-card--featured,
  .design-masonry .design-card--wide { grid-column: span 1; grid-row: span 3; }
}
