/* Dot The World — styles.css */

:root {
  --bg: #0b1220;
  --bg-soft: #0e1728;
  --panel: #131c2e;
  --panel-border: #223049;
  --heading: #e9eef5;
  --body: #aab8ca;
  --muted: #7788a0;
  --accent: #7fb7ae;
  --accent-soft: rgba(127, 183, 174, 0.14);
  --accent-strong: #9fd0c7;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --container: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

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

h1, h2, h3 {
  color: var(--heading);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.section-inner, .header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--heading);
}

.brand-text {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent-soft);
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  font-size: 0.94rem;
}

.nav-desktop a {
  color: var(--body);
  transition: color 0.2s ease;
}

.nav-desktop a:hover { color: var(--heading); }

.nav-desktop .nav-cta {
  color: var(--accent-strong);
  border: 1px solid var(--panel-border);
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-desktop .nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease, width 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.32s ease, opacity 0.25s ease;
  border-top: 1px solid transparent;
}

.nav-mobile.is-open {
  max-height: 320px;
  opacity: 1;
  border-top-color: var(--panel-border);
}

.nav-mobile a {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  color: var(--body);
  font-size: 0.98rem;
}

.nav-mobile .nav-cta { color: var(--accent-strong); }

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

.hero {
  position: relative;
  padding: 5.5rem 0 3rem;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 1.4rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--body);
  max-width: 46ch;
  margin-bottom: 2.1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0b1220;
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(127, 183, 174, 0.5);
}

.btn-ghost {
  border: 1px solid var(--panel-border);
  color: var(--heading);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

#globe {
  width: 100%;
  height: 100%;
}

.scroll-cue {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--panel-border), transparent);
  position: relative;
}

.scroll-cue span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: cue-drop 2.2s ease-in-out infinite;
}

@keyframes cue-drop {
  0% { transform: translateY(0); opacity: 1; }
  85% { opacity: 0.2; }
  100% { transform: translateY(38px); opacity: 0; }
}

/* ---------- Approach ---------- */

.approach {
  padding: 4.5rem 0;
  border-top: 1px solid var(--panel-border);
}

.approach h2, .portfolio h2, .contact h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin-bottom: 2.6rem;
  max-width: 34ch;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.approach-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.approach-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.approach-index {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.approach-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.7rem;
}

.approach-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Portfolio ---------- */

.portfolio {
  padding: 4.5rem 0;
  border-top: 1px solid var(--panel-border);
  background: var(--bg-soft);
}

.section-lede {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 2.6rem;
  font-size: 0.98rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.domain-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.domain-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.domain-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.domain-card-top h3 {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--heading);
  word-break: break-word;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-live {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(127, 183, 174, 0.3);
}

.domain-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.domain-link {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, gap 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.domain-link:hover { color: var(--accent-strong); }

.portfolio-note {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--panel-border);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.portfolio-note a {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.portfolio-note a:hover {
  color: var(--accent-strong);
  border-bottom-color: currentColor;
}

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

.contact {
  padding: 5rem 0 5.5rem;
  border-top: 1px solid var(--panel-border);
  text-align: center;
}

.contact .section-inner { display: flex; flex-direction: column; align-items: center; }

.contact h2 { margin-left: auto; margin-right: auto; }

.contact .section-lede { margin-left: auto; margin-right: auto; text-align: center; }

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-email {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.site-footer {
  padding: 2.2rem 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p { margin-bottom: 0.4rem; }

.footer-fine {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #55647c;
  margin-bottom: 0;
}

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

@media (max-width: 860px) {
  .approach-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 280px; }
  .hero { padding-top: 3rem; }
}

@media (max-width: 700px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  .approach-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .header-inner { height: 60px; }
  .hero { padding: 2.4rem 0 2rem; }
  .hero-copy h1 { margin-bottom: 1.1rem; }
  .lede { margin-bottom: 1.7rem; }
  .approach, .portfolio { padding: 3.2rem 0; }
  .contact { padding: 3.6rem 0 4rem; }
  .btn { padding: 0.8rem 1.4rem; font-size: 0.92rem; }
}
