:root{
  --radius: 14px;
  --max: 1120px;
  --nav-h: 79px;

  /* ---- Light mode (default) ---- */
  --bg: #F8FAFC;        /* Slate Tint */
  --bg-soft: #EEF2F7;   /* Slightly greyer, for alternating sections */
  --surface: #FFFFFF;   /* Pure White, for cards */
  --text: #0F172A;      /* Near Black */
  --accent: #2563EB;    /* Electric Blue */
  --accent-soft: #DBEAFE;
  --muted: #64748B;     /* Cool Gray */
  --line: #E2E8F0;
}

[data-theme="dark"]{
  --bg: #0F172A;        /* Deep Slate */
  --bg-soft: #16213A;   /* Slightly lighter than bg, for alternating sections */
  --surface: #1E293B;   /* Dark Slate, for cards */
  --text: #F8FAFC;      /* Off-White */
  --accent: #3B82F6;    /* Bright Blue */
  --accent-soft: rgba(59,130,246,0.16);
  --muted: #94A3B8;     /* Soft Gray */
  --line: #2A3B52;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img, svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3{ font-family:'Poppins', sans-serif; margin:0; }

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; animation: none !important; }
}

/* ---------- NAV ---------- */
header.site-nav{
  position: sticky;
  top:0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  transition: opacity 0.2s ease;
}
a.brand:hover{ opacity: 0.75; }

.brand-mark{
  width:42px; height:42px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-family:'Poppins', sans-serif;
  font-weight:600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.brand-mark img{
  width:100%; height:100%;
  object-fit: cover;
}
.brand-name{
  font-family:'Poppins', sans-serif;
  font-weight:600;
  font-size: 1.05rem;
  line-height:1.15;
  white-space: nowrap;
}
.brand-sub{
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.nav-links{
  display:flex;
  align-items:center;
  gap: 34px;
}
.nav-links a{
  font-size: 0.92rem;
  font-weight:500;
  color: var(--text);
  position:relative;
  padding: 4px 0;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left:0; bottom:-2px;
  width:0; height:2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover::after{ width:100%; }

.nav-right{
  display:flex;
  align-items:center;
  gap: 14px;
}

.nav-toggle{
  display:none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink: 0;
}
.nav-toggle:hover{ border-color: var(--accent); }
.nav-toggle svg{ width: 18px; height: 18px; }
.nav-toggle .icon-close{ display:none; }
.nav-toggle[aria-expanded="true"] .icon-burger{ display:none; }
.nav-toggle[aria-expanded="true"] .icon-close{ display:block; }

.nav-backdrop{ display:none; }
.mobile-tabbar{ display:none; }

/* Theme toggle */
.theme-toggle{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover{ border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg{ width: 18px; height: 18px; }
.theme-toggle .icon-moon{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size:0.9rem;
  font-weight:600;
  cursor:pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary{
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn-outline{
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-outline:hover{
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-sm{
  padding: 9px 18px;
  font-size: 0.82rem;
}

/* ---------- HERO ---------- */
.hero{
  position: relative;
  overflow: hidden;
  padding: 96px 0 110px;
  scroll-margin-top: var(--nav-h);
}
.hero::before,
.hero::after{
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(10px);
  animation: heroDrift ease-in-out infinite;
}
.hero::before{
  width: 520px;
  height: 520px;
  top: -220px;
  left: -180px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.16;
  animation-duration: 20s;
}
.hero::after{
  width: 460px;
  height: 460px;
  bottom: -220px;
  right: -160px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.12;
  animation-duration: 24s;
  animation-delay: -8s;
}
@keyframes heroDrift{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  33%{ transform: translate(50px, 35px) scale(1.1); }
  66%{ transform: translate(-35px, 25px) scale(0.95); }
}
.hero-grid{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items:center;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight:700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow::before{
  content:"";
  width: 26px; height:1px;
  background: var(--accent);
}
.hero h1{
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.14;
}
.hero h1 .accent{
  color: var(--accent);
  font-style: italic;
  white-space: nowrap;
}
.role-line{
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight:600;
  color: var(--text);
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}
.role-line .dot{ color: var(--accent); }
.hero-copy{
  margin-top: 20px;
  font-size: 1rem;
  line-height:1.75;
  color: var(--muted);
  max-width: 46ch;
}
.hero-cta{
  display:flex;
  gap:14px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.meta-grid{
  margin-top: 46px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  max-width: 440px;
}
.meta-item .meta-label{
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight:700;
  margin-bottom: 4px;
}
.meta-item .meta-value{
  font-size: 0.95rem;
  font-weight:600;
  color: var(--text);
}
.meta-item a.meta-value{
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

/* ---------- HERO VISUAL ---------- */
.hero-visual{ position:relative; }
.photo-frame{
  position:relative;
  z-index: 1;
  border-radius: 22px;
  overflow:hidden;
  aspect-ratio: 4 / 4.6;
  box-shadow: 0 30px 60px -30px rgba(15,23,42,0.35);
}
.photo-frame svg{ width:100%; height:100%; }

/* each device (laptop/tablet/phone) floats gently and independently */
.device-float{
  animation-name: deviceFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes deviceFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}

/* laptop UI elements build themselves in once, on load */
.bar-build{
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 0% 50%;
  transform: scaleX(0.15);
  animation: barBuildIn 0.45s ease forwards;
}
@keyframes barBuildIn{
  to{ opacity: 1; transform: scaleX(1); }
}
.card-build{
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transform: translateY(8px) scale(0.94);
  animation: cardBuildIn 0.45s ease forwards;
}
@keyframes cardBuildIn{
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

/* subtle pulse near the CTA, hinting at interactivity */
.pulse-ring{
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: ctaPulse 2.4s ease-out 1.2s infinite;
}
@keyframes ctaPulse{
  0%{ transform: scale(1); opacity: 0.4; }
  100%{ transform: scale(3); opacity: 0; }
}

.id-card{
  position:absolute;
  z-index: 3;
  left: -8%;
  bottom: -13%;
  width: 78%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 24px 48px -18px rgba(15,23,42,0.28);
  border: 1px solid var(--line);
}
.id-card h3{
  font-size: 1.05rem;
  font-weight:600;
  color: var(--text);
}
.id-card .id-sub{
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}
.id-card .id-cols{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.id-card .id-cols .label{
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  font-weight:700;
  margin-bottom: 4px;
}
.id-card .id-cols .value{
  font-size: 0.86rem;
  font-weight:600;
  color: var(--text);
}

/* ---------- SHARED SECTION LAYOUT ---------- */
.section{
  padding: 108px 0;
  scroll-margin-top: var(--nav-h);
  border-top: 1px solid var(--line);
}
.section-alt{ background: var(--bg-soft); }

.section-head{
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head .eyebrow{ margin-bottom: 16px; }
.section-title{
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 600;
  line-height: 1.2;
}
.section-intro{
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* reveal-on-scroll */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- ABOUT ---------- */
.about-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items:start;
}
.about-copy p{
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 18px;
}
.about-copy p:last-child{ margin-bottom: 0; }
.stat-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.stat-item .stat-num{
  font-family: 'Poppins', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat-item .stat-label{
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- SIGNATURE WORK ---------- */
.work-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.work-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display:flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.work-card:hover{
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -24px rgba(15,23,42,0.25);
}
.work-tag{
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.work-card h3{
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.work-card p{
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 20px;
  flex-grow: 1;
}
.chip-row{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.chip{
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.work-link{
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  display:inline-flex;
  align-items:center;
  gap: 6px;
}
.work-link svg{ width: 14px; height: 14px; transition: transform 0.2s ease; }
.work-link:hover svg{ transform: translateX(3px); }

/* ---------- EXPERIENCE ---------- */
.timeline{
  position: relative;
  max-width: 760px;
}
.timeline::before{
  content:"";
  position:absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item{
  position: relative;
  padding-left: 40px;
  margin-bottom: 44px;
}
.timeline-item:last-child{ margin-bottom: 0; }
.timeline-item::before{
  content:"";
  position:absolute;
  left: 0;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}
.timeline-head{
  display:flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 6px;
}
.timeline-role{
  font-size: 1.05rem;
  font-weight: 600;
}
.timeline-role span{
  color: var(--muted);
  font-weight: 500;
}
.timeline-date{
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.timeline-item ul{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-item li{
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}
.timeline-item li::before{
  content:"";
  position:absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

/* ---------- SKILLS ---------- */
.skills-filters{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-pill{
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.filter-pill:hover{
  border-color: var(--accent);
  color: var(--accent);
}
.filter-pill.is-active{
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.filter-pill:active{ transform: scale(0.97); }

.skills-cloud-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.skills-cloud{
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
}
.skill-chip{
  font-size: 0.85rem;
  padding: 8px 16px;
}
.skill-chip[hidden]{ display:none; }

/* ---------- ACHIEVEMENTS ---------- */
.achieve-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.achieve-card{
  display:flex;
  gap: 18px;
  align-items:flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.achieve-icon{
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display:flex;
  align-items:center;
  justify-content:center;
}
.achieve-icon svg{ width: 20px; height: 20px; }
.achieve-card h3{
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.achieve-card p{
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- FOOTER ---------- */
.site-footer{
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 72px 0 32px;
}
.footer-top{
  display:grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-brand .brand-mark{ width: 38px; height: 38px; font-size: 0.78rem; }
.footer-brand-name{
  font-family:'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}
.footer-tagline{
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 32ch;
  margin: 0;
}
.footer-col-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width: 100%;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  cursor: default;
}
.footer-col-toggle .chevron{
  display: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.footer-col ul{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a{
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer-col a:hover{ color: var(--accent); }

.footer-bottom{
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.footer-bottom p{
  color: var(--muted);
  font-size: 0.82rem;
  margin:0;
}
.back-to-top{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.back-to-top svg{ width: 14px; height: 14px; }

@media (max-width: 780px){
  .footer-top{
    grid-template-columns: 1fr 1fr;
    row-gap: 36px;
  }
}
@media (max-width: 520px){
  .footer-top{ grid-template-columns: 1fr; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; }

  .footer-col{ border-bottom: 1px solid var(--line); }
  .footer-col-toggle{
    cursor: pointer;
    padding: 16px 0;
    margin-bottom: 0;
  }
  .footer-col-toggle .chevron{ display:block; }
  .footer-col-toggle[aria-expanded="true"] .chevron{ transform: rotate(180deg); }

  .footer-col ul{
    max-height: 0;
    overflow: hidden;
    gap: 0;
    transition: max-height 0.3s ease;
  }
  .footer-col ul.is-open{
    max-height: 320px;
    padding-bottom: 18px;
  }
  .footer-col ul li{ padding-top: 12px; }
  .footer-col ul li:first-child{ padding-top: 4px; }
}

/* ---------- CV MODAL ---------- */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(3px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-backdrop.is-open{
  opacity: 1;
  visibility: visible;
}
.modal-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 40px 80px -30px rgba(15,23,42,0.45);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-backdrop.is-open .modal-card{
  transform: translateY(0) scale(1);
}
.modal-close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.modal-close:hover{ border-color: var(--accent); color: var(--accent); }
.modal-close svg{ width: 16px; height: 16px; }

.modal-head{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 22px;
  padding-right: 30px;
}
.modal-brand-mark{ width: 44px; height: 44px; font-size: 0.85rem; }
.modal-head h3{
  font-size: 1.1rem;
  font-weight: 600;
}
.modal-sub{
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-preview{
  display:flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.preview-row span{
  display:block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 3px;
}
.preview-row p{
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.modal-download{
  width: 100%;
}
.modal-download svg{ width: 16px; height: 16px; }

/* ---------- CASE STUDY MODAL ---------- */
.case-modal-card{
  max-width: 620px;
  padding: 0;
  overflow: hidden;
  max-height: 88vh;
  overflow-y: auto;
}
.case-banner{
  height: 180px;
  background: linear-gradient(135deg, var(--navy, #0F172A), #1E293B);
  background: linear-gradient(135deg, #0F172A, #1E293B);
  display:flex;
  align-items:center;
  justify-content:center;
  position: relative;
}
.case-banner span{
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--accent);
  border: 3px solid var(--accent);
  border-radius: 50%;
  width: 96px;
  height: 96px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(59,130,246,0.12);
}
.case-modal-card .modal-close{
  top: 16px;
  right: 16px;
  background: rgba(15,23,42,0.55);
  border-color: rgba(255,255,255,0.25);
  color: #F8FAFC;
}
.case-modal-card .modal-close:hover{ border-color: #F8FAFC; color: #F8FAFC; }

.case-body{
  padding: 28px 32px 32px;
}
.case-body .work-tag{ margin-bottom: 8px; }
.case-body h3{
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.case-meta{
  display:flex;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.case-meta span{
  display:block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 3px;
}
.case-meta p{
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.case-section{ margin-bottom: 20px; }
.case-section:last-child{ margin-bottom: 0; }
.case-section h4{
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.case-section p{
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}
.case-section .chip-row{ margin-bottom: 0; }

@media (max-width: 560px){
  .modal-backdrop{ padding: 14px; }
  .modal-card{ padding: 26px 22px; }
  .case-body{ padding: 22px 20px 26px; }
  .case-meta{ gap: 24px; flex-wrap: wrap; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px){
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px){
  .nav-toggle{ display:none; }
  .nav-contact-btn{ display:none; }

  .site-footer{ padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 32px); }

  .mobile-tabbar{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 58;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(15,23,42,0.3);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tab-item{
    display:flex;
    flex-direction: column;
    align-items:center;
    justify-content:center;
    gap: 4px;
    padding: 10px 4px 8px;
    background: none;
    border: none;
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
  }
  .tab-item svg{ width: 21px; height: 21px; }
  .tab-item .icon-close{ display:none; }
  .tab-item[aria-expanded="true"] .icon-burger{ display:none; }
  .tab-item[aria-expanded="true"] .icon-close{ display:block; }
  .tab-item.is-active{ color: var(--accent); }
  .tab-item.is-active svg{
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 3px;
    box-sizing: content-box;
  }

  .nav-backdrop{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(15,23,42,0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .nav-backdrop.is-open{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links{
    position: fixed;
    z-index: 60;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 40px -16px rgba(15,23,42,0.35);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: max-height 0.32s ease, opacity 0.25s ease;
  }
  .nav-links.is-open{
    max-height: 420px;
    opacity: 1;
  }
  .nav-sheet-handle{
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--line);
    margin: 12px auto 4px;
  }
  .nav-links a{
    padding: 16px 32px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a::after{ display:none; }
  .nav-links a:last-child{ border-bottom: none; }

  .hero{ padding: 56px 0 130px; }
  .hero-grid{
    grid-template-columns: 1fr;
    gap: 90px;
  }
  .hero-visual{ order:-1; max-width: 380px; margin: 0 auto; }
  .meta-grid{ max-width: none; }
  .about-grid{ grid-template-columns: 1fr; gap: 34px; }
  .section{ padding: 76px 0; }
}
@media (max-width: 620px){
  .achieve-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .wrap{ padding: 0 20px; }
  .hero-cta{ flex-direction:column; align-items:stretch; }
  .id-card{ left: 0; width: 92%; }
  .work-grid{ grid-template-columns: 1fr; }
  .skills-cloud-card{ padding: 22px; }
  .stat-card{ grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px; }
}

/* ---------- COPY EMAIL BUTTON ---------- */
.email-row{
  display:flex;
  align-items:center;
  gap: 8px;
}
.footer-email-item{
  display:flex;
  align-items:center;
  gap: 8px;
}
.copy-btn{
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  position: relative;
}
.copy-btn:hover{ border-color: var(--accent); color: var(--accent); }
.copy-btn svg{ width: 13px; height: 13px; }
.copy-btn .icon-check{ display:none; color: #22C55E; }
.copy-btn.is-copied{ border-color: #22C55E; color: #22C55E; }
.copy-btn.is-copied .icon-copy{ display:none; }
.copy-btn.is-copied .icon-check{ display:block; }

.copy-btn::after{
  content: "Copy email";
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.copy-btn:hover::after{ opacity: 1; }
.copy-btn.is-copied::after{
  content: "Copied!";
  opacity: 1;
}

/* ---------- CONTACT MODAL / FORM ---------- */
.contact-modal-card{
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

#contact-form{
  display:flex;
  flex-direction: column;
  gap: 16px;
}
.form-row{
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label{
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.form-optional{
  font-weight: 400;
  color: var(--muted);
}
.form-row input,
.form-row select,
.form-row textarea{
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.form-row textarea{ resize: vertical; min-height: 90px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row select{ cursor: pointer; }

.contact-submit{
  width: 100%;
  margin-top: 4px;
}
.contact-submit svg{ width: 16px; height: 16px; }

.contact-note{
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.contact-note.is-status{
  color: var(--accent);
  font-weight: 600;
}