*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0f;
  --bg2:      #111118;
  --bg3:      #16161f;
  --ink:      #e8e6f0;
  --ink-mid:  #9d9bb0;
  --ink-dim:  #5a5870;
  --accent:   #7c6af7;
  --green:    #3dd68c;
  --amber:    #f5a623;
  --coral:    #f76a6a;
  --rule:     rgba(255,255,255,0.07);
  --radius:   12px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

/* Skip link — visible on keyboard focus */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg) !important;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Icon tile backgrounds (keep out of HTML for strict CSP) */
.icon-bg-purple { background: rgba(124, 106, 247, 0.12); }
.icon-bg-green { background: rgba(61, 214, 140, 0.09); }
.icon-bg-green-soft { background: rgba(61, 214, 140, 0.06); }
.icon-bg-amber { background: rgba(245, 166, 35, 0.1); }
.icon-bg-coral { background: rgba(247, 106, 106, 0.09); }

/* CTA row under main sections */
.cta-row {
  padding: 0 0 5rem;
  text-align: center;
}

/* 404 page CTA under hero */
.cta-row--after-hero {
  padding: 0.5rem 0 4rem;
  text-align: center;
}

.section--contact {
  padding-bottom: 5rem;
}

body {
  font-family: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,106,247,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,106,247,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img {
  height: 48px;
  width: auto;
  max-height: 48px;
  opacity: 0.92;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── LAYOUT ── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO ── */
.hero {
  padding: 6rem 0 4.5rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: .5;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.hl-purple { color: var(--accent); }
.hl-green  { color: var(--green); }
.hl-amber  { color: var(--amber); }
.hl-coral  { color: var(--coral); }

.hero-lead {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-mid);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* ── PILLS ── */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 11.5px;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid;
}
.pill-purple { border-color: rgba(124,106,247,.4); color: #a99ef8; background: rgba(124,106,247,.08); }
.pill-green  { border-color: rgba(61,214,140,.35);  color: #6ee8aa; background: rgba(61,214,140,.07); }
.pill-amber  { border-color: rgba(245,166,35,.35);  color: #f7be6a; background: rgba(245,166,35,.07); }
.pill-coral  { border-color: rgba(247,106,106,.35); color: #f9a0a0; background: rgba(247,106,106,.07); }
.pill-gray   { border-color: rgba(255,255,255,.1);  color: var(--ink-mid); background: rgba(255,255,255,.04); }

/* ── BUTTON ── */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg) !important;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: .02em;
  transition: opacity .2s;
}
.button:hover { opacity: .85; }

.button.outline {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid rgba(124,106,247,.4);
}
.button.outline:hover { background: rgba(124,106,247,.08); }

/* ── SECTION ── */
.section { padding: 4rem 0; }

.sec-label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1rem;
}

.sec-heading {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

/* ── EXPERTISE CARDS (Home) ── */
.top-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.card {
  background: var(--bg2);
  padding: 2rem 1.75rem;
  transition: background .2s;
}
.card:hover { background: var(--bg3); }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}
.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.card p {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-tag {
  font-size: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  color: var(--ink-dim);
}

/* ── PROJECT CARDS ── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-card {
  background: var(--bg2);
  padding: 2rem 1.75rem;
  transition: background .2s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { background: var(--bg3); }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.project-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--bg3);
  padding: 6px;
  flex-shrink: 0;
}

.project-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.project-icon svg {
  width: 28px;
  height: 28px;
}

.status-badge {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid;
  white-space: nowrap;
}
.status-active   { border-color: rgba(61,214,140,.4);  color: #6ee8aa; background: rgba(61,214,140,.08); }
.status-dev      { border-color: rgba(124,106,247,.4); color: #a99ef8; background: rgba(124,106,247,.08); }
.status-delivered { border-color: rgba(255,255,255,.12); color: var(--ink-dim); background: rgba(255,255,255,.04); }

.project-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.project-domain {
  font-size: 11px;
  color: var(--ink-dim);
  margin-bottom: .75rem;
}

.project-card p {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-card .card-tags { margin-top: auto; }

/* ── APPROACH ── */
.approach {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
}
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.approach-item h4 {
  font-family: 'Syne', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
}
.approach-item p {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.65;
}
.approach-num {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  color: var(--accent);
  opacity: .6;
  margin-bottom: .625rem;
  letter-spacing: .08em;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2.5rem;
}
.contact-block {
  background: var(--bg2);
  padding: 2rem 1.75rem;
}
.contact-block h3 {
  font-family: 'Syne', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .75rem;
}
.contact-block p {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.8;
}
.contact-block a {
  color: var(--accent);
  text-decoration: none;
}
.contact-block a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-dim);
  position: relative;
  z-index: 1;
}
footer a { color: var(--ink-dim); text-decoration: none; }
footer a:hover { color: var(--ink-mid); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eyebrow   { animation: fadeUp .45s ease both; }
.hero h1   { animation: fadeUp .45s .1s ease both; }
.hero-lead { animation: fadeUp .45s .2s ease both; }
.pills     { animation: fadeUp .45s .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow,
  .hero h1,
  .hero-lead,
  .pills {
    animation: none;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .wrapper { padding: 0 1.25rem; }
  .top-row  { grid-template-columns: 1fr; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .bottom-row { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: .5rem; }
}
