/* ========================================
   SHARED STYLES - kuthedk.com
   Used by index.html and maker.html
   ======================================== */

:root {
  --bg: #0a0c0b;
  --surface: #111413;
  --surface2: #181c1a;
  --border: #222825;
  --border2: #2d3530;
  --text: #dde8e2;
  --muted: #637069;
  --dim: #3d4d44;
  --green: #39d97a;
  --green-dim: #0f2a1a;
  --green-mid: #1a4a2a;
  --amber: #e8a830;
  --red: #e05050;
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'IBM Plex Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* GRAIN OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ========================================
   NAV
   ======================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(10, 12, 11, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(57, 217, 122, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-logo span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  border: 1px solid rgba(57, 217, 122, 0.3);
  padding: 8px 16px;
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: var(--green-dim);
  border-color: var(--green);
}

/* ========================================
   HERO (index.html)
   ======================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 48px 80px;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  grid-column: 1 / -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(57, 217, 122, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(90deg,
      transparent,
      transparent 47px,
      rgba(57, 217, 122, 0.02) 47px,
      rgba(57, 217, 122, 0.02) 48px),
    repeating-linear-gradient(0deg,
      transparent,
      transparent 47px,
      rgba(57, 217, 122, 0.02) 47px,
      rgba(57, 217, 122, 0.02) 48px);
}

.hero-left {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 24px;
}

.hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--green);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
}

h1 .dim {
  color: var(--dim);
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 40px;
  margin-top: 16px;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  color: #8fa898;
  max-width: 480px;
  margin-bottom: 48px;
}

.hero-desc strong {
  color: var(--text);
  font-weight: 400;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #0a0c0b;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #4fffaa;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* ========================================
   TERMINAL PANEL (index.html)
   ======================================== */
.hero-right {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding-left: 40px;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(57, 217, 122, 0.05);
}

.terminal-bar {
  background: var(--surface2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot-r {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e05050;
  color: #e05050;
}

.dot-y {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e8a830;
  color: #e8a830;
}

.dot-g {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39d97a;
  color: #39d97a;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2;
  min-height: 320px;
}

.t-line {
  display: flex;
  gap: 8px;
}

.t-prompt {
  color: var(--green);
  flex-shrink: 0;
}

.t-cmd {
  color: var(--text);
}

.t-out {
  color: var(--muted);
  padding-left: 20px;
}

.t-out.green {
  color: var(--green);
}

.t-out.amber {
  color: var(--amber);
}

.t-blank {
  height: 8px;
}

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ========================================
   STATS ROW (index.html)
   ======================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: 40px 48px;
  border-right: 1px solid var(--border);
  position: relative;
}

.stat:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--text);
  line-height: 1;
  letter-spacing: 1px;
}

.stat-num span {
  color: var(--green);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* ========================================
   SECTIONS (shared)
   ======================================== */
section {
  padding: 100px 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 56px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--green);
  flex-shrink: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1;
}

h2 .dim {
  color: var(--dim);
}

/* ========================================
   SERVICES (index.html)
   ======================================== */
#services {
  background: var(--surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--surface);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}

.service-card:hover {
  background: var(--surface2);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.service-card:hover::before {
  background: var(--green);
}

.service-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-icon::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--green);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.1;
}

.service-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  background: var(--green-dim);
  color: var(--green);
  border-radius: 2px;
}

/* ========================================
   STACK / PORTFOLIO (index.html)
   ======================================== */
#stack {
  position: relative;
}

.stack-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.stack-intro {
  font-size: 16px;
  color: #8fa898;
  line-height: 1.8;
  margin-bottom: 32px;
}

.stack-intro strong {
  color: var(--text);
  font-weight: 400;
}

.stack-diagram {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
}

.diagram-header {
  background: var(--surface2);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diagram-header span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.diagram-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 0.1em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(57, 217, 122, 0.4);
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 4px rgba(57, 217, 122, 0);
  }
}

.diagram-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
}

.node-group {
  margin-bottom: 20px;
}

.node-machine {
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-machine::before {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--amber);
}

.node-service {
  padding-left: 20px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-service .svc-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.node-service .svc-name {
  color: var(--text);
}

.node-service .svc-port {
  color: var(--dim);
  font-size: 10px;
}

.stack-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.stack-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.stack-link:hover {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.stack-link .link-arrow {
  margin-left: auto;
  color: var(--dim);
  transition: color 0.2s;
}

.stack-link:hover .link-arrow {
  color: var(--green);
}

/* ========================================
   ABOUT (index.html)
   ======================================== */
#about {
  background: var(--surface);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  color: #8fa898;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text p strong {
  color: var(--text);
  font-weight: 400;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-credentials {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   CREDENTIALS (shared)
   ======================================== */
.credential {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  border-left: 2px solid var(--green);
}

.cred-title {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.cred-org {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.cred-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.credentials {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   CONTACT (index.html)
   ======================================== */
#contact {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-intro {
  font-size: 16px;
  color: #8fa898;
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-intro strong {
  color: var(--text);
  font-weight: 400;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: all 0.2s;
}

.contact-method:hover {
  border-color: var(--green);
  background: var(--green-dim);
}

.cm-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 80px;
}

.cm-value {
  color: var(--text);
}

.form-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ========================================
   FOOTER (shared)
   ======================================== */
footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.footer-logo span {
  color: var(--green);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  list-style: none;
  justify-content: center;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ========================================
   ARCH DIAGRAM (index.html hero)
   ======================================== */
.arch-panel {
  background: #111413;
  border: 1px solid #2d3530;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.arch-bar {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.arch-title {
  margin-left: 8px;
}

.arch-pre {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  color: var(--muted);
}

/* diagram color classes */
.dc { color: #2d3530; }
.gc { color: #39d97a; }
.ac { color: #e8a830; }
.wc { color: #dde8e2; }
.mc { color: #637069; }

/* ========================================
   PAGE HEADER (maker.html)
   ======================================== */
.page-header {
  padding: 140px 48px 80px;
  position: relative;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(57, 217, 122, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(57, 217, 122, 0.02) 47px, rgba(57, 217, 122, 0.02) 48px),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(57, 217, 122, 0.02) 47px, rgba(57, 217, 122, 0.02) 48px);
}

.page-header-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.page-header h1 {
  font-size: clamp(64px, 8vw, 112px);
  margin-bottom: 24px;
}

.page-intro {
  font-size: 16px;
  line-height: 1.8;
  color: #8fa898;
  max-width: 600px;
}

.page-intro strong {
  color: var(--text);
  font-weight: 400;
}

/* ========================================
   TWO-COL LAYOUT (maker.html)
   ======================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.col-text p {
  font-size: 16px;
  color: #8fa898;
  line-height: 1.8;
  margin-bottom: 20px;
}

.col-text p strong {
  color: var(--text);
  font-weight: 400;
}

.col-text p:last-child {
  margin-bottom: 0;
}

/* ========================================
   LINK CARDS (maker.html)
   ======================================== */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.link-card:hover {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.link-card .arrow {
  margin-left: auto;
  color: var(--dim);
  transition: color 0.2s;
}

.link-card:hover .arrow {
  color: var(--green);
}

/* ========================================
   EQUIPMENT GRID (maker.html)
   ======================================== */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.equip-card {
  background: var(--surface);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.equip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.equip-card:hover::before {
  background: var(--green);
}

.equip-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.equip-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.1;
}

.equip-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ========================================
   FADE IN ANIMATION (shared)
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   MOBILE (shared)
   ======================================== */
@media (max-width: 900px) {
  nav {
    padding: max(env(safe-area-inset-top), 16px) 24px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 120px 24px 80px;
    gap: 40px;
    min-height: auto;
  }

  .hero-right {
    justify-content: center;
    padding-left: 0;
  }

  .arch-panel {
    max-width: 100%;
  }

  .arch-pre {
    font-size: 9.5px;
    overflow-x: auto;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 28px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  section {
    padding: 60px 24px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .stack-layout,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .page-header {
    padding: 120px 24px 60px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .equip-grid {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px;
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
  }
}
