/* ============================================================
   BYTE ENVISION — GitHub Pages Portfolio
   Designer: Production-grade dark editorial
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:           #08080A;
  --bg-2:         #0E0E11;
  --bg-card:      #131316;
  --bg-card-h:    #1A1A1E;
  --accent:       #F5A623;
  --accent-pale:  rgba(245,166,35,0.10);
  --accent-rim:   rgba(245,166,35,0.28);
  --txt:          #EDEAE4;
  --txt-2:        #7E7B76;
  --txt-3:        #3E3C39;
  --line:         rgba(255,255,255,0.06);
  --line-h:       rgba(255,255,255,0.12);
  --ff-display:   'Syne', sans-serif;
  --ff-body:      'DM Sans', sans-serif;
  --r-sm:  6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --ease: cubic-bezier(0.4,0,0.2,1);
  --w: 1100px;
}

/* ── RESET ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
img { max-width:100%; height:auto; display:block; }
h1,h2,h3,h4 {
  font-family: var(--ff-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--txt);
}
ul { list-style: none; }
button { cursor: pointer; font-family: var(--ff-body); }

/* ── NOISE OVERLAY ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: 60px;
  background: rgba(8,8,10,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--txt);
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .2s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--txt); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #08080A !important;
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,166,35,0.38);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--txt);
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 899;
  padding: 32px 24px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .3s var(--ease);
}
.nav-drawer.open {
  display: flex;
  transform: translateX(0);
}
.nav-drawer a {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--txt);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: block;
  letter-spacing: -0.03em;
}
.nav-drawer a:last-child { margin-top: 16px; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.page-wrap { padding-top: 60px; }
.container {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }

/* ── TYPOGRAPHY UTILITIES ───────────────────────────────── */
.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-pale);
  border: 1px solid var(--accent-rim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}
.label-tag::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 15px;
  color: var(--txt-2);
  max-width: 480px;
  font-weight: 300;
  line-height: 1.75;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: 100px;
  padding: 12px 26px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #08080A;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,166,35,0.38);
  color: #08080A;
}
.btn-ghost {
  background: transparent;
  color: var(--txt);
  border: 1px solid var(--line-h);
}
.btn-ghost:hover {
  border-color: var(--accent-rim);
  background: var(--accent-pale);
  color: var(--txt);
}
.btn-sm { font-size: 12px; padding: 8px 18px; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color .2s var(--ease), transform .25s var(--ease), background .2s;
}
.card:hover {
  border-color: var(--line-h);
  background: var(--bg-card-h);
  transform: translateY(-3px);
}
.card-body { padding: 24px; }
.card-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--ff-display);
  color: var(--txt);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card-text {
  font-size: 13px;
  color: var(--txt-2);
  line-height: 1.65;
}

/* ── DIVIDER ────────────────────────────────────────────── */
.hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ── TAGS ───────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--txt-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── PAGE HERO ──────────────────────────────────────────── */
.page-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  max-width: 720px;
}
.page-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.page-hero-sub {
  font-size: 17px;
  color: var(--txt-2);
  max-width: 560px;
  font-weight: 300;
  line-height: 1.75;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { font-family: var(--ff-display); font-size: 19px; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 10px; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: 13px; color: var(--txt-2); line-height: 1.7; margin-bottom: 20px; max-width: 260px; }
.footer-col-title { font-size: 10px; font-weight: 700; color: var(--txt-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13px; color: var(--txt-2); transition: color .2s; }
.footer-links a:hover { color: var(--txt); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--txt-3);
}

/* ── APP CARD ───────────────────────────────────────────── */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color .2s, background .2s, transform .25s var(--ease);
  text-decoration: none;
}
.app-card:hover {
  border-color: var(--accent-rim);
  background: var(--bg-card-h);
  transform: translateY(-2px);
}
.app-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--accent-pale);
  border: 1px solid var(--accent-rim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.app-name { font-family: var(--ff-display); font-size: 14px; font-weight: 700; color: var(--txt); margin-bottom: 4px; letter-spacing: -0.02em; }
.app-desc { font-size: 12px; color: var(--txt-2); line-height: 1.55; margin-bottom: 10px; }
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── PROJECT ROW ────────────────────────────────────────── */
.project-row {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  transition: border-color .2s, background .2s;
  margin-bottom: 3px;
  text-decoration: none;
}
.project-row:hover {
  border-color: var(--line-h);
  background: var(--bg-card-h);
}
.project-num { font-size: 10px; font-weight: 700; color: var(--txt-3); letter-spacing: 0.12em; margin-bottom: 7px; }
.project-title { font-size: 19px; font-weight: 700; font-family: var(--ff-display); color: var(--txt); margin-bottom: 6px; letter-spacing: -0.025em; }
.project-summary { font-size: 13px; color: var(--txt-2); line-height: 1.6; margin-bottom: 14px; }
.project-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt-2);
  transition: border-color .2s, color .2s, transform .2s;
  flex-shrink: 0;
}
.project-row:hover .project-arrow {
  border-color: var(--accent-rim);
  color: var(--accent);
  transform: translate(2px,-2px);
}

/* ── SERVICE CARD ───────────────────────────────────────── */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  transition: border-color .2s, transform .25s var(--ease);
}
.service-card:hover {
  border-color: var(--accent-rim);
  transform: translateY(-2px);
}
.service-icon { font-size: 28px; margin-bottom: 16px; display: block; }
.service-title { font-family: var(--ff-display); font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 8px; }
.service-desc { font-size: 13px; color: var(--txt-2); line-height: 1.65; }

/* ── STAT ───────────────────────────────────────────────── */
.stat-num { font-family: var(--ff-display); font-size: 36px; font-weight: 800; color: var(--txt); letter-spacing: -0.05em; line-height: 1; }
.stat-label { font-size: 12px; color: var(--txt-2); margin-top: 6px; letter-spacing: 0.02em; }

/* ── TESTIMONIAL ────────────────────────────────────────── */
.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 24px;
}
.testi-quote { font-size: 14px; color: var(--txt-2); line-height: 1.75; font-weight: 300; font-style: italic; margin-bottom: 20px; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-pale);
  border: 1px solid var(--accent-rim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
.testi-name { font-size: 13px; font-weight: 600; color: var(--txt); }
.testi-role { font-size: 11px; color: var(--txt-3); }

/* ── FORM ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 10px; font-weight: 700; color: var(--txt-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; }
.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--txt);
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--accent-rim); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--txt-3); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── BLOG CARD ──────────────────────────────────────────── */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 180px 1fr;
  transition: border-color .2s, transform .25s var(--ease);
  text-decoration: none;
}
.blog-card:hover {
  border-color: var(--line-h);
  transform: translateY(-2px);
}
.blog-thumb {
  background: var(--bg-2);
  min-height: 140px;
  overflow: hidden;
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-content { padding: 20px 22px; }
.blog-cat { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; }
.blog-title { font-size: 16px; font-weight: 700; font-family: var(--ff-display); color: var(--txt); margin-bottom: 7px; line-height: 1.25; letter-spacing: -0.02em; }
.blog-excerpt { font-size: 12px; color: var(--txt-2); line-height: 1.65; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { font-size: 11px; color: var(--txt-3); display: flex; align-items: center; justify-content: space-between; }
.blog-readmore { font-size: 11px; font-weight: 700; color: var(--accent); }

/* ── CASE STUDY ─────────────────────────────────────────── */
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cs-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 28px;
}
.cs-block:first-child { border-radius: var(--r-lg) 0 0 0; }
.cs-block:nth-child(2) { border-radius: 0 var(--r-lg) 0 0; }
.cs-block:nth-child(3) { border-radius: 0 0 0 var(--r-lg); }
.cs-block:last-child { border-radius: 0 0 var(--r-lg) 0; }
.cs-block-title { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.cs-block-text { font-size: 14px; color: var(--txt-2); line-height: 1.7; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px;
}
.sidebar-widget-title { font-size: 10px; font-weight: 700; color: var(--txt-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.sidebar-cta {
  background: var(--accent-pale);
  border: 1px solid var(--accent-rim);
  border-radius: var(--r-xl);
  padding: 24px;
  text-align: center;
}
.sidebar-cta-title { font-family: var(--ff-display); font-size: 15px; font-weight: 800; color: var(--txt); margin-bottom: 7px; letter-spacing: -0.02em; }
.sidebar-cta-sub { font-size: 12px; color: var(--txt-2); margin-bottom: 16px; line-height: 1.6; }

/* ── CONTACT BLOCK ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 48px;
  margin-top: 40px;
}
.contact-title { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 12px; }
.contact-sub { font-size: 14px; color: var(--txt-2); font-weight: 300; line-height: 1.75; margin-bottom: 24px; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--txt-2); margin-bottom: 12px; }
.contact-item strong { color: var(--txt); font-weight: 500; }

/* ── INLINE AD SLOT ─────────────────────────────────────── */
.ad-slot { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 24px 0; }
.ad-label { font-size: 9px; color: var(--txt-3); text-align: center; padding: 5px; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--line); }

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-3); margin-bottom: 28px; flex-wrap: wrap; }
.breadcrumb a { color: var(--txt-2); }
.breadcrumb a:hover { color: var(--txt); }
.breadcrumb-sep { color: var(--txt-3); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .cs-grid { grid-template-columns: 1fr; }
  .cs-block { border-radius: 0 !important; }
  .cs-block:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }
  .cs-block:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg) !important; }
  .contact-grid { grid-template-columns: 1fr; padding: 28px 24px; }
  .blog-card { grid-template-columns: 1fr; }
  .blog-thumb { min-height: 180px; }
  .project-row { grid-template-columns: 1fr; }
  .project-arrow { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 56px 0; }
  .page-hero { padding: 48px 0 40px; }
}
@media (max-width: 420px) {
  .contact-grid { padding: 20px; }
}
