/* Brand logo sizing and alignment */
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.site-header .brand-logo {
  display: block;
  height: 32px; /* adjust as needed */
  width: auto;
  object-fit: contain;
}

/* Keep header items vertically centered */
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ensure menu aligns nicely next to brand */
.site-header .menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}
/* Base */
:root {
  --bg: rgb(28, 29, 30);
  --text: #dce1f1; 
  --muted: #dce1f1; 
  --line: #e5e7eb; 
  /* --accent: #2563eb;  */
  --accent: rgb(233, 51, 31);
  --accent-700: #1d4ed8;
  --nav-height: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { height: 100%; }
body { overflow: hidden; }
main { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: none; scroll-behavior: smooth; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: min(1100px, 92%); margin-inline: auto; }

/* Header / Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: transparent;
  border: none;
  padding-inline: 0;
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* Header logo size */
.site-header .logo { height: 40px; width: auto; display: block; }

.section-home .logo {
  display: block;
  margin: 0 auto 0px;
  max-width: 500px;
}
.menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 0px solid transparent;
  border-radius: 9999px;
  color: var(--accent);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  font-weight: 600;
}
.nav-link:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.nav-link.active { background: var(--accent); color: #fff; }

/* Sections */
.section {
  position: relative; /* ensure section-specific absolute positioning */
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
}
.section-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('img/bg1.png') center/cover no-repeat;
  color: #fff;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.section-home > .container { 
  padding-top: var(--nav-height);
  /* Gray background that fades toward the edges */
  background: rgba(28, 29, 30, 0.95);
  border-radius: 16px;
  /* Create transparent edges with a radial mask */
  -webkit-mask-image: radial-gradient(closest-side, #000 95%, transparent 20%);
  mask-image: radial-gradient(closest-side, #000 95%, transparent 20%);
  /* Space so the fade is visible inside the box */
  padding: 32px;
  /* Optional subtle blur glow outside the box */
  box-shadow: 0 8px 40px 12px rgba(0, 0, 0, 0.85);
}
/* When wrapped, preserve the home container styling */
.section-home .home-block > .container {
  padding-top: var(--nav-height);
  background: rgba(28, 29, 30, 0.98);
  -webkit-mask-image: radial-gradient(closest-side, #000 90%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 90%, transparent 100%);
  padding: 48px;
  box-shadow: 0 8px 40px 12px rgba(0, 0, 0, 0.65);
}
.section:not(.section-home) > .container { padding-top: var(--nav-height); }
.section-home::after {
  content: "";
  position: absolute;
  inset: 0;
  /* background: rgba(5, 8, 24, 0.78); 50% dark overlay */
  pointer-events: none;
  z-index: 0;
}
.section-home > .container { position: relative; z-index: 1; justify-content: center;  }
.section-home .home-block > .container { position: relative; z-index: 1; justify-content: center; }
#home-title { color: #dce1f1; font-weight: 800; text-align: center; }
.section-home .lead {
   color: var(--accent); 
   font-weight: 700; 
   font-size: 24px;
   text-align: center;  
   max-width: 48ch;
  margin: 4px auto 0;
}
.section-home .descript {
  color: #bfc6d0;
  max-width: 48ch;
  margin: 12px auto 0;
  text-align: center;
}
.section-home .btn { color: #111827; }

/* Align wrapped block vertically and push CTA to bottom (above scroll indicator) */
.section-home .home-block { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  min-height: 100vh; 
}
/* Keep the content slightly top-from-center; CTA sticks to bottom */
.section-home .home-block .container { margin-top: 25vh; }
.section-home .home-block .cta-row { 
  margin-top: auto; 
  margin-bottom: 80px; /* spacing above scroll indicator */
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(180,180,180,0.20);
  color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  z-index: 2;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  animation: bob 1.8s ease-in-out infinite;
}
.scroll-indicator:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }
.scroll-indicator:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.scroll-indicator svg { width: 20px; height: 20px; fill: currentColor; opacity: 0.92; }

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

.lead { font-size: 1.0625rem; color: var(--muted); max-width: 60ch; }
.subtle { margin-top: 4px; max-width: 650px; font-size: large; font-weight:600 }
#portfolio .subtle { margin-left: auto; margin-right: auto; }
#services .subtle { margin-left: auto; margin-right: auto; text-align: center;}

.btn { display: inline-block; padding: 0.6rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-700); border-color: var(--accent-700); }

/* CTA row: convert buttons to bold red links with subtle hover */
.cta-row { 
   display: flex; 
   gap: 80px; 
   flex-wrap: wrap; 
   justify-content: center; 
   background: rgba(28, 29, 30, 0.90);
  -webkit-mask-image: radial-gradient(closest-side, #000 85%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 85%, transparent 100%);
  padding-left: 48px;
  padding-right: 48px;
  padding-top: 24px;
   padding-bottom: 24px;
}
.cta-row .btn {
  background: none;
  border: none;
  padding: 0;
  color: #ff0000; /* bold red text */
  font-weight: 700;
  font-size: 1.175rem;
  text-decoration: none;
  box-shadow: none;
  border-radius: 0;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.cta-row .btn.primary {
  background: none; /* ensure primary doesn't re-apply button style */
  border: none;
  color: #ff0000;
}
.cta-row .btn:hover,
.cta-row .btn:focus {
  color: #ff2525; /* slight darken on hover */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* Grids */
.grid { display: grid; gap: 18px; }
.portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 18px; }
.services-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 18px; }

.card {  padding: 0px;  }
.card-img { border-radius: 8px; max-width: 16vw; display: block; margin: 0 auto;}

.service { 
  border: 1px solid var(--line); 
  border-radius: 8px; 
  padding: 14px; 
  background: #363e45; 
}
.service p { color: var(--muted); margin: 6px 0 0; }
.service #icon { width: 32px; height: 32px; display: block; margin-bottom: 12px; fill: var(--accent); }


/* Contact */
.section-contact { padding-bottom: clamp(96px, 10vw, 140px); }
.contact-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.contact-list .k { display: inline-block; min-width: 84px; color: #111827; font-weight: 600; }
.contact-list a { color: var(--accent); }
.contact-list a:hover { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }

/* Accessibility */
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; border-radius: 6px; }

/* Center alignment for Portfolio, Services, and Contact section headings and text */
#portfolio h2,
#portfolio .subtle,
#services h2,
#contact h2,
#contact .subtle,
#contact .contact-list { text-align: center; }
#contact .subtle { margin-left: auto; margin-right: auto; text-align: center; }

/* Light image backgrounds with white 50% overlay for Portfolio, Services, Contact */
#portfolio,
#services,
#contact {
  background:
    linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
    url('img/bg2.jpg') center/cover no-repeat;
}

/* Titles to match accent */
#portfolio h2,
#services h2,
#contact h2 {
  color: var(--accent);
}

/* Subtle texts to black in light sections */
#portfolio .subtle,
#services .subtle,
#contact .subtle {
  color: #000;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  -webkit-mask-image: radial-gradient(closest-side, #fff 85%, transparent 100%);
  mask-image: radial-gradient(closest-side, #fff 85%, transparent 100%);
  padding: 32px;
  box-shadow: 0 8px 40px 12px rgba(0, 0, 0, 0.35);
}

#contact .subtle { margin-bottom: 80px; }

/* Services: left-align card content */
#services .service { text-align: left; }

/* Small tweaks */
@media (max-width: 720px) {
  .site-header {
    height: auto;
  }

  .section-home > .container,
  .section:not(.section-home) > .container {
    padding-top: calc(var(--nav-height) + 8px);
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding-block: 8px;
    row-gap: 6px;
  }

  .brand {
    flex-basis: 100%;
    text-align: center;
    font-size: 1rem;
  }

  .menu {
    margin-left: 0;
    justify-content: center;
  }

  .nav-link {
    padding: 0.45rem 0.75rem;
  }

  .section-home .logo {
    max-width: 75vw;
  }

  /* Make portfolio/service images larger on mobile without affecting desktop */
  .card-img { max-width: 88vw; }
}

/* Contact cards */
.contact-cards { 
  list-style: none; 
  padding: 0; 
  margin: 28px 0 0; 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; /* center the row */
  gap: 20px; 
}

.contact-card { 
  flex: 0 1 30%; /* 30% width target */
  max-width: 30%;
  min-width: 260px; /* reasonable min so it wraps nicely */
  display: flex; 
  justify-content: center;
  gap: 14px; 
  padding: 16px 18px; 
   background: rgba(251, 249, 249, 0.7);
  border-radius: 16px;
  -webkit-mask-image: radial-gradient(closest-side, #fff 85%, transparent 100%);
  mask-image: radial-gradient(closest-side, #fff 85%, transparent 100%);
  padding: 32px;
  box-shadow: 0 8px 40px 12px rgba(0, 0, 0, 0.35);
}

.contact-card .icon-box { 
  width: 42px; 
  height: 42px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  /* background: rgba(37,99,235,0.14); subtle accent tint */
  border-radius: 8px; 
  flex-shrink: 0; 
}

.contact-card .icon { 
  width: 24px; 
  height: 24px; 
  fill: var(--accent); /* match accent color */
}

.contact-card .content { 
  display: flex; 
  flex-direction: column; 
  text-align: left; /* left-align content */
}
.contact-card .label { 
  font-size: 0.9rem; 
  letter-spacing: 0.06em; 
  text-transform: uppercase; 
  font-weight: 600; 
  color: black; 
}
.contact-card .value { 
  margin-top: 4px; 
  font-weight: 600; 
  color: black; 
  word-break: break-word; 
}

@media (max-width: 820px) {
  .contact-card { flex: 1 1 45%; max-width: 45%; }
}
@media (max-width: 560px) {
  .contact-card { flex: 1 1 100%; max-width: 100%; }
}
