/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0b0c10;
  --bg2:      #111318;
  --surface:  #1a1d26;
  --border:   rgba(255,255,255,0.08);
  --gold:     #f5c518;
  --gold-dim: rgba(245,197,24,0.15);
  --blue:     #4f8ef7;
  --blue-dim: rgba(79,142,247,0.15);
  --text:     #e8eaf0;
  --muted:    #8b909e;
  --radius:   12px;
  --nav-h:    64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

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

/* ── bh-nav: fully namespaced, zero conflict with style-new.css ── */

.bh-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(11,12,16,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.bh-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.02em;
  padding-right: 1.75rem;
  margin-right: 0.5rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.bh-nav__brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  /* override the global img rule in style-new.css */
  min-width: 32px;
  max-width: 32px;
  transition: none;
}

.bh-nav__brand img:hover { transform: none; }

.bh-nav__links {
  display: flex;
  align-items: stretch;
  list-style: none;
  flex: 1;
  height: 100%;
  padding: 0;
  margin: 0;
}

.bh-nav__links li {
  display: flex;
  align-items: stretch;
  padding: 0;
  margin: 0;
}

.bh-nav__links li a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
}

.bh-nav__links li a:hover,
.bh-nav__links li a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.bh-nav__end {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bh-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  border: none;
  background: none;
}

.bh-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Profile menu ─────────────────────────────── */
.profile-menu { position: relative; display: inline-block; }

.profile-toggle {
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.35);
  color: var(--gold);
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.profile-toggle:hover { background: rgba(245,197,24,0.22); border-color: var(--gold); }
.profile-toggle:focus { outline: none; box-shadow: 0 0 0 2px rgba(245,197,24,0.3); }

.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  /* flush to the button — no gap for the cursor to fall through */
  top: 100%;
  /* 8px transparent padding-top bridges any sub-pixel gap */
  padding-top: 8px;
  background: transparent;
  z-index: 999;
  min-width: 160px;
}

/* the visible card sits inside the padding bridge */
.profile-dropdown::before {
  content: '';
  display: block;
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: -1;
}

.profile-dropdown a {
  display: block;
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.9rem;
  transition: background 0.15s;
  position: relative;
}

.profile-dropdown a:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.profile-dropdown a:last-child  { border-radius: 0 0 var(--radius) var(--radius); }

.profile-dropdown a:hover { background: rgba(255,255,255,0.07); }

.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown,
.profile-menu.open .profile-dropdown { display: block; }

.profile-menu.is-logged-out .profile-dropdown { display: none !important; }
.profile-menu.is-logged-out .profile-toggle {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 100px 2rem 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,197,24,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(79,142,247,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-logo {
  width: 192px;
  height: 192px;
  min-width: 192px;
  max-width: 192px;
  border-radius: 36px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  display: block;
  box-shadow: 0 0 40px rgba(245,197,24,0.2);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: #0b0c10;
  box-shadow: 0 4px 20px rgba(245,197,24,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(245,197,24,0.5); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }

/* ── Section ──────────────────────────────────── */
.section {
  padding: 40px 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-header p { color: var(--muted); margin-top: 0.5rem; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ── Service cards ────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-card:hover {
  border-color: rgba(245,197,24,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.service-icon.gold { background: var(--gold-dim); }
.service-icon.blue { background: var(--blue-dim); }

.service-card h3 { font-size: 1.1rem; font-weight: 600; }
.service-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }

.service-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 0.25rem;
  transition: gap 0.2s;
}
.card-link:hover { gap: 10px; }

/* ── Divider ──────────────────────────────────── */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Projects grid ────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  border-color: rgba(79,142,247,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.project-card img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  max-width: 72px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.project-card:hover img { transform: scale(1.08); }

.project-card span { font-weight: 600; font-size: 0.95rem; }

.project-card .ext-arrow { font-size: 0.8rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  background: var(--bg2);
  /* override style-new.css which sets footer to position:fixed */
  position: static;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy { font-size: 0.82rem; color: var(--muted); }

.footer-links { display: flex; gap: 1.5rem; list-style: none; }

.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 680px) {
  .bh-nav { padding: 0 1rem; }
  .bh-nav__toggle { display: flex; }

  .bh-nav__links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(11,12,16,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 99;
  }

  .bh-nav__links.open { display: flex; }

  .bh-nav__links li { height: auto; }

  .bh-nav__links li a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .bh-nav__end { display: none; }
  .bh-nav__end.open { display: flex; padding: 0 1rem 1rem; }

  .hero { padding: 64px 1.25rem 56px; }
  .section { padding: 52px 1.25rem; }
}
