/* ============================================================
   NEIL SMITH — neilsmith.io
   Dark terminal aesthetic — lab edition
   ============================================================ */

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

:root {
  --bg:          #080c10;
  --bg-surface:  #0d1117;
  --bg-raised:   #111820;
  --green:       #00c896;
  --green-dim:   rgba(0, 200, 150, 0.15);
  --green-faint: rgba(0, 200, 150, 0.06);
  --amber:       #e6a817;
  --red:         #e25454;
  --text:        #c8d8e8;
  --text-muted:  #607080;
  --text-dim:    #405060;
  --border:      rgba(0, 200, 150, 0.12);
  --border-mid:  rgba(0, 200, 150, 0.2);
  --font-mono:   'Share Tech Mono', 'Courier New', monospace;
  --font-display:'Orbitron', monospace;
  --font-body:   'Rajdhani', sans-serif;
  --max-w:       1200px;
  --section-pad: 72px 48px;
}

html { scroll-behavior: smooth; }

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

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 200;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,150,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,150,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,12,16,0.96);
  backdrop-filter: blur(8px);
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-decoration: none;
  flex-shrink: 0;
}

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

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

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

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: 1px;
  white-space: nowrap;
}

.theme-toggle {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover { color: var(--green); border-color: var(--green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-muted);
}

.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(0,200,150,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(0,200,150,0); }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  background: var(--green);
  color: var(--bg);
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: opacity 0.2s, transform 0.1s;
}

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

.btn-ghost {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 28px;
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(0,200,150,0.35);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover { background: var(--green-faint); border-color: rgba(0,200,150,0.6); }

/* --- Terminal --- */
.terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-bar {
  background: #161b22;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red    { background: #ff5f57; }
.t-yellow { background: #ffbd2e; }
.t-green  { background: #28c840; }

.terminal-title {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 24px;
  font-size: 12px;
  line-height: 1.9;
}

.t-line { display: block; }
.t-gap  { margin-top: 8px; }
.t-brace { color: var(--text-muted); }
.t-indent { display: inline-block; width: 24px; }
.t-prompt   { color: var(--green); }
.t-cmd      { color: var(--text); }
.t-out      { color: var(--text-muted); }
.t-key      { color: #79b8ff; }
.t-colon    { color: var(--text-muted); margin: 0 6px; }
.t-val      { color: #f97583; }
.t-green-text { color: #85e89d; }

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

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

/* --- Section --- */
.section {
  position: relative;
  z-index: 5;
  padding: var(--section-pad);
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,200,150,0.25), transparent);
}

.section-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 5;
  padding: 88px 48px 72px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tag-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.0;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-name .accent { color: var(--green); }

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 15px;
  color: #8a9bb0;
  line-height: 1.75;
  margin-bottom: 36px;
}

.hero-desc .accent-link { color: var(--green); text-decoration: none; }
.hero-desc .accent-link:hover { text-decoration: underline; }

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

/* --- Projects grid --- */
.projects-preview-section {
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--green);
  opacity: 0.5;
}

.project-card.planned::before { background: var(--amber); }

.project-card:hover { border-color: var(--border-mid); }

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: 2px;
  opacity: 0.7;
}

.project-status-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid;
}

.project-status-badge.ongoing {
  color: var(--green);
  border-color: rgba(0,200,150,0.3);
  background: var(--green-faint);
}

.project-status-badge.planned {
  color: var(--amber);
  border-color: rgba(230,168,23,0.3);
  background: rgba(230,168,23,0.05);
}

.project-status-badge.completed {
  color: var(--text-dim);
  border-color: var(--border);
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

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

.project-card-detail {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  font-style: italic;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-card-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.project-card-link:hover { opacity: 0.7; }

/* --- Tag --- */
.tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  background: var(--green-faint);
  border: 1px solid rgba(0,200,150,0.1);
  padding: 3px 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Blog preview --- */
.blog-preview-section { border-top: 1px solid var(--border); }

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.blog-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.blog-preview-card:hover { border-color: var(--border-mid); }

.blog-preview-date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.blog-preview-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
}

.blog-preview-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.blog-preview-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Network section --- */
.network-section { border-top: 1px solid var(--border); }

.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.network-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 28px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.1s;
}

.network-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--green);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.network-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.network-card:hover::before { opacity: 1; }

.network-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: 2px;
  opacity: 0.7;
}

.network-card-domain {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.network-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.network-card-arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--green);
  transition: transform 0.2s;
}

.network-card:hover .network-card-arrow { transform: translateX(4px); }

/* --- Page hero --- */
.page-hero {
  position: relative;
  z-index: 5;
  padding: 64px 48px 48px;
  border-bottom: 1px solid var(--border);
}

.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }

.page-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.page-title .accent { color: var(--green); }

.page-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
}

/* --- Blog grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.blog-card:hover { border-color: var(--border-mid); }

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
}

.blog-card-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.blog-card-title a:hover { color: var(--green); }
.blog-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; }
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.blog-card-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 1px;
}

/* --- Post single --- */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px;
}

.post-content { font-size: 16px; color: #8a9bb0; line-height: 1.85; }
.post-content h2 { font-family: var(--font-display); font-size: 18px; color: #fff; margin: 32px 0 16px; letter-spacing: 2px; text-transform: uppercase; }
.post-content p { margin-bottom: 20px; }
.post-content a { color: var(--green); }
.post-content code { font-family: var(--font-mono); background: var(--bg-surface); padding: 2px 6px; font-size: 12px; color: var(--green); border: 1px solid var(--border); }
.post-content pre { background: var(--bg-surface); border: 1px solid var(--border); padding: 20px; overflow-x: auto; margin-bottom: 20px; }
.post-content pre code { background: none; border: none; padding: 0; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.post-sidebar { padding-top: 8px; }

/* --- About io --- */
.about-io-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
}

.about-block { margin-bottom: 32px; }

.about-block-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.about-body {
  font-size: 15px;
  color: #8a9bb0;
  line-height: 1.8;
  margin-bottom: 12px;
}

.accent-link { color: var(--green); text-decoration: none; }
.accent-link:hover { text-decoration: underline; }
.about-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

/* --- Sidebar --- */
.about-io-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 20px;
}

.sidebar-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 14px;
  opacity: 0.8;
}

.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.sidebar-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.sidebar-links a:hover { opacity: 0.7; }

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.contact-link { color: #f97583; text-decoration: none; transition: color 0.2s; }
.contact-link:hover { color: var(--green); }
.contact-desc { font-size: 15px; color: #8a9bb0; line-height: 1.75; margin-bottom: 24px; }

.contact-availability {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* --- Holding terminal --- */
.holding-terminal { max-width: 600px; }

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--border);
  padding: 28px 48px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
}

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

.footer-copy { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* --- Light theme --- */
[data-theme="light"] {
  --bg:          #f0f2f0;
  --bg-surface:  #e4e8e4;
  --text:        #1a2a1a;
  --text-muted:  #3a5a3a;
  --text-dim:    #5a7a5a;
  --border:      rgba(0,150,80,0.2);
  --border-mid:  rgba(0,150,80,0.35);
  --green-faint: rgba(0,150,80,0.08);
}

[data-theme="light"] body { background: var(--bg); color: var(--text); }
[data-theme="light"] .nav { background: rgba(240,242,240,0.96); }
[data-theme="light"] .terminal { background: #1a2a1a; }
[data-theme="light"] .terminal-bar { background: #111d11; }
[data-theme="light"] .page-title { color: #1a2a1a; }
[data-theme="light"] .section-title { color: #1a2a1a; }
[data-theme="light"] .project-card-title { color: #1a2a1a; }
[data-theme="light"] .blog-card-title { color: #1a2a1a; }
[data-theme="light"] .blog-preview-title { color: #1a2a1a; }
[data-theme="light"] .network-card-domain { color: #1a2a1a; }
[data-theme="light"] .hero-name { color: #3a5a3a; }
[data-theme="light"] .project-card { background: var(--bg-surface); }
[data-theme="light"] .blog-card { background: var(--bg-surface); }
[data-theme="light"] .blog-preview-card { background: var(--bg-surface); }
[data-theme="light"] .network-card { background: var(--bg-surface); }
[data-theme="light"] .sidebar-card { background: var(--bg-surface); }
[data-theme="light"] .footer { background: var(--bg-surface); }

/* --- Responsive --- */
@media (max-width: 960px) {
  :root { --section-pad: 48px 24px; }
  .nav { padding: 16px 24px; }
  .nav-links { display: none; flex-direction: column; gap: 16px; }
  .nav-links.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: rgba(8,12,16,0.98); padding: 24px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-status { display: none; }
  .hero { grid-template-columns: 1fr; padding: 56px 24px 48px; gap: 40px; }
  .hero-name { font-size: 36px; }
  .projects-grid { grid-template-columns: 1fr; }
  .blog-preview-grid { grid-template-columns: 1fr; }
  .network-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-io-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; padding: 28px; }
  .page-hero { padding: 48px 24px 36px; }
  .page-title { font-size: 36px; }
  .footer { padding: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 600px) {
  .page-title { font-size: 28px; }
  .hero-name { font-size: 28px; }
}
