/* styles.css — cleaned + consistent + robust header + slightly richer cards/sections
   Drop-in replacement for your current file.
*/

:root {
  --bg: #0b0f14;
  --card: #101824;
  --text: #e6edf3;
  --muted: #b3c2d1;
  --line: rgba(255, 255, 255, .10);
  --accent: #7dd3fc;

  --max: 1100px;
  --r: 16px;

  /* Single source of truth for when desktop nav collapses */
  --nav-collapse: 980px;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

html,
body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(125, 211, 252, .10), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(167, 139, 250, .10), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none
}

a:hover {
  opacity: .95
}

.card,
p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background: radial-gradient(800px 500px at 50% 15%, rgba(255,255,255,.06), transparent 60%);
  opacity:.6;
  z-index:-1;
}

.faq-list{max-width: 820px;}
@media (min-width: 981px){
  .faq-list{margin-left:auto; margin-right:auto;}
}

details.faq summary{
  cursor:pointer;
  font-weight:700;
  color:var(--text);
  list-style:none;
  padding-right: 18px;
  position:relative;
}
details.faq summary::-webkit-details-marker{display:none}

details.faq summary:after{
  content:" ⌄";
  position:relative;
  right:0;
  top:0;
  color:var(--muted);
}
details.faq[open] summary:after{content:" ⌃"}

details.faq p{
  margin:10px 0 0;
  color:var(--muted);
}


.row {
  display: flex;
  gap: 18px;
  align-items: center
}

.wrap {
  flex-wrap: wrap
}

.between {
  justify-content: space-between
}

/* ---------------- Header / Nav ---------------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
}

/* Make sure the header row is actually flex and can shrink items safely */
.container.nav.row {
  gap: 12px;
  /* tighter header spacing */
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  min-width: 0;
  /* allows flex shrink */
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px
}

.brand .name {
  letter-spacing: .2px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Desktop nav */
nav[aria-label="Primary"] {
  white-space: nowrap;
  min-width: 0;
}

nav a {
  color: var(--muted);
  padding: 8px 8px;
  /* tighter to fit more often */
  border-radius: 10px;
}

nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

/* Hamburger */
.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  padding: 10px 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--muted)
}

.mobile-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

.mobile-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

/* Hide the badge earlier to prevent header crowding (tablet widths) */
@media (max-width: 1180px) {
  .badge {
    display: none
  }
}

/* Collapse desktop nav into hamburger */
@media (max-width: 980px) {
  nav[aria-label="Primary"] {
    display: none
  }

  .menu-btn {
    display: inline-flex
  }

  .mobile-nav.show {
    display: block
  }

  .grid.cols-3 {
    grid-template-columns: 1fr
  }

  .grid.cols-2 {
    grid-template-columns: 1fr
  }
}

/* ---------------- Hero / Buttons ---------------- */

.hero {
  padding: 60px 0 26px;
}

.hero h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px;
}

.hero p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 70ch;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 600;
  transition: transform .15s, filter .15s, border-color .15s;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(125, 211, 252, .22), rgba(167, 139, 250, .18));
  border-color: rgba(125, 211, 252, .35);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05)
}

/* ---------------- Layout / Cards ---------------- */

.section {
  padding: 34px 0;
}

.section+.section {
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: .2px;
}

.kicker {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.card {
  position: relative;
  background: rgba(16, 24, 36, .80);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .15s, border-color .15s, filter .15s;
}

.card:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
  opacity: .7;
}

.card:hover {
  border-color: rgba(255, 255, 255, .18);
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px
}

.card p {
  margin: 0;
  color: var(--muted)
}

/* ---------------- Projects / Chips ---------------- */

.project {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
What
.project img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px
}

.chip {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

@media (max-width: 520px) {
  .project {
    flex-direction: column
  }

  .project img {
    width: 100%;
    height: auto
  }
}

/* ---------------- Separators / Footer ---------------- */

hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------- Forms ---------------- */

form {
  display: grid;
  gap: 12px
}

label {
  font-size: 13px;
  color: var(--muted)
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical
}

.small {
  font-size: 12px;
  color: var(--muted)
}

.notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted)
}

.notice.ok {
  border-color: rgba(34, 197, 94, .35)
}

.notice.err {
  border-color: rgba(239, 68, 68, .35)
}



/* --- Services hero split --- */
.hero-split {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 16px;
  align-items: start;
}

.hero-card {
  padding: 18px
}

.grid.cols-1 {
  grid-template-columns: 1fr
}

/* Softer inner cards (used in services hero) */
.card.soft {
  background: rgba(255, 255, 255, .03);
  box-shadow: none;
}

.card.soft:before {
  display: none
}

.card.soft:hover {
  transform: none;
  filter: none
}

/* Responsive */
@media (max-width: 980px) {
  .hero-split {
    grid-template-columns: 1fr
  }
}

/* Contact-specific layout helpers */
.contact-form-grid{grid-template-columns: repeat(2, minmax(0,1fr));}
.contact-details-grid{grid-template-columns: repeat(3, minmax(0,1fr));}

@media (max-width: 860px){
  .contact-form-grid{grid-template-columns:1fr;}
  .contact-details-grid{grid-template-columns:1fr;}
}

.grid{align-items:start}
.card{align-self:start}

/* Contact layout — single centered column */
.contact-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  align-items:start;
  max-width: 820px;
  margin: 0 auto;
}
/* Center details under the form */
.contact-details-centered{
  max-width: 820px;
  margin: 16px auto 0;
  text-align: center;
}
/* Modal (more readable) */
.modal{
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(920px, calc(100vw - 24px));
}

.modal::backdrop{
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

/* Modal surface: opaque enough to read */
.modal-inner{
  max-height: min(86vh, 920px);
  overflow: auto;

  background: rgba(16, 24, 36, .96);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
    outline: 1px solid rgba(255,255,255,.06);
}

/* optional: slightly reduce the glossy overlay inside modals */
.modal-inner::before{
  opacity: .35;
}

/* -------- Modal gallery layout -------- */
#pmGallery{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

#pmGallery img{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  object-fit: cover;
}

/* Tablet */
@media (max-width: 1024px){
  #pmGallery{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ps-block{
  display: flex;
  gap:16px;
  align-items:flex-start;
  margin:16px 0;
  flex-wrap:nowrap;
}


.ps-divider{
  flex:0 0 auto;
  padding-top: 35px;  
  padding-right: 30px; 
  color: var(--accent);
  font-size: 48px;
  font-weight: 700;
  opacity: .85;
}

.hi-row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:16px;
    padding-right:62px;

  align-items:start;
}

.hi-main{ min-width:0; }

.hi-qr{
  width: 170px;
  text-align:center;
  padding:10px;
  border-radius:14px;
}

/* About: centered single column layout */
.about-wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  max-width: 920px;
  margin: 0 auto;
}

/* People cards */
.avatar{
  width:56px;
  height:56px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  flex:0 0 auto;
}

/* Make “chips that are links” look clickable */
.link-chip{
  border-color: rgba(125,211,252,.28);
  background: rgba(125,211,252,.08);
  color: var(--text);
}

.link-chip:hover{
  filter: brightness(1.08);
}

/* Ensure soft cards don’t stretch oddly */
.about-people .card.soft{
  height:100%;
}

.hi-qr img{
  width:120px;
  height:120px;
  object-fit:contain;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  margin:0 auto;
}

@media (max-width: 760px){
  .hi-row{ grid-template-columns: 1fr; }
  .hi-qr{ width: 100%; text-align:left; display:flex; gap:12px; align-items:center; }
  .hi-qr img{ width:84px; height:84px; margin:0; }
}


.ps-item h3{
  margin:0 0 6px;
  font-size: 12px;
  min-width: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ps-item p{ margin:0; }

.ps item{
  flex:1 1 0;
  min-width:0; 
}

/* Mobile: stack vertically and center the arrow */
@media (max-width: 640px){
  .ps-block{
    grid-template-columns: 1fr;
  }
  .ps-divider{
    text-align:center;
    padding: 6px 0;
  }
}

/* Mobile */
@media (max-width: 640px){
  #pmGallery{
    grid-template-columns: 1fr;
  }
}


.modal[open] ~ *{
  /* nothing, dialog is top layer; rule is here to show intent */
}


@media (max-width: 980px){
  .contact-layout{grid-template-columns:1fr;}
  .contact-side-card{position:static;}
}

/* Form feels less “stretched” */
textarea{min-height:120px;}
@media (min-width: 981px){
  textarea{min-height:150px;}
}



/* -------- Modal text color normalization -------- */
.modal,
.modal *{
  color: var(--text);
}

.modal p,
.modal li{
  color: var(--muted);
}

.modal h1,
.modal h2,
.modal h3{
  color: var(--text);
}

.modal .kicker{
  color: var(--muted);
}

.modal strong{
  color: var(--text);
  font-weight: 600;
}

/* Chips + links inside modal */
.modal .chip{
  color: var(--muted);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}

.modal a.chip{
  color: var(--text);
}

/* Bullets inside modal */
.modal .bullets{
  color: var(--muted);
}

.modal .bullets li::marker{
  color: rgba(255,255,255,.35);
}
