:root {
  --bg: #ffffff;
  --bg-soft: #f4f8ff;
  --card: #f7f9fc;
  --card-strong: #eef5ff;
  --text: #101828;
  --muted: #667085;
  --blue: #2563eb;
  --blue-2: #0ea5e9;
  --blue-soft: #dbeafe;
  --green: #20c997;
  --line: #e5edf8;
  --shadow: 0 24px 70px rgba(20, 48, 92, .10);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1180px;
  --font-body: "Roboto", Arial, Helvetica, sans-serif;
  --font-heading: "Roboto", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 28rem), #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: fixed; left: 18px; top: -60px; z-index: 999;
  background: var(--blue); color: #fff; padding: 12px 16px; border-radius: 999px;
}
.skip-link:focus { top: 18px; }

.site-shell { min-height: 100vh; overflow: hidden; position: relative; isolation: isolate; }
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .16; z-index: -2;
  background-image: linear-gradient(rgba(15,23,42,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}
.coding-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  color: rgba(37,99,235,.42);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}
.coding-bg span {
  position: absolute;
  white-space: nowrap;
  font-size: clamp(.78rem, 1vw, 1.05rem);
  opacity: .78;
  text-shadow: 0 8px 26px rgba(37,99,235,.12);
  animation: codeDrift 18s ease-in-out infinite alternate;
}
.coding-bg span:nth-child(1) { top: 13%; left: 5%; }
.coding-bg span:nth-child(2) { top: 26%; right: 4%; animation-delay: -4s; }
.coding-bg span:nth-child(3) { top: 52%; left: 2%; animation-delay: -8s; }
.coding-bg span:nth-child(4) { bottom: 18%; right: 7%; animation-delay: -11s; }
.coding-bg span:nth-child(5) { top: 70%; left: 30%; animation-delay: -6s; }
.coding-bg span:nth-child(6) { top: 38%; left: 48%; animation-delay: -2s; }
.coding-bg span:nth-child(7) { bottom: 34%; left: 8%; animation-delay: -13s; }
.coding-bg span:nth-child(8) { top: 12%; right: 28%; animation-delay: -9s; }
@keyframes codeDrift { from { transform: translate3d(0,0,0) rotate(-2deg); } to { transform: translate3d(18px,-22px,0) rotate(2deg); } }

.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.section { padding: 78px 0; }
.section-tight { padding: 54px 0; }
.header, main, .footer { position: relative; z-index: 1; }

.header {
  position: sticky; top: 14px; z-index: 50; width: min(calc(100% - 28px), var(--max)); margin: 14px auto 0;
  border: 1px solid rgba(226,234,247,.92); border-radius: 999px; background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(20,48,92,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.03em; }
.site-logo-link { flex: 0 0 auto; }
.site-logo { width: 210px; height: 56px; object-fit: contain; display:block; }
.brand-mark { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 20px rgba(37,99,235,.24); font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 10px 13px; color: var(--muted); border-radius: 999px; font-size: 14px; font-weight: 700; transition: .25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: var(--blue-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { border: 0; width: 42px; height: 42px; border-radius: 999px; background: #f3f7ff; color: var(--text); cursor: pointer; display: none; align-items: center; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; font-weight: 900; transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; box-shadow: 0 16px 34px rgba(37,99,235,.24); }
.btn-soft { background: var(--bg-soft); color: var(--blue); border: 1px solid var(--line); }
.btn-dark { background: var(--text); color: #fff; }

.fa-solid, .fa-brands { line-height: 1; display: inline-block; }
.btn .fa-solid, .btn .fa-brands { font-size: .95em; }
.nav-links a .fa-solid, .nav-links a .fa-brands { width: 16px; text-align: center; font-size: 13px; }

.hero { padding: 78px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 540px); align-items: center; gap: clamp(42px, 6vw, 82px); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(32,201,151,.13); animation: pulseDot 1.9s ease-in-out infinite; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; }
h1 { font-size: clamp(2.35rem, 5.15vw, 4.3rem); line-height: 1; letter-spacing: -.032em; margin-bottom: 22px; }
h1 .line { display: block; }
h1 .muted-line { color: #657083; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.85rem); line-height: 1.08; letter-spacing: -.022em; margin-bottom: 16px; }
h3 { font-size: 1.08rem; line-height: 1.2; letter-spacing: -.012em; }
.lead { color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.14rem); line-height: 1.72; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-mini { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.pill { border: 1px solid var(--line); background: rgba(255,255,255,.82); border-radius: 999px; padding: 10px 13px; color: var(--muted); font-weight: 800; font-size: 13px; display:inline-flex; align-items:center; gap:8px; }
.pill .fa-solid, .pill .fa-brands { color: var(--blue); }

.avatar-wrap { position: relative; min-height: 540px; display: grid; place-items: center; justify-self: end; width: min(560px, 100%); z-index: 1; overflow: visible; }
.avatar-card { position: relative; z-index: 2; width: min(470px, 100%); border-radius: 48px; padding: 22px; background: linear-gradient(145deg, #f9fbff, #eef5ff); border: 1px solid #e3ecfb; box-shadow: var(--shadow); overflow: hidden; }
.avatar-card::before { content: ""; position: absolute; inset: -35% -20% auto auto; width: 340px; height: 340px; background: radial-gradient(circle, rgba(37,99,235,.18), transparent 68%); }
.avatar-card img { position: relative; border-radius: 36px; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; }
.status-dot { position: absolute; right: 30px; bottom: 30px; width: 17px; height: 17px; background: var(--green); border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 8px rgba(33,195,111,.16); }
.status-dot::after { content:""; position:absolute; inset:-12px; border-radius:inherit; background: rgba(32,201,151,.22); animation: statusPulse 1.8s ease-out infinite; z-index:-1; }
.float-card { position: absolute; z-index: 5; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 50px rgba(20,48,92,.10); padding: 13px 14px; min-width: 172px; animation: floaty 7s ease-in-out infinite; }
.float-card strong { display:flex; align-items:center; gap:8px; font-size: 14px; letter-spacing: -.02em; }
.float-card strong .fa-solid { color: var(--blue); }
.float-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.float-card.one { top: 22px; left: 0; }
.float-card.two { bottom: 34px; left: 0; animation-delay: -2.4s; }
.float-card.three { top: 106px; right: 0; animation-delay: -4s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 6px rgba(32,201,151,.13); } 50% { box-shadow: 0 0 0 12px rgba(32,201,151,.06); } }
@keyframes statusPulse { 0% { transform: scale(.72); opacity:.8; } 100% { transform: scale(1.8); opacity:0; } }

.marquee-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(246,250,255,.7); overflow: hidden; padding: 12px 0; }
.marquee { display:flex; gap: 12px; white-space: nowrap; width: max-content; animation: marquee 26s linear infinite; }
.marquee.reverse { animation-direction: reverse; opacity: .86; margin-top: 10px; }
.marquee span { display: inline-flex; align-items:center; gap: 8px; background: #fff; border:1px solid var(--line); border-radius: 999px; padding: 10px 16px; color:#334155; font-weight: 900; font-size: 14px; box-shadow: 0 8px 24px rgba(30,64,175,.06); }
.marquee span::before { content: "\f121"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--blue); }
@keyframes marquee { to { transform: translateX(-50%); } }

.bento { display: grid; grid-template-columns: 1.15fr .95fr .95fr; gap: 14px; margin-top: 24px; }
.bento-card { min-height: 180px; background: rgba(247,249,252,.88); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: relative; overflow: hidden; transition: .25s ease; }
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bento-card.big { grid-row: span 2; min-height: 378px; display: flex; flex-direction: column; justify-content: space-between; }
.bento-card .small-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); font-weight: 900; margin-bottom: 12px; }
.bento-card p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }
.code-window { background: #0f172a; color: #bfdbfe; border-radius: 18px; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.7; margin-top: 24px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.code-window em { color: #67e8f9; font-style: normal; }

.section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom: 28px; }
.section-head p { color: var(--muted); line-height:1.65; max-width: 660px; margin-bottom: 0; }
.filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 22px; }
.filter-btn { border: 1px solid var(--line); background:#fff; color: var(--muted); border-radius:999px; padding: 10px 14px; font-weight:900; cursor:pointer; transition:.2s ease; }
.filter-btn.active, .filter-btn:hover { background: var(--blue); border-color: var(--blue); color:#fff; }

.work-section { overflow: hidden; }
.work-carousel-shell { width: 100vw; margin-left: calc(50% - 50vw); background: linear-gradient(180deg, rgba(244,248,255,.82), rgba(255,255,255,.28)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding: 36px 0 48px; }
.projects-carousel-viewport { overflow: hidden; width: 100%; padding: 18px clamp(14px, 3vw, 52px) 40px; margin-inline: auto; }
.projects-track { display:flex; gap: 18px; will-change: transform; transition: transform 1s cubic-bezier(.22,.61,.36,1); }
.project-card { flex: 0 0 calc((100% - 54px) / 4); background:#fff; border: 1px solid var(--line); border-radius: 28px; overflow:hidden; box-shadow: 0 26px 70px rgba(20,48,92,.16); transition: .25s ease; min-height: 100%; display:flex; flex-direction:column; margin-bottom: 26px; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 32px 82px rgba(20,48,92,.18); }
.project-img { background: linear-gradient(145deg, #eff6ff, #fff); padding: 16px; border-bottom:1px solid var(--line); }
.project-img img { width:100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 18px; background: #eef5ff; }
.project-body { padding: 20px; flex:1; display:flex; flex-direction:column; }
.project-meta { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom: 12px; }
.tag { color:var(--blue); background:var(--blue-soft); border-radius:999px; padding:6px 10px; font-size:11px; font-weight:900; display:inline-flex; align-items:center; gap:6px; }
.project-body p { color: var(--muted); line-height:1.55; font-size: 14px; flex:1; }
.carousel-controls { display:flex; justify-content:center; align-items:center; gap:12px; margin-top:20px; }
.carousel-btn { width:46px; height:46px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--blue); display:grid; place-items:center; cursor:pointer; box-shadow:0 14px 32px rgba(20,48,92,.10); transition:.22s ease; }
.carousel-btn:hover { transform: translateY(-2px); background:var(--blue); color:#fff; border-color:var(--blue); }
.project-link { color: var(--blue); font-weight: 900; display:inline-flex; align-items:center; gap:6px; margin-top: 12px; }

.skills-shell { background: linear-gradient(180deg, #f7fbff, #fff); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.skills-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skill-group { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: 0 16px 48px rgba(20,48,92,.06); }
.skill-group h3 { margin-bottom: 14px; }
.skill-item { display:grid; grid-template-columns: 148px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items:center; }
.skill-item:first-of-type { border-top: 0; }
.skill-name { display:flex; align-items:center; gap: 10px; font-weight:900; }
.skill-icon { width: 32px; height: 32px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), var(--blue-2)); color:#fff; display:grid; place-items:center; font-size: 14px; flex:0 0 32px; }
.skill-desc { color: var(--muted); font-size: 14px; line-height:1.45; }

.company-card { display:grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap:20px; align-items:center; background:#0f172a; color:#fff; border-radius: 38px; padding: 28px; overflow:hidden; position:relative; }
.company-card::before { content:""; position:absolute; right:-130px; top:-160px; width:420px; height:420px; background: radial-gradient(circle, rgba(14,165,233,.55), transparent 70%); }
.company-card .eyebrow { color:#93c5fd; }
.company-card p { color:#dbeafe; line-height:1.72; }
.company-left { position:relative; z-index:1; padding: 16px; }
.company-services { position:relative; z-index:1; display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; align-content:center; align-items:center; justify-content:center; height:100%; }
.company-services span { min-height:60px; background: rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.14); border-radius: 16px; padding:14px; font-weight:900; display:flex; align-items:center; justify-content:center; gap:10px; text-align:center; }
.company-services span .fa-solid { color:#93c5fd; }

.service-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.service-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: 0 16px 46px rgba(20,48,92,.06); }
.service-icon { width: 42px; height:42px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display:grid; place-items:center; font-size:18px; font-weight:900; margin-bottom: 24px; }
.service-card p { color: var(--muted); line-height:1.58; }

.contact-card { display:grid; grid-template-columns: .85fr 1.15fr; gap:20px; background: rgba(247,249,252,.9); border:1px solid var(--line); border-radius: 38px; padding: 24px; box-shadow: var(--shadow); }
.contact-info { padding: 16px; }
.contact-info p { color: var(--muted); line-height:1.7; }
.contact-details { display:grid; gap: 10px; margin-top: 24px; }
.contact-details a { background:#fff; border:1px solid var(--line); border-radius: 18px; padding: 14px 16px; font-weight:900; color: var(--blue); display:flex; align-items:center; gap: 10px; min-width:0; }
.contact-icon { width: 34px; height: 34px; border-radius: 12px; display:inline-grid; place-items:center; flex:0 0 34px; background:var(--blue-soft); color:var(--blue); }
.contact-icon .fa-solid, .contact-icon .fa-brands, .whatsapp-float .fa-brands { font-size: 16px; }
.form { background:#fff; border:1px solid var(--line); border-radius: 28px; padding: 18px; display:grid; gap:12px; }
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.field { display:grid; gap:6px; }
.field span { color:#475569; font-size: 13px; font-weight:900; }
.field input, .field textarea, .field select { width:100%; border:1px solid var(--line); border-radius: 16px; padding: 13px 14px; color: var(--text); outline:none; background:#f9fbff; transition:.2s ease; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.10); background:#fff; }
.field textarea { min-height: 132px; resize: vertical; }

.footer { padding: 34px 0 52px; }
.footer-card { background: #f7f9fc; border:1px solid var(--line); border-radius: 30px; padding: 18px 22px; display:flex; justify-content:center; gap:18px; align-items:center; text-align:center; flex-wrap:wrap; }
.footer-logo { width: 210px; height: 56px; object-fit: contain; flex:0 0 auto; }
.footer-card p { color:var(--muted); margin:0; line-height:1.5; }
.footer-note { font-weight: 700; }
.footer-copy { font-size: 14px; }


.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 58px; height: 58px; border-radius: 20px; display:grid; place-items:center; color:#fff; background:#20c997; box-shadow: 0 18px 42px rgba(32,201,151,.32); font-size: 24px; }
.whatsapp-float:hover { transform: translateY(-3px); }

@media (max-width: 1320px) {
  .project-card { flex-basis: calc((100% - 36px) / 3); }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .avatar-wrap { justify-self: center; min-height: auto; padding-top: 20px; }
}
@media (max-width: 980px) {
  .nav-links { position: fixed; inset: 78px 16px auto; background:#fff; border:1px solid var(--line); border-radius: 26px; padding: 14px; display:none; flex-direction:column; align-items:stretch; box-shadow: var(--shadow); }
  .nav-links.open { display:flex; }
  .nav-links a { text-align:center; }
  .icon-btn { display:flex; }
  .company-card, .contact-card { grid-template-columns: 1fr; }
  .float-card { position: relative; inset:auto!important; margin: 10px 0 0; animation: none; justify-self: stretch; width: min(420px,100%); }
  .avatar-card { width: min(420px, 100%); }
  .bento, .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bento-card.big { grid-row: auto; }
  .skills-grid { grid-template-columns: 1fr; }
  .project-card { flex-basis: calc((100% - 18px) / 2); }
}
@media (max-width: 700px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .header { width: calc(100% - 18px); top: 8px; margin-top: 8px; }
  .nav-actions .btn { display:none; }
  .hero { padding-top: 56px; }
  h1 { font-size: clamp(2.18rem, 12vw, 3.25rem); }
  h2 { font-size: clamp(1.72rem, 8.5vw, 2.35rem); }
  .section { padding: 62px 0; }
  .bento, .service-grid, .company-services, .form-row { grid-template-columns: 1fr; }
  .section-head { display:block; }
  .project-card { flex-basis: 100%; }
  .projects-carousel-viewport { padding-inline: 12px; }
  .skill-item { grid-template-columns: 1fr; gap: 4px; }
  .contact-card, .company-card { padding: 16px; border-radius: 28px; }
  .footer-card { padding: 16px; }
  .coding-bg { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity:1; transform:none; }
}

.project-meta,.tag,.filters{display:none!important;}


/* V8 portfolio image-only cards + popup preview */
body.modal-open { overflow: hidden; }
.project-card-image-only { min-height: auto; cursor: zoom-in; overflow: visible; border-radius: 30px; }
.project-card-image-only:hover { transform: translateY(-7px); }
.project-card-image-only .project-img { display:block; width:100%; appearance:none; border:0; cursor:zoom-in; text-align:left; background: linear-gradient(145deg, #eff6ff, #ffffff); border-radius: 30px; padding: 16px; box-shadow: inset 0 0 0 1px rgba(209,226,248,.85); }
.project-card-image-only .project-img:focus-visible { outline: 3px solid rgba(47,128,237,.35); outline-offset: 4px; }
.project-card-image-only .project-img img { display:block; border-radius: 20px; box-shadow: 0 16px 34px rgba(20,48,92,.14); }
.project-card-image-only .project-body { display:none !important; }
.image-modal { position: fixed; inset: 0; z-index: 999; display:grid; place-items:center; padding: clamp(16px, 4vw, 48px); opacity:0; pointer-events:none; transition: opacity .24s ease; }
.image-modal.active { opacity:1; pointer-events:auto; }
.modal-backdrop { position:absolute; inset:0; border:0; background: rgba(7,15,35,.74); backdrop-filter: blur(14px); cursor: zoom-out; }
.modal-panel { position:relative; width:min(1180px, 96vw); max-height: 88vh; background:#fff; border-radius: 28px; padding: clamp(10px, 2vw, 18px); box-shadow: 0 36px 110px rgba(0,0,0,.35); transform: translateY(18px) scale(.985); transition: transform .24s ease; }
.image-modal.active .modal-panel { transform: translateY(0) scale(1); }
.modal-panel img { display:block; width:100%; max-height: calc(88vh - 36px); object-fit: contain; border-radius: 18px; background:#f3f8ff; }
.modal-close { position:absolute; top:-18px; right:-18px; width:46px; height:46px; border:0; border-radius:999px; display:grid; place-items:center; background: linear-gradient(135deg, var(--blue), var(--blue-2)); color:#fff; cursor:pointer; box-shadow: 0 16px 36px rgba(47,128,237,.35); }
.modal-close:hover { transform: translateY(-2px); }
@media (max-width: 700px) {
  .modal-close { top: 8px; right: 8px; width: 40px; height: 40px; }
  .modal-panel { width: 96vw; border-radius: 22px; }
}


@media (max-width: 760px) {
  .hero { padding-top: 58px; }
  .avatar-wrap { margin-top: 28px; }
  .footer-card { flex-direction: column; gap: 8px; padding: 20px 16px; }
  .footer-logo { width: 210px; height: 56px; margin-bottom: 4px; }
  .footer-note, .footer-copy { display:block; width:100%; }
  .footer-copy { padding-top: 2px; }
}


/* V10 light/dark theme switch */
html[data-theme="dark"] {
  --bg: #07111f;
  --bg-soft: #0d1b2e;
  --card: #0f1b2d;
  --card-strong: #102540;
  --text: #f8fbff;
  --muted: #b9c7dc;
  --blue: #60a5fa;
  --blue-2: #22d3ee;
  --blue-soft: rgba(96,165,250,.16);
  --green: #34d399;
  --line: rgba(173,190,215,.22);
  --shadow: 0 24px 70px rgba(0,0,0,.32);
}
html[data-theme="dark"] body {
  background: radial-gradient(circle at top left, rgba(34,211,238,.13), transparent 30rem), radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 28rem), #07111f;
}
html[data-theme="dark"] .noise { opacity: .12; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); }
html[data-theme="dark"] .coding-bg { color: rgba(96,165,250,.46); }
html[data-theme="dark"] .header { background: rgba(7,17,31,.82); border-color: var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.28); }
html[data-theme="dark"] .nav-links a:hover, html[data-theme="dark"] .nav-links a.active { color: #bfdbfe; background: rgba(96,165,250,.16); }
html[data-theme="dark"] .pill,
html[data-theme="dark"] .float-card,
html[data-theme="dark"] .bento-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .skill-group,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .form,
html[data-theme="dark"] .carousel-btn,
html[data-theme="dark"] .modal-panel {
  background: rgba(15,27,45,.92);
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="dark"] .site-logo,
html[data-theme="dark"] .footer-logo { background: transparent; border-radius: 0; padding: 0; }
html[data-theme="dark"] .avatar-card { background: linear-gradient(145deg, #10223a, #0a1728); border-color: var(--line); }
html[data-theme="dark"] .avatar-card::before { background: radial-gradient(circle, rgba(96,165,250,.20), transparent 68%); }
html[data-theme="dark"] .marquee-band,
html[data-theme="dark"] .skills-shell { background: rgba(11,25,43,.78); border-color: var(--line); }
html[data-theme="dark"] .bento-card.big { background: linear-gradient(145deg, rgba(96,165,250,.20), rgba(14,165,233,.08)); }
html[data-theme="dark"] .project-card-image-only .project-img { background: linear-gradient(145deg, #0c1a2d, #12253f); box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="dark"] .project-card-image-only .project-img img { box-shadow: 0 16px 34px rgba(0,0,0,.32); }
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .footer-card { background: rgba(15,27,45,.88); border-color: var(--line); }
html[data-theme="dark"] .contact-details a { background: rgba(7,17,31,.84); border-color: var(--line); color: #bfdbfe; }
html[data-theme="dark"] .field span { color: #d5e2f5; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select { background: #0b1728; border-color: var(--line); color: var(--text); }
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder { color: #8ba0bd; }
html[data-theme="dark"] .company-card { background: linear-gradient(145deg, #07111f, #0d1b2e); border: 1px solid var(--line); }
html[data-theme="dark"] .muted-line { color: #9fb0c8; }
html[data-theme="dark"] .modal-panel img { background: #0b1728; }
html[data-theme="dark"] .status-dot { border-color: #0f1b2d; }
.theme-toggle { border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 999px; background: var(--bg-soft); color: var(--blue); cursor: pointer; display: inline-grid; place-items: center; transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease; }
.theme-toggle:hover { transform: translateY(-2px); background: var(--blue); color: #fff; border-color: var(--blue); }
.theme-toggle .fa-solid { font-size: 15px; }


/* V12 dark navigation and mobile logo refinements */
html[data-theme="dark"] .nav-links { background: transparent; border-color: transparent; box-shadow: none; }
html[data-theme="dark"] .nav-links a { color: #d8e3f5; }
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active { color: #ffffff; background: rgba(96,165,250,.22); }
html[data-theme="dark"] .icon-btn { background: rgba(255,255,255,.08); color: #ffffff; border: 1px solid var(--line); }
html[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,.08); color: #ffffff; border-color: var(--line); }
@media (max-width: 980px) {
  html[data-theme="dark"] .nav-links,
  html[data-theme="dark"] .nav-links.open {
    background: rgba(7,17,31,.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  html[data-theme="dark"] .icon-btn .fa-solid { color: #ffffff; }
}
@media (max-width: 760px) {
  .site-logo { width: 184px; height: 50px; }
  .footer-logo { width: 192px; height: 52px; }
  .nav { padding-left: 12px; }
}

/* V11 portfolio captions: frontend keeps descriptions editable from admin, while names/links/tags stay hidden */
.project-card-image-only { padding-bottom: 18px; cursor: default; }
.project-card-image-only .project-caption { margin: 14px 18px 2px; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: left; }
.project-card-image-only .project-img + .project-caption { pointer-events: none; }
html[data-theme="dark"] .project-card-image-only .project-caption { color: var(--muted); }
@media (max-width: 700px) { .project-card-image-only .project-caption { margin-inline: 16px; font-size: 13.5px; } }


/* V13 mobile spacing, logo font match and default dark refinements */
.site-logo { width: 238px; height: 64px; object-fit: contain; }
.footer-logo { width: 230px; height: 58px; object-fit: contain; }
html[data-theme="dark"] .nav-links { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html[data-theme="dark"] .nav-links a { background: transparent; }
html[data-theme="dark"] .nav-links a.active,
html[data-theme="dark"] .nav-links a:hover { background: rgba(96,165,250,.22); }
.work-carousel-shell { padding-top: 30px; padding-bottom: 34px; }
.projects-carousel-viewport { padding-top: 16px; padding-bottom: 14px; }
.carousel-controls { margin-top: 8px; }
.field select { padding-right: 46px; }
.form .btn .fa-brands { margin-right: 4px; }
.whatsapp-float { width: 64px; height: 64px; border-radius: 22px; font-size: 26px; right: 20px; bottom: 20px; }
.whatsapp-float .fa-brands { font-size: 24px; }

@media (max-width: 980px) {
  html[data-theme="dark"] .nav-links,
  html[data-theme="dark"] .nav-links.open {
    background: rgba(7,17,31,.98) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow) !important;
  }
  html[data-theme="dark"] .nav-links a { color: #fff; }
  html[data-theme="dark"] .nav-links a:not(.active) { background: transparent; }
  .avatar-wrap { gap: 12px; }
  .avatar-card { margin-top: 22px; }
}

@media (max-width: 760px) {
  .site-logo { width: 190px; height: 54px; }
  .footer-logo { width: 206px; height: 56px; }
  .hero { padding-top: 44px; padding-bottom: 28px; }
  .avatar-wrap { margin-top: 24px; padding-top: 0; }
  .avatar-card { margin-top: 26px; width: min(390px, 100%); border-radius: 36px; padding: 18px; }
  .avatar-card img { border-radius: 28px; }
  .float-card { margin-top: 8px; padding: 11px 13px; }
  .section-tight { padding: 36px 0; }
  .bento { gap: 12px; margin-top: 12px; }
  .bento-card { min-height: auto; padding: 18px; }
  .bento-card .small-label { margin-bottom: 9px; }
  .bento-card h3 { margin-bottom: 10px; }
  .bento-card p { margin-bottom: 0; }
  .code-window { margin-top: 12px; padding: 13px; line-height: 1.55; border-radius: 16px; }
  #work.section { padding-top: 48px; padding-bottom: 34px; }
  .work-carousel-shell { padding-top: 18px; padding-bottom: 22px; }
  .projects-carousel-viewport { padding-top: 12px; padding-bottom: 10px; }
  .project-card-image-only { padding-bottom: 12px; margin-bottom: 10px; }
  .project-card-image-only .project-caption { margin-top: 10px; margin-bottom: 0; }
  .carousel-controls { margin-top: 6px; }
  .contact-card { padding: 16px 14px 18px; }
  .form { padding: 14px; gap: 10px; }
  .field input, .field textarea, .field select { padding: 12px 14px; }
  .field select { padding-right: 48px; }
  .form .btn { padding: 13px 16px; }
  .footer { padding-top: 28px; padding-bottom: 72px; }
  .footer-card { gap: 10px; padding: 18px 14px 20px; }
  .whatsapp-float { width: 62px; height: 62px; right: 14px; bottom: 14px; border-radius: 21px; }
}


/* V14 spacing, logo sizing and select cleanup */
.bento-card.big { justify-content: flex-start !important; gap: 16px; }
.bento-card.big > div:first-child { margin-bottom: 0; }
.code-window { margin-top: 0; }
.site-logo { width: 260px; height: 64px; object-fit: contain; }
.footer-logo { width: 172px; height: 42px; object-fit: contain; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none !important;
}
html[data-theme="dark"] .field select { background-image: none !important; }
@media (max-width: 760px) {
  .bento-card.big { gap: 12px; }
  .code-window { margin-top: 0 !important; }
  .site-logo { width: 206px; height: 56px; }
  .footer-logo { width: 164px; height: 40px; }
  .footer-card { gap: 9px; }
}


/* V15 layout polish: desktop bottom align, mobile spacing cleanup, tighter logo */
@media (min-width: 761px) {
  .bento-card.big {
    min-height: 378px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }
  .bento-card.big .code-window { margin-top: auto !important; }
}

.site-logo {
  width: 232px !important;
  height: 62px !important;
  object-fit: contain !important;
}
.footer-logo {
  width: 136px !important;
  height: 38px !important;
  object-fit: contain !important;
}
.field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  padding-right: 14px !important;
}
html[data-theme="dark"] .field select { background-image: none !important; }

@media (max-width: 760px) {
  .site-logo { width: 190px !important; height: 54px !important; }
  .footer-logo { width: 132px !important; height: 38px !important; }
  .bento-card.big {
    min-height: auto !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding-bottom: 16px !important;
  }
  .bento-card.big .code-window {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
  }
  .bento-card.big::after { display: none !important; }
  .field select { padding-right: 14px !important; }
}


/* V19 portfolio mockup update: use portfolio showcase images cleanly */
.project-card-image-only .project-img img {
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
}
.project-card-image-only .project-img {
  padding: 12px !important;
}
.project-card-image-only .project-caption {
  min-height: 92px;
}
@media (max-width: 700px) {
  .project-card-image-only .project-caption {
    min-height: auto;
  }
}


/* V20: image popup should hug portfolio mockup image without white side padding */
.image-modal {
  padding: clamp(12px, 3vw, 34px) !important;
}
.modal-panel {
  width: min(96vw, 1180px, calc(88vh * 4 / 3)) !important;
  max-height: 88vh !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 24px !important;
  overflow: visible !important;
}
.modal-panel img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 88vh !important;
  object-fit: contain !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: 0 36px 110px rgba(0,0,0,.42) !important;
}
html[data-theme="dark"] .modal-panel,
html[data-theme="dark"] .modal-panel img {
  background: transparent !important;
}
@media (max-width: 700px) {
  .image-modal { padding: 10px !important; }
  .modal-panel { width: min(96vw, calc(86vh * 4 / 3)) !important; max-height: 86vh !important; }
  .modal-panel img { max-height: 86vh !important; border-radius: 18px !important; }
  .modal-close { top: -12px !important; right: -8px !important; }
}


/* V24: mobile hero avatar preview between eyebrow and heading */
.mobile-avatar-inline { display: none; }

@media (max-width: 980px) and (min-width: 701px) {
  .hero-grid > .avatar-wrap { width: min(520px, 100%); min-height: 510px; padding-top: 0; }
  .hero-grid > .avatar-wrap .float-card { position: absolute; animation: floaty 7s ease-in-out infinite; justify-self: auto; width: auto; margin: 0; min-width: 158px; }
  .hero-grid > .avatar-wrap .float-card.one { top: 18px; left: 0; }
  .hero-grid > .avatar-wrap .float-card.two { bottom: 34px; left: 0; }
  .hero-grid > .avatar-wrap .float-card.three { top: 98px; right: 0; }
}

@media (max-width: 700px) {
  .hero-grid > .avatar-wrap { display: none; }
  .mobile-avatar-inline {
    position: relative;
    display: grid;
    place-items: center;
    width: min(392px, 100%);
    min-height: 392px;
    margin: 16px auto 22px;
    overflow: visible;
  }
  .mobile-avatar-inline .avatar-card {
    width: min(318px, 84vw);
    margin-top: 46px;
    padding: 14px;
    border-radius: 34px;
  }
  .mobile-avatar-inline .avatar-card img { border-radius: 26px; }
  .mobile-avatar-inline .status-dot { right: 20px; bottom: 20px; width: 15px; height: 15px; border-width: 4px; }
  .mobile-avatar-inline .float-card {
    position: absolute;
    inset: auto !important;
    z-index: 6;
    width: auto;
    min-width: 126px;
    max-width: 150px;
    margin: 0;
    padding: 9px 10px;
    border-radius: 16px;
    animation: floaty 7s ease-in-out infinite;
    box-shadow: 0 14px 34px rgba(20,48,92,.16);
  }
  .mobile-avatar-inline .float-card strong { font-size: 11px; gap: 5px; }
  .mobile-avatar-inline .float-card span { font-size: 10px; line-height: 1.3; }
  .mobile-avatar-inline .float-card.one { top: 14px !important; left: 0 !important; }
  .mobile-avatar-inline .float-card.three { top: 78px !important; right: 0 !important; animation-delay: -4s; }
  .mobile-avatar-inline .float-card.two { bottom: 12px !important; left: 0 !important; animation-delay: -2.4s; }
}

@media (max-width: 390px) {
  .mobile-avatar-inline { min-height: 372px; }
  .mobile-avatar-inline .avatar-card { width: min(292px, 82vw); margin-top: 48px; }
  .mobile-avatar-inline .float-card { min-width: 118px; max-width: 138px; padding: 8px 9px; }
  .mobile-avatar-inline .float-card strong { font-size: 10px; }
  .mobile-avatar-inline .float-card span { font-size: 9.5px; }
}


/* V25: carousel hover/focus pause, keyboard/swipe modal controls, and tighter mobile hero avatar */
.projects-carousel-viewport { touch-action: pan-y; }
.modal-nav {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:4;
  width:46px;
  height:46px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#fff;
  background:rgba(7,15,35,.58);
  box-shadow:0 18px 42px rgba(0,0,0,.28);
  cursor:pointer;
  backdrop-filter: blur(10px);
  transition: transform .2s ease, background .2s ease;
}
.modal-nav:hover { transform:translateY(-50%) scale(1.06); background:rgba(47,128,237,.86); }
.modal-prev { left:12px; }
.modal-next { right:12px; }
.image-modal { touch-action: pan-y; }

@media (max-width: 700px) {
  .mobile-avatar-inline {
    margin: 4px auto 18px !important;
    min-height: 350px !important;
  }
  .mobile-avatar-inline .avatar-card {
    margin-top: 24px !important;
    width: min(318px, 86vw) !important;
  }
  .mobile-avatar-inline .float-card.one {
    top: 42px !important;
    left: 2px !important;
  }
  .mobile-avatar-inline .float-card.three {
    top: 82px !important;
    right: -2px !important;
  }
  .mobile-avatar-inline .float-card.two {
    bottom: 18px !important;
    left: 2px !important;
  }
  .modal-nav { width:40px; height:40px; }
  .modal-prev { left:8px; }
  .modal-next { right:8px; }
}

@media (max-width: 390px) {
  .mobile-avatar-inline { min-height: 336px !important; }
  .mobile-avatar-inline .avatar-card { width: min(292px, 84vw) !important; margin-top: 24px !important; }
  .mobile-avatar-inline .float-card.one { top: 38px !important; }
  .mobile-avatar-inline .float-card.three { top: 78px !important; }
  .mobile-avatar-inline .float-card.two { bottom: 14px !important; }
}
