/* ==========================================================
   Rakesh Prajapati — Portfolio
   Bootstrap 5.3 (dark colour mode) + custom design layer
   ========================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* colour */
  --pine: #0e2122;        /* page background */
  --pine-2: #12292a;      /* alternate section background */
  --surface: #173335;     /* cards and panels */
  --surface-2: #1d3d3f;   /* raised elements inside cards */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f2f7f6;
  --fog: #a7bdbb;         /* secondary text */
  --mint: #6bfdd9;
  --lime: #f0ff6c;
  --ink: #071415;         /* text on bright accents */
  --accent: linear-gradient(100deg, var(--mint) 0%, var(--lime) 100%);

  /* type */
  --f-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* shape and space */
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --header-h: 80px;
  --section-y: clamp(80px, 9vw, 128px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-bs-theme="dark"] {
  --bs-body-bg: var(--pine);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--fog);
  --bs-border-color: var(--line);
  --bs-body-font-family: var(--f-body);
  --bs-link-color-rgb: 107, 253, 217;
  --bs-link-hover-color-rgb: 240, 255, 108;
  --bs-focus-ring-color: rgba(107, 253, 217, .5);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); }
body {
  background: var(--pine);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mint); color: var(--ink); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
p { color: var(--fog); }
a { text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; box-shadow: none; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 2000;
  background: var(--lime); color: var(--ink); padding: .5rem 1rem; border-radius: var(--r-sm); font-weight: 700;
}

/* ---------- Section scaffolding ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section-alt { background: var(--pine-2); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head > div:first-child { max-width: 640px; }
.section-intro { max-width: 420px; margin: 0; }
.section-intro p { margin-bottom: 1.25rem; }

/* Code-comment section labels: the site's signature detail */
.label {
  font-family: var(--f-mono); font-size: .85rem; font-weight: 500; letter-spacing: .02em;
  color: var(--fog); margin-bottom: 1rem; text-transform: lowercase;
}
.label::before { content: "// "; color: var(--mint); }

.section-title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); margin: 0 0 1.5rem; }
.section-head .section-title { margin: 0; }
.section-title .muted, .muted { color: var(--fog); font-weight: 600; }
.body-lg { font-size: 1.2rem; color: var(--text); line-height: 1.65; }

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-padding-x: 1.4rem; --bs-btn-padding-y: .7rem; --bs-btn-font-size: .98rem;
  font-weight: 700; border-radius: 999px; display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .3s var(--ease), box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn-lg { --bs-btn-padding-x: 1.8rem; --bs-btn-padding-y: .9rem; --bs-btn-font-size: 1.02rem; }
.btn-accent { background: var(--accent); color: var(--ink); border: 0; }
.btn-accent:hover, .btn-accent:focus-visible, .btn-accent:active {
  color: var(--ink) !important; background: var(--accent) !important;
  transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(107, 253, 217, .7);
}
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.btn i { font-size: .95em; }

.round-btn {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 1.15rem;
  transition: all .3s ease;
}
.round-btn:hover:not(:disabled) { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.round-btn:disabled { opacity: .3; cursor: default; }
.works-controls { display: flex; align-items: center; gap: .75rem; }

/* ---------- Header ---------- */
.site-header { padding: 16px 0; transition: padding .35s ease; }
/* The frosted background lives on a separate layer. Putting backdrop-filter on the header itself
   would trap the fixed-position mobile menu inside the header's 60-80px height. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(14, 33, 34, .82);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0; transition: opacity .35s ease;
}
.site-header.scrolled { padding: 8px 0; }
.site-header.scrolled::before { opacity: 1; }
.brand {
  display: inline-flex; align-items: center; gap: .65rem; text-decoration: none;
  color: var(--text); font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: .9rem; font-weight: 800; letter-spacing: 0;
}
.brand-dot { color: var(--lime); }

.navbar > .container { flex-wrap: nowrap; }
.desktop-nav { flex-direction: row; gap: .25rem; margin: 0 auto; }
.desktop-nav .nav-link {
  color: var(--fog); font-weight: 600; font-size: .98rem; padding: .5rem 1rem;
  position: relative; transition: color .25s ease;
}
.desktop-nav .nav-link:hover, .desktop-nav .nav-link.active { color: var(--text); }
.desktop-nav .nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--lime); transform: translateX(-50%) scale(0); transition: transform .3s var(--ease);
}
.desktop-nav .nav-link.active::after { transform: translateX(-50%) scale(1); }

.menu-btn {
  border: 1px solid var(--line-strong); background: transparent; width: 46px; height: 46px; border-radius: 12px; padding: 0;
  color: var(--text); font-size: 1.5rem; display: grid; place-items: center; margin-left: auto;
}
.menu-btn:focus { box-shadow: none; }

/* Mobile menu (a top-level offcanvas, outside the fixed header) */
.mobile-menu { background: var(--pine-2); border-left: 1px solid var(--line) !important; color: var(--text); }
.mobile-menu .offcanvas-body { display: flex; flex-direction: column; }
.mobile-menu .nav-link {
  position: relative; font-family: var(--f-display); font-size: 1.6rem; font-weight: 700;
  color: var(--text); padding: .6rem 0;
}
.mobile-menu .nav-link::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime); transform: translateY(-50%) scale(0); transition: transform .3s var(--ease);
}
.mobile-menu .nav-link.active { color: var(--mint); }
.mobile-menu .nav-link.active::after { transform: translateY(-50%) scale(1); }
.mobile-menu .nav-cta { margin-top: 2rem; align-self: flex-start; }
.offcanvas-foot { margin-top: auto; padding-top: 2rem; display: grid; gap: .35rem; font-size: .95rem; }
.offcanvas-foot a { color: var(--fog); text-decoration: none; padding: .25rem 0; }
.offcanvas-foot a:hover { color: var(--mint); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(14, 33, 34, .96) 0%, rgba(14, 33, 34, .82) 50%, rgba(14, 33, 34, .55) 100%),
    linear-gradient(0deg, var(--pine) 0%, transparent 40%),
    url("../images/banner.jpg") center / cover no-repeat;
}
.hero-particles { position: absolute; inset: 0; z-index: -1; }
.hero-particles canvas { display: block; }

.status-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .95rem .4rem .75rem; border-radius: 999px;
  background: rgba(107, 253, 217, .08); border: 1px solid rgba(107, 253, 217, .25);
  color: var(--text); font-size: .88rem; font-weight: 600; margin-bottom: 1.75rem;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--mint);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.hero-title { margin: 0 0 1.5rem; }
.hero-hello {
  display: block; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600;
  color: var(--fog); letter-spacing: -0.01em; margin-bottom: .35rem;
}
.text-rotator {
  display: grid; font-size: clamp(2.6rem, 1.2rem + 4.6vw, 4.6rem); font-weight: 800;
  line-height: 1; letter-spacing: -0.035em;
}
.text-rotator > span {
  grid-area: 1 / 1; opacity: 0; transform: translateY(.35em);
  background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  padding-bottom: .08em;
}
/* New word waits until the old one has faded out, so the two never overlap */
.text-rotator > span.is-active { opacity: 1; transform: none; transition-delay: .3s; }
@media (min-width: 576px) { .text-rotator > span { white-space: nowrap; } }
.text-rotator > span.is-leaving { opacity: 0; transform: translateY(-.35em); transition-duration: .28s; transition-timing-function: ease-in; }

.hero-lead { font-size: 1.2rem; line-height: 1.65; max-width: 560px; color: var(--text); opacity: .86; margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; margin: 2.75rem 0 0; padding-top: 1.5rem;
  border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: .82rem; color: var(--fog);
}
.hero-meta li { display: inline-flex; align-items: center; gap: .5rem; }
.hero-meta i { color: var(--mint); }

/* Portrait: duotone treatment turns the passport photo's white backdrop into the brand gradient */
.portrait { position: relative; max-width: 420px; margin-inline: auto; }
.portrait-frame {
  position: relative; margin: 0; border-radius: 32px; overflow: hidden; aspect-ratio: 1;
  background: linear-gradient(160deg, var(--mint) 0%, var(--lime) 100%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.portrait-frame img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(1.04);
  mix-blend-mode: multiply;
  transition: filter .6s ease;
}
.portrait-frame:hover img { filter: grayscale(.2) contrast(1.05); }
.portrait-note {
  position: absolute; left: -28px; bottom: 28px; max-width: 230px;
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.1rem; border-radius: var(--r-md);
  background: rgba(14, 33, 34, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7);
}
.portrait-note strong { font-family: var(--f-display); font-size: 2rem; font-weight: 800; line-height: 1; color: var(--lime); }
.portrait-note span { font-size: .8rem; line-height: 1.35; color: var(--fog); }
@media (max-width: 575.98px) {
  .portrait { max-width: 300px; }
  .portrait-note { left: 50%; transform: translateX(-50%); bottom: -24px; width: max-content; max-width: 90%; }
}
@media (max-width: 991.98px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 32px); }
}

/* ---------- Marquee ---------- */
.marquee { background: var(--accent); color: var(--ink); overflow: hidden; padding: 16px 0; position: relative; z-index: 2; }
.marquee-track { display: flex; align-items: center; gap: 1.75rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--f-display); font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.marquee i { font-size: 1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.service-card {
  height: 100%; display: flex; flex-direction: column;
  padding: 2rem 1.85rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .4s ease, background-color .4s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(107, 253, 217, .4); background: var(--surface-2); }
.service-icon {
  width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center;
  font-size: 1.5rem; color: var(--ink); background: var(--accent); margin-bottom: 1.5rem;
}
.service-card h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.service-card > p { font-size: .98rem; margin-bottom: 1.25rem; }
.service-list { margin: 0 0 1.75rem; display: grid; gap: .5rem; font-size: .93rem; color: var(--text); }
.service-list li { display: flex; gap: .6rem; align-items: baseline; }
.service-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); flex-shrink: 0; transform: translateY(-2px); }
.service-cta {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 700; font-size: .95rem; color: var(--mint); text-decoration: none;
  padding-top: 1.25rem; border-top: 1px solid var(--line); width: 100%;
}
.service-cta i { transition: transform .3s var(--ease); }
.service-cta:hover { color: var(--lime); }
.service-cta:hover i { transform: translateX(4px); }

/* ---------- Work ---------- */
/* At-a-glance strip */
.work-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 clamp(2.5rem, 5vw, 4rem); border-block: 1px solid var(--line);
}
.work-strip li { padding: 1.25rem 1.5rem; color: var(--fog); font-size: .95rem; font-weight: 600; }
.work-strip li + li { border-left: 1px solid var(--line); }
.work-strip strong { display: block; font-family: var(--f-display); font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--text); letter-spacing: -0.03em; }
@media (max-width: 767.98px) {
  .work-strip { grid-template-columns: 1fr 1fr; }
  .work-strip li:nth-child(3) { border-left: 0; }
  .work-strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .work-strip li { padding: 1rem; }
}

/* Shared browser frame + scrolling screenshot */
.browser {
  display: block; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; flex-shrink: 0; }
.browser-bar > span:nth-child(2) { background: #febc2e; }
.browser-bar > span:nth-child(3) { background: #28c840; }
.browser-bar em {
  flex: 1; min-width: 0; margin-left: 8px; padding: 2px 10px; border-radius: 6px; font-style: normal; text-align: left;
  font-family: var(--f-mono); font-size: .72rem; color: var(--fog); background: rgba(0, 0, 0, .22);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shot { --h: 260px; display: block; position: relative; height: var(--h); overflow: hidden; background: #fff; }
.shot-lg { --h: 440px; }
.shot img { display: block; width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s ease-out; }
.feature-media:hover .shot img, .work-card:hover .shot img, .work-card:focus-visible .shot img, .is-auto .shot img {
  transform: translateY(calc(-100% + var(--h))); transition: transform var(--scroll-dur, 5s) linear;
}
.shot-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: .4rem .9rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap;
  background: rgba(7, 20, 21, .85); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .3s ease; pointer-events: none;
}
.feature-media:hover .shot-hint, .is-auto .shot-hint { opacity: 0; }
@media (hover: none) { .shot-hint { display: none; } }

/* Featured case studies */
.features { display: grid; gap: clamp(3rem, 7vw, 5.5rem); margin-bottom: clamp(4rem, 8vw, 6rem); }
.feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature-flip .feature-media { order: 2; }
.feature-media { position: relative; }
.feature-media::before {
  content: ""; position: absolute; inset: 12% -4% -6% 8%; z-index: -1; border-radius: 40px;
  background: var(--accent); opacity: .16; filter: blur(40px);
}
.feature-flip .feature-media::before { inset: 12% 8% -6% -4%; }
.feature-kicker { font-family: var(--f-mono); font-size: .8rem; color: var(--mint); margin-bottom: .75rem; }
.feature-body h3 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 1rem; }
.feature-body > p:not(.feature-kicker) { font-size: 1.05rem; margin-bottom: 1.75rem; }
.feature-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1rem 2.25rem; margin: 0 0 2rem; padding: 1.25rem 0; border-block: 1px solid var(--line); }
.feature-meta dt { font-family: var(--f-mono); font-size: .72rem; font-weight: 400; color: var(--fog); margin-bottom: .2rem; }
.feature-meta dd { margin: 0; font-weight: 700; font-size: .95rem; color: var(--text); }
.feature-meta dd.is-live-text { color: var(--mint); }
.feature-meta dd.is-live-text::before { content: "● "; font-size: .7em; vertical-align: .15em; }
.feature-meta dd { word-break: break-word; }
.feature-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 991.98px) {
  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-media { order: 0; }
  .shot-lg { --h: 380px; }
}
@media (max-width: 575.98px) {
  .feature-meta { grid-template-columns: 1fr 1fr; }
  .shot-lg { --h: 320px; }
}

/* Grid + filter chips */
.work-grid-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.work-grid-head h3 { font-size: 1.5rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-weight: 700; font-size: .9rem;
  transition: all .25s ease;
}
.chip span { font-family: var(--f-mono); font-size: .75rem; font-weight: 400; color: var(--fog); }
.chip:hover { border-color: var(--mint); }
.chip.is-active { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.chip.is-active span { color: var(--ink); opacity: .7; }

.work-item.is-hidden { display: none; }
.work-item.is-entering { animation: card-in .45s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }

.work-card {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; text-align: left;
  background: transparent; border: 0; color: var(--text);
}
.work-card .browser { box-shadow: none; transition: transform .4s var(--ease), border-color .4s ease, box-shadow .4s ease; }
.work-card:hover .browser, .work-card:focus-visible .browser {
  transform: translateY(-6px); border-color: rgba(107, 253, 217, .5);
  box-shadow: 0 25px 50px -25px rgba(107, 253, 217, .35);
}
.work-card:focus-visible { outline: none; }
.work-card:focus-visible .browser { outline: 2px solid var(--mint); outline-offset: 3px; }
.work-card-body { display: block; padding: 1rem .25rem 0; }
.work-card-title { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.work-card-meta { display: block; font-size: .85rem; color: var(--fog); margin-top: .2rem; }
.work-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.work-card-tags span {
  font-family: var(--f-mono); font-size: .72rem; padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--fog);
}
.work-card-tags .is-live { border-color: rgba(107, 253, 217, .4); color: var(--mint); }
.work-card-tags .is-live::before { content: "● "; font-size: .6rem; }
.work-card-open {
  position: absolute; top: 52px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(7, 20, 21, .85); color: #fff; font-size: .85rem;
  opacity: 0; transform: scale(.8); transition: opacity .3s ease, transform .3s var(--ease);
}
.work-card:hover .work-card-open, .work-card:focus-visible .work-card-open { opacity: 1; transform: none; }

/* Project details pop-up */
.work-modal .modal-content {
  background: var(--pine-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden;
}
.work-modal .btn-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; padding: 0;
  background-color: var(--surface-2); border-radius: 50%; opacity: 1; background-size: 12px;
}
.modal-shot { height: min(78vh, 720px); overflow-y: auto; background: #fff; scrollbar-width: thin; }
.modal-shot img { display: block; width: 100%; height: auto; }
.modal-body-inner { padding: clamp(1.75rem, 4vw, 3rem); }
.modal-body-inner h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-bottom: 1rem; padding-right: 2.5rem; }
.modal-body-inner .feature-meta { grid-template-columns: 1fr 1fr; }
.modal-body-inner .feature-meta div:last-child { grid-column: 1 / -1; }
.modal-note { font-size: .85rem; margin: 1.25rem 0 0; }
@media (max-width: 991.98px) {
  .work-modal .modal-content { border-radius: 0; border: 0; overflow-y: auto; }
  .work-modal .btn-close { position: fixed; top: 12px; right: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
  .modal-shot { height: 52vh; }
}

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; }
.process-step { position: relative; padding: 0 1.75rem 0 0; }
.process-step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px;
  background: linear-gradient(90deg, var(--mint), rgba(107, 253, 217, .1));
}
.process-step:last-child::before { display: none; }
.step-num {
  position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font-family: var(--f-mono); font-size: .9rem; font-weight: 500;
  background: var(--pine); border: 1px solid var(--mint); color: var(--mint); margin-bottom: 1.5rem;
  transition: background-color .3s ease, color .3s ease;
}
.process-step:hover .step-num { background: var(--mint); color: var(--ink); }
.process-step h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.process-step p { font-size: .96rem; margin: 0; }
@media (max-width: 991.98px) {
  .process { grid-template-columns: 1fr 1fr; gap: 2.5rem 0; }
  .process-step:nth-child(2)::before { display: none; }
}
@media (max-width: 575.98px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process-step { padding: 0 0 2rem 4.5rem; }
  .process-step::before { left: 23px; right: auto; top: 48px; bottom: 0; width: 1px; height: auto; background: linear-gradient(var(--mint), rgba(107, 253, 217, .1)); }
  .process-step:nth-child(2)::before { display: block; }
  .process-step:last-child::before { display: none; }
  .step-num { position: absolute; left: 0; top: 0; }
  .process-step h3 { padding-top: .6rem; }
}

/* ---------- About ---------- */
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.25rem; margin: 1.75rem 0 0; }
.check-list li { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .96rem; }
.check-list i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(107, 253, 217, .14); color: var(--mint); font-size: .85rem;
}
@media (max-width: 575.98px) { .check-list { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 180px;
  padding: 1.6rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.stat-num { font-family: var(--f-display); font-size: clamp(2.75rem, 2rem + 2.5vw, 3.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.stat-label { font-size: .95rem; font-weight: 600; color: var(--fog); }
.stat-accent { background: var(--accent); border: 0; }
.stat-accent .stat-num, .stat-accent .stat-label { color: var(--ink); }
.stat-accent .stat-num i { font-size: .8em; }
@media (max-width: 400px) { .stat { min-height: 150px; padding: 1.25rem; } }

/* ---------- Panels (skills, resume) ---------- */
.panel { height: 100%; padding: 2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 575.98px) { .panel { padding: 1.5rem 1.25rem; } }
.panel-title { display: flex; align-items: center; gap: .65rem; font-size: 1.2rem; margin-bottom: 1.5rem; }
.panel-title i { color: var(--mint); font-size: 1.1rem; }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: .65rem; margin: 0; }
.tech {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem;
  padding: 1.05rem .5rem; border-radius: var(--r-md); background: var(--pine); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.25;
  transition: transform .3s var(--ease), border-color .3s ease, background-color .3s ease;
}
.tech-ico {
  width: 32px; height: 32px; display: block; color: var(--text); opacity: .85;
  transition: color .3s ease, opacity .3s ease, transform .3s var(--ease);
}
.tech:hover { transform: translateY(-4px); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--pine)); }
.tech:hover .tech-ico { color: var(--brand); opacity: 1; transform: scale(1.1); }
/* Bootstrap-icon fallback for brands without a free logo */
.tech-bi { display: grid; place-items: center; font-size: 28px; line-height: 1; }
.tech-bi::before { line-height: 1; }
@media (min-width: 1200px) { .tech-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 400px) { .tech-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Timeline */
.timeline { position: relative; margin: 0; padding-left: 1.9rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--mint), rgba(107, 253, 217, .08)); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.9rem; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--mint); transition: background-color .3s ease, box-shadow .3s ease;
}
.timeline-item:hover::before, .timeline-item.is-current::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 5px rgba(240, 255, 108, .15); }
.timeline-period { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-mono); font-size: .78rem; color: var(--mint); margin-bottom: .4rem; }
.timeline-period em {
  font-style: normal; font-family: var(--f-body); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: .12rem .55rem; border-radius: 999px; background: var(--accent); color: var(--ink);
}
.timeline-item h4 { font-size: 1.15rem; margin: 0 0 .3rem; }
.timeline-org { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.timeline-org i { color: var(--fog); }
.timeline-item > p:not(.timeline-org) { font-size: .95rem; margin-bottom: .75rem; }
.timeline-item > p:last-child { margin-bottom: 0; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.timeline-tags li { font-family: var(--f-mono); font-size: .74rem; padding: .22rem .65rem; border-radius: 999px; background: rgba(107, 253, 217, .08); border: 1px solid rgba(107, 253, 217, .2); color: var(--mint); }

/* ---------- Testimonials ---------- */
.testi-track {
  --gap: 24px;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - var(--gap) * 2) / 3);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 6px 2px; margin: -6px -2px;
}
.testi-track::-webkit-scrollbar { display: none; }
@media (max-width: 991.98px) { .testi-track { grid-auto-columns: calc((100% - var(--gap)) / 2); } }
@media (max-width: 767.98px) { .testi-track { grid-auto-columns: 100%; } }
.testi-card {
  scroll-snap-align: start; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem;
  padding: 2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
@media (max-width: 575.98px) { .testi-card { padding: 1.5rem; } }
.testi-top { display: flex; align-items: center; justify-content: space-between; }
.testi-stars { display: flex; gap: 3px; color: var(--lime); font-size: .9rem; }
.testi-quote { font-size: 2.8rem; line-height: .6; height: 28px; color: var(--mint); opacity: .5; }
.testi-card blockquote { margin: 0; flex: 1; }
.testi-card blockquote p { margin: 0; font-size: 1.05rem; line-height: 1.7; color: var(--text); }
.testi-author { display: flex; align-items: center; gap: .9rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.testi-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: .95rem;
  background: var(--accent); color: var(--ink);
}
.testi-author strong { display: block; font-size: 1rem; line-height: 1.3; }
.testi-author small { color: var(--fog); font-size: .85rem; }
.testi-dots { display: flex; justify-content: center; margin-top: 1.25rem; }
.testi-dots { gap: 0; }
.testi-dots button {
  position: relative; width: 28px; height: 44px; padding: 0; border: 0; background: transparent;
  transition: width .35s var(--ease);
}
.testi-dots button::before {
  content: ""; position: absolute; left: 9px; right: 9px; top: 17px; height: 10px; border-radius: 99px;
  background: var(--line-strong); transition: background-color .35s ease;
}
.testi-dots button.active { width: 50px; }
.testi-dots button.active::before { background: var(--mint); }

/* ---------- Contact ---------- */
.contact-section { padding-top: 0; }
.contact-panel {
  position: relative; overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem); border-radius: 32px;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(107, 253, 217, .14), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, rgba(240, 255, 108, .08), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
@media (max-width: 575.98px) { .contact-panel { padding: 1.75rem 1.1rem; border-radius: var(--r-lg); } }
.contact-title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: 1.25rem; }
.contact-title span { display: block; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }

/* Direct channels */
.channels { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin: 2rem 0 0; }
.channel-row { display: flex; gap: .5rem; }
.channel-row .channel { flex: 1; min-width: 0; }
.channel {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-radius: var(--r-md);
  background: rgba(14, 33, 34, .55); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem;
  transition: border-color .3s ease, transform .3s var(--ease), background-color .3s ease;
}
.channel:hover { color: var(--text); border-color: var(--mint); transform: translateX(4px); }
.channel-text { min-width: 0; overflow-wrap: break-word; }
@media (min-width: 992px) and (max-width: 1199.98px) { .channel { gap: .75rem; padding: .85rem .9rem; } }
.channel small { display: block; font-family: var(--f-mono); font-size: .74rem; font-weight: 400; color: var(--fog); line-height: 1.4; }
.channel-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--mint); font-size: 1.15rem; }
.channel-primary { background: rgba(107, 253, 217, .1); border-color: rgba(107, 253, 217, .35); }
.channel-primary .channel-icon { background: var(--accent); color: var(--ink); }
.channel-primary small { color: var(--mint); }
.channel-go { margin-left: auto; color: var(--mint); transition: transform .3s var(--ease); }
.channel-primary:hover .channel-go { transform: translate(3px, -3px); }
.copy-btn {
  flex-shrink: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  width: 54px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(14, 33, 34, .55);
  color: var(--fog); font-size: .72rem; font-weight: 700; transition: all .25s ease;
}
.copy-btn i { font-size: 1rem; }
.copy-btn:hover { color: var(--text); border-color: var(--mint); }
.copy-btn.is-copied { color: var(--ink); background: var(--mint); border-color: var(--mint); }

.local-time { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 0; font-size: .9rem; }
.local-time i { color: var(--mint); }
.local-time strong { color: var(--text); font-variant-numeric: tabular-nums; }


/* Form card */
.form-card {
  position: relative; height: 100%; padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--r-lg);
  background: rgba(14, 33, 34, .6); border: 1px solid var(--line);
}
@media (max-width: 575.98px) { .form-card { padding: 1.25rem 1rem; } }
.contact-form .form-label { font-weight: 700; font-size: .92rem; color: var(--text); margin-bottom: .5rem; }
.contact-form .optional { font-weight: 500; color: var(--fog); font-size: .8rem; margin-left: .35rem; }
.contact-form .form-control {
  background-color: var(--pine); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--r-sm); padding: .85rem 1rem; font-size: 1rem;
}
.contact-form .form-control::placeholder { color: var(--fog); opacity: .6; }
.contact-form .form-control:focus { border-color: var(--mint); box-shadow: 0 0 0 .2rem rgba(107, 253, 217, .15); background-color: var(--pine); color: var(--text); }
.form-hint { font-size: .82rem; color: var(--fog); margin-top: .4rem; }
.was-validated .form-control:invalid ~ .form-hint { display: none; }


/* Spam trap: kept out of sight for people, visible to bots */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding-top: .5rem; }
.form-note { margin: 0; font-size: .84rem; }
#sendBtn[disabled] { opacity: .75; }
.form-status { font-size: .92rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.success { color: var(--mint); }
.form-status.error {
  color: var(--text); font-weight: 500; padding: 1rem 1.1rem; border-radius: var(--r-md);
  background: rgba(255, 138, 138, .08); border: 1px solid rgba(255, 138, 138, .35);
}
.form-status.error strong { color: #ff9b9b; }
.form-status .feature-actions { margin-top: .75rem; }
.form-status a { color: inherit; }

/* Success screen */
.form-success { text-align: center; padding: clamp(1.5rem, 5vw, 3.5rem) 1rem; }
.form-success:focus { outline: none; }
.success-icon {
  width: 72px; height: 72px; margin: 0 auto 1.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: 2.2rem;
  animation: pop .5s var(--ease) both;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.form-success h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin-bottom: .75rem; }
.form-success p { max-width: 420px; margin: 0 auto 1.75rem; }
.form-success strong { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { padding: 80px 0 32px; background: var(--ink); border-top: 1px solid var(--line); }
.footer-blurb { margin: 1.25rem 0 1.5rem; max-width: 340px; }
.footer-head { font-family: var(--f-mono); font-size: .8rem; color: var(--fog); margin-bottom: 1rem; }
.footer-head::before { content: "// "; color: var(--mint); }
.footer-links { display: grid; gap: .2rem; margin: 0; color: var(--fog); font-size: .98rem; }
.footer-links a { color: var(--text); text-decoration: none; display: inline-block; padding: .3rem 0; }
.footer-links li:not(:has(a)) { padding: .3rem 0; }
.footer-links a:hover { color: var(--mint); }
.socials { display: flex; gap: .5rem; margin: 0; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; transition: all .3s ease;
}
.socials a:hover { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .88rem;
}
.footer-bottom p { margin: 0; }
.to-top { color: var(--fog); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.to-top:hover { color: var(--mint); }

.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 1030;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: 1.15rem; text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(15px); transition: all .3s var(--ease);
  box-shadow: 0 10px 25px -10px rgba(107, 253, 217, .6);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top.at-footer { opacity: 0; visibility: hidden; }
.back-to-top:hover { color: var(--ink); transform: translateY(-3px); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Custom cursor: glowing comet trail (mouse devices only) ---------- */
.cursor-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9998; pointer-events: none; display: none; }
.cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  width: 10px; height: 10px; border-radius: 50%; opacity: 0; will-change: transform; background: #fff;
  box-shadow: 0 0 6px 2px var(--mint), 0 0 16px 4px rgba(107, 253, 217, .45);
  transition: width .2s ease, height .2s ease, opacity .3s ease, box-shadow .25s ease;
}
.has-cursor .cursor-trail { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role="button"], .has-cursor label { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }
.has-cursor.cursor-visible .cursor-dot { opacity: 1; }
.cursor-hover .cursor-dot {
  width: 16px; height: 16px; background: var(--lime);
  box-shadow: 0 0 10px 4px var(--lime), 0 0 30px 10px rgba(240, 255, 108, .4);
  animation: cursor-pulse 1.1s ease-in-out infinite;
}
@keyframes cursor-pulse { 50% { box-shadow: 0 0 14px 6px var(--lime), 0 0 44px 16px rgba(107, 253, 217, .35); } }
.cursor-down .cursor-dot { width: 7px; height: 7px; }
.cursor-text .cursor-dot { opacity: 0 !important; }

/* ---------- Small desktops: fit the menu ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .desktop-nav .nav-link { padding: .5rem .75rem; }
}

/* ---------- Phones: keep wide-gutter rows inside the screen ---------- */
@media (max-width: 575.98px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
