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

:root {
  --bg: #090c10;
  --bg2: #0e1318;
  --bg3: #141a22;
  --accent: #00e5a0;
  --accent2: #00b8ff;
  --text: #e8edf3;
  --muted: #5a6a7a;
  --border: rgba(0,229,160,0.15);
  --grid: rgba(0,229,160,0.04);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* PCB trace corner accent */
body::after {
  content: '';
  position: fixed;
  top: 0; right: 0;
  width: 400px; height: 400px;
  background: radial-gradient(ellipse at top right, rgba(0,229,160,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(9,12,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.logo span {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* HERO */
.hero {
  padding: 160px 0 100px;
  position: relative;
}

.hero-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.hero h1 {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
}

.hero h1 .line1 { color: var(--text); }
.hero h1 .line2 {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.25);
}
.hero h1 .line3 {
  color: var(--accent);
}

.hero-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 3rem;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #090c10;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

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

/* STATS STRIP */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  margin-bottom: 6rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item { text-align: center; }

.stat-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.2rem;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* SECTION TITLE */
.section-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-h2 {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 3.5rem;
}

/* SERVICES */
.services { margin-bottom: 7rem; }

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

.service-card {
  background: var(--bg);
  padding: 2.5rem 2rem;
  position: relative;
  transition: background 0.3s;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
}

.service-card:hover { background: var(--bg2); }
.service-card:hover::before { height: 100%; }

.service-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  display: block;
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

/* WORKS */
.works { margin-bottom: 7rem; }

.works-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.works-head .section-sub {
  margin-bottom: 0;
}

.works-note {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.65rem 0.9rem;
  white-space: nowrap;
}

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

.work-card {
  background: var(--bg);
  min-width: 0;
}

.work-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg2);
}

.work-media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.work-media img.is-missing {
  opacity: 0;
}

.work-card:hover .work-media img {
  transform: scale(1.035);
}

.work-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 24%, rgba(0,229,160,0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 34%, rgba(0,184,255,0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 72%, rgba(0,229,160,0.14) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(0,229,160,0.12), transparent 38%),
    var(--bg2);
}

.work-placeholder::before,
.work-placeholder::after {
  content: '';
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(0,229,160,0.18);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.work-placeholder::after {
  inset: 35% 29%;
  border-color: rgba(0,184,255,0.18);
}

.work-code {
  position: relative;
  z-index: 1;
  font-family: 'Share Tech Mono', monospace;
  color: rgba(0,229,160,0.72);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
}

.work-body {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.work-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.work-pill {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(0,229,160,0.2);
  padding: 0.28rem 0.5rem;
}

.work-card h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.work-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* PROCESS */
.process { margin-bottom: 7rem; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.process-step {
  text-align: center;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s;
}

.process-step:hover .step-dot { background: var(--bg3); }

.step-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.step-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

/* TECH STACK */
.tech { margin-bottom: 7rem; }

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  letter-spacing: 0.08em;
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.tech-tag:hover {
  background: rgba(0,229,160,0.05);
  border-color: rgba(0,229,160,0.4);
}

/* CONTACT */
.contact {
  margin-bottom: 6rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: 'CONTACT';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: 'Share Tech Mono', monospace;
  font-size: 6rem;
  color: rgba(0,229,160,0.03);
  letter-spacing: 0.3em;
  pointer-events: none;
  white-space: nowrap;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info h2 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
}

.contact-row-label {
  color: var(--muted);
  min-width: 60px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.contact-row a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.contact-row a:hover { opacity: 0.7; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1.1rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }

.contact-form input:focus,
.contact-form textarea:focus { border-color: rgba(0,229,160,0.5); }

.contact-form textarea { height: 100px; }

.contact-submit {
  justify-content: center;
  text-align: center;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.hero-tag { animation: fadeUp 0.6s ease both; }
.hero h1 { animation: fadeUp 0.6s 0.1s ease both; }
.hero-desc { animation: fadeUp 0.6s 0.2s ease both; }
.hero-cta { animation: fadeUp 0.6s 0.3s ease both; }

.cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .works-head { grid-template-columns: 1fr; gap: 1rem; }
  .works-note { justify-self: start; white-space: normal; }
  .works-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .process-steps::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact { padding: 2.5rem 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }
}

/* PCB decorative SVG in hero */
.pcb-deco {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  opacity: 0.06;
  pointer-events: none;
}
