:root {
  --ink: #0a0c10;
  --ink-soft: #171b24;
  --paper: #f6f8fb;
  --paper-alt: #eceff5;
  --accent: #e8a54b;
  --accent-dim: #c9822a;
  --text-body: #33415c;
  --text-muted: #6b7793;
  --max-width: 1080px;
  --font-head: "IBM Plex Mono", "Courier New", monospace;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: #e7ecf7;
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(4rem, 10vw, 7rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 165, 75, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 165, 75, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 92%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 92%);
  pointer-events: none;
}

.hero__topo {
  position: absolute;
  top: 0;
  right: -6%;
  height: 100%;
  width: 56%;
  min-width: 420px;
  opacity: 0.6;
  pointer-events: none;
}

.hero__topo .topo__links path {
  fill: none;
  stroke: rgba(232, 165, 75, 0.28);
  stroke-width: 1;
}

.hero__topo .topo__nodes circle {
  fill: rgba(232, 165, 75, 0.6);
  transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.hero__topo .topo__nodes circle.hub {
  fill: var(--accent);
}

.hero__topo .topo__nodes circle.pulse {
  animation: node-pulse 3.2s ease-in-out infinite;
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* Hovering a nav link highlights its matching node in the topology */
.hero:has(.nav__links a:nth-of-type(1):hover) #n-services,
.hero:has(.nav__links a:nth-of-type(2):hover) #n-about,
.hero:has(.nav__links a:nth-of-type(3):hover) #n-area,
.hero:has(.nav__links a:nth-of-type(4):hover) #n-contact {
  opacity: 1;
  transform: scale(1.9);
  filter: drop-shadow(0 0 7px rgba(232, 165, 75, 0.9));
}

@media (max-width: 900px) {
  .hero__topo { display: none; }
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.mark--hero {
  width: clamp(2.1rem, 5vw, 2.9rem);
  height: clamp(2.1rem, 5vw, 2.9rem);
}

.nav__links {
  display: flex;
  gap: clamp(0.9rem, 3vw, 1.75rem);
  font-size: 0.9rem;
}

.nav__links a {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: #c3cde3;
  transition: color 0.2s ease;
}

.nav__num {
  font-family: var(--font-head);
  font-size: 0.68rem;
  color: var(--accent);
  margin-right: 0.35em;
  opacity: 0.85;
}

.nav__links a:hover { color: var(--accent); }

.hero__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
}

.hero__content > * {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 0.7s ease-out forwards;
}

.hero__eyebrow { animation-delay: 0.05s; }
.hero__title { animation-delay: 0.15s; }
.hero__tagline { animation-delay: 0.27s; }
.hero__sub { animation-delay: 0.39s; }
.hero__cta { animation-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .hero__content > * { animation: none; opacity: 1; transform: none; }
  .hero__topo .topo__nodes circle.pulse { animation: none; }
}

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero__title {
  display: flex;
  align-items: center;
  gap: 0.22em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.2rem, 6.4vw, 3.8rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
}

.hero__tagline {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: #e7ecf7;
  margin: 0 0 0.75rem;
}

.hero__sub {
  color: #aab5cc;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 2rem;
  max-width: 34rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero__cta .bracket {
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.hero__cta:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-2px);
}

.hero__cta:hover .bracket { opacity: 1; }

/* ---------- Sections ---------- */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
}

.section--alt { background: var(--paper-alt); }

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  color: var(--ink);
  margin: 0 0 2rem;
}

/* Scroll-reveal: fades in once, no looping */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  padding: 1.5rem;
}

.card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
}

.about__photo img {
  border-radius: 18px;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 534;
  object-fit: cover;
  box-shadow: 0 20px 40px -20px rgba(11, 17, 32, 0.35);
}

.about__text p {
  line-height: 1.7;
  font-size: 1.02rem;
}

.certs {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.certs li {
  background: #fff;
  border: 1px solid #d8dee9;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}

/* ---------- Area / Contact ---------- */

.area p, .contact p {
  font-size: 1.05rem;
  line-height: 1.6;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.contact__links a {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.contact__links a:hover { background: var(--ink-soft); }

.contact__reveal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact__reveal .bracket { opacity: 0.65; transition: opacity 0.2s ease; }

.contact__reveal:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.contact__reveal:hover .bracket { opacity: 1; }

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

.footer {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .about {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .about__photo { max-width: 220px; }
  .nav { justify-content: center; text-align: center; }
}
