/* =========================================
   DESIGN SYSTEM — Dark industrial + neon accent
   ========================================= */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #1a1a1a;
  --border: #222;
  --border-light: #2a2a2a;
  --text: #e8e8e0;
  --text-muted: #666;
  --text-dim: #444;
  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.15);
  --accent-2: #ff3c5a;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* NOISE */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.025;
  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='1'/%3E%3C/svg%3E");
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.95); backdrop-filter: blur(12px);
}
.nav-logo { font-family: var(--font-mono); font-size: 13px; letter-spacing: -0.02em; }
.logo-bracket { color: var(--text-dim); }
.logo-dot { color: var(--accent-2); }
.logo-accent { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 32px; align-items: center; }
.nav-link {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); transition: color 0.2s; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent); transform: scaleX(0); transition: transform 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-admin { color: var(--accent) !important; font-weight: 700; }
.nav-toggle { display: none; }

/* MAIN */
.main { padding-top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); }

/* HERO */
.hero {
  padding: 100px 40px 80px; max-width: 1200px; margin: 0 auto; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: 60px; right: -100px;
  width: 600px; height: 600px; pointer-events: none;
  background: radial-gradient(circle, rgba(200,255,0,0.04) 0%, transparent 70%);
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 24px;
}
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800; line-height: 1.0; letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-sub { font-size: 15px; color: var(--text-muted); max-width: 480px; margin-bottom: 40px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 80px; }

/* TICKER */
.hero-ticker {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 12px 0; margin: 0 -40px;
}
.ticker-track {
  display: flex; gap: 24px; animation: ticker 20s linear infinite; white-space: nowrap;
}
.ticker-track span { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.ticker-track .sep { color: var(--accent); }
@keyframes ticker { from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
  transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-light); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); width: 100%; justify-content: center; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* PROJECTS SECTION */
.projects-section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 48px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.section-title { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.section-count { font-size: 11px; color: var(--text-dim); }

/* PROJECT CARDS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.project-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--border-light); transform: translateY(-3px); }
.card-featured { border-color: rgba(200,255,0,0.2); }
.card-featured:hover { border-color: rgba(200,255,0,0.4); }
.card-image { position: relative; height: 200px; background: var(--bg-3); overflow: hidden; }
.card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.placeholder-num { font-family: var(--font-display); font-size: 80px; font-weight: 800; color: var(--border-light); line-height: 1; }
.card-status { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 2px; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.status-live { background: rgba(0,255,100,0.15); color: #00ff64; }
.status-wip { background: rgba(255,200,0,0.15); color: #ffcc00; }
.status-archived { background: rgba(100,100,100,0.15); color: var(--text-dim); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
  padding: 3px 8px; border-radius: 2px; font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 700;
  background: color-mix(in srgb, var(--tag-color) 12%, transparent);
  color: var(--tag-color);
  border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent);
}
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.card-title a:hover { color: var(--accent); }
.card-tagline { font-size: 12px; color: var(--text-muted); line-height: 1.6; flex: 1; }
.card-links { display: flex; gap: 16px; padding-top: 8px; border-top: 1px solid var(--border); }
.card-link { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.card-link:hover { color: var(--accent); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 40px; border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.empty-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.empty-sub { color: var(--text-muted); font-size: 13px; }
.empty-sub a { color: var(--accent); }

/* DETAIL */
.detail-layout { max-width: 1100px; margin: 0 auto; padding: 60px 40px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 40px; transition: color 0.2s; }
.back-link::before { content: '←'; }
.back-link:hover { color: var(--accent); }
.detail-header { margin-bottom: 40px; }
.detail-title { font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.0; margin: 16px 0; }
.detail-tagline { font-size: 16px; color: var(--text-muted); max-width: 600px; }
.detail-image { height: 400px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 60px; border: 1px solid var(--border); }
.detail-body { display: grid; grid-template-columns: 1fr 280px; gap: 60px; align-items: start; }
.detail-description h2 { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 20px; }
.detail-description p { font-size: 14px; line-height: 1.9; color: var(--text-muted); }
.detail-meta { display: flex; flex-direction: column; gap: 32px; }
.meta-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; font-family: var(--font-mono); font-weight: 700; }
.meta-links { display: flex; flex-direction: column; gap: 10px; }
.no-links { font-size: 12px; color: var(--text-dim); }

/* CONTACT */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; max-width: 1100px; margin: 0 auto; padding: 80px 40px; align-items: start; }
.contact-title { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); font-weight: 800; line-height: 1.0; letter-spacing: -0.03em; margin: 20px 0; }
.contact-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.contact-sub { font-size: 13px; color: var(--text-muted); line-height: 1.8; margin-bottom: 40px; }
.contact-facts { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fact { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.fact:last-child { border: none; padding: 0; }
.fact-label { font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.fact-value { font-size: 12px; font-weight: 700; }
.dot-green { color: #00ff64; }

/* FORM */
.contact-form-wrap { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.form-input, input.form-input, textarea.form-input {
  background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-mono); font-size: 13px;
  padding: 12px 16px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.form-input::placeholder { color: var(--text-dim); }
.field-error .form-input { border-color: var(--accent-2); }
.field-error-msg { font-size: 11px; color: var(--accent-2); }
.btn-send { width: 100%; justify-content: center; padding: 16px; }

/* MESSAGES */
.messages { position: fixed; top: calc(var(--nav-h) + 16px); right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.message { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--bg-2); border: 1px solid var(--border-light); border-left: 3px solid var(--accent); border-radius: var(--radius); font-size: 12px; min-width: 280px; animation: slideIn 0.3s ease; }
.message button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; }
@keyframes slideIn { from{transform:translateX(20px);opacity:0;} to{transform:translateX(0);opacity:1;} }

/* FOOTER */
.footer { border-top: 1px solid var(--border); padding: 32px 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-copy, .footer-sub { font-size: 11px; color: var(--text-dim); }
.accent { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 1px; background: var(--text); }
  .hero { padding: 60px 20px 40px; }
  .hero-ticker { margin: 0 -20px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .projects-section { padding: 40px 20px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px; }
  .detail-layout { padding: 40px 20px; }
  .detail-body { grid-template-columns: 1fr; }
  .footer { padding: 24px 20px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
