/* ===================================================
   Faith Domfeh — main.css
   Design: Terminal-Noir — dark, precise, alive
   =================================================== */

:root {
  --bg:        #0d0d0f;
  --bg-panel:  #111115;
  --bg-lift:   #16161c;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(0, 230, 80, 0.3);
  --green:     #00e650;
  --green-dim: rgba(0, 230, 80, 0.15);
  --green-glow:rgba(0, 230, 80, 0.06);
  --text:      #c8c4bc;
  --text-dim:  #5a5a62;
  --text-bright:#eeeae0;
  --accent:    #00e650;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
  --sans:      'DM Sans', system-ui, sans-serif;
  --radius:    6px;
  --radius-lg: 12px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

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

/* ── Atmosphere ─────────────────────────────────── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  opacity: 0.4;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  z-index: 9998;
  width: 200%;
  height: 200%;
  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");
  opacity: 0.022;
  animation: noiseAnim 0.5s steps(2) infinite;
}

@keyframes noiseAnim {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-1%, 1%); }
  50%  { transform: translate(1%, -1%); }
  75%  { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ── Typography ─────────────────────────────────── */
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

mark {
  background: none;
  color: var(--green);
  font-weight: 500;
}

/* ── Blink ──────────────────────────────────────── */
.blink {
  animation: blink 1.1s step-end infinite;
  color: var(--green);
}

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

/* ── Header / Nav ───────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--green); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-link {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--green);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ── HOME PAGE ──────────────────────────────────── */
.home-main {
  min-height: calc(100vh - 60px - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  gap: 3rem;
}

/* Terminal window */
.terminal-window {
  width: 100%;
  max-width: 640px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px var(--border),
    0 4px 40px rgba(0,0,0,0.6),
    0 0 80px var(--green-glow);
  overflow: hidden;
  animation: fadeUp 0.6s var(--transition) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

.terminal-title {
  margin-left: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.prompt { color: var(--green); font-size: 0.9rem; }

.cmd {
  color: var(--text-bright);
  font-weight: 500;
}

.output {
  padding-left: 1.5rem;
  border-left: 2px solid var(--green-dim);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.output-line { color: var(--text); font-size: 0.88rem; }
.output-line.dim { color: var(--text-dim); }
.hl { color: var(--green); }

/* Stagger animations */
.prompt-line:nth-child(1),
.output:nth-child(2) { animation-delay: 0.4s; }

#line2  { animation-delay: 1.0s; }
#out2   { animation-delay: 1.3s; }
#line3  { animation-delay: 1.9s; }
#out3   { animation-delay: 2.2s; }
#line4  { animation-delay: 2.8s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Links output */
.links-output {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-left: none;
  padding-left: 0;
  padding-top: 0.25rem;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-size: 0.85rem;
  border: 1px solid var(--border-hi);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  transition: all var(--transition);
}
.file-link:hover {
  background: var(--green-dim);
  color: #fff;
  border-color: var(--green);
}
.file-icon { font-size: 0.75rem; }

.cursor-block {
  color: var(--green);
  font-size: 1rem;
}

/* Stat strip */
.stat-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.5s ease 3s forwards;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.stat-num {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  color: var(--border);
  font-size: 1.2rem;
}

/* ── EXPERIENCE PAGE ────────────────────────────── */
.exp-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
}

.page-header {
  margin-bottom: 3.5rem;
  animation: fadeUp 0.5s var(--transition) both;
}

.page-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.prompt-sm { color: var(--green); }

.page-title {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 400px;
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--green) 0%, var(--border) 100%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--transition) forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 4px;
}

.marker-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  box-shadow: 0 0 10px var(--green), 0 0 20px rgba(0,230,80,0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.marker-dot.last {
  background: var(--text-dim);
  box-shadow: none;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.timeline-date {
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-location {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.timeline-role {
  margin-bottom: 1rem;
}

.role-title {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.role-company {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.role-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.role-body p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.75;
}

.coursework {
  color: var(--text-dim) !important;
  font-size: 0.82rem !important;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.7rem;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0,230,80,0.2);
  padding: 0.2rem 0.7rem;
  border-radius: 2rem;
  letter-spacing: 0.03em;
}

/* Skills section */
.skills-section {
  margin-top: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.skills-section .page-breadcrumb {
  margin-bottom: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.skill-group h3.skill-group-title {
  font-size: 0.7rem;
  color: var(--green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-group li {
  font-size: 0.83rem;
  color: var(--text);
}

/* ── Footer ─────────────────────────────────────── */
footer {
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-gh svg {
  width: 18px;
  fill: var(--text-dim);
  transition: fill var(--transition);
}

.footer-gh:hover svg { fill: var(--green); }

/* ── CONTACT PAGE (terminal style) ─────────────── */

/* Widen terminal window for contact form */
.contact-page .terminal-window {
  max-width: 680px;
}

/* Field rows — inline with the prompt */
.term-field-wrap {
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.term-textarea-wrap {
  align-items: flex-start;
}

.field-eq {
  color: var(--text-dim);
}

.term-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.88rem;
  outline: none;
  padding: 0.1rem 0.3rem;
  flex: 1;
  min-width: 0;
  caret-color: var(--green);
  transition: border-color var(--transition);
}

.term-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.term-input:focus {
  border-bottom-color: var(--green);
}

.term-textarea {
  resize: none;
  line-height: 1.6;
  padding-top: 0.3rem;
  align-self: flex-start;
  margin-top: 0.1rem;
}

/* Submit row */
.term-submit-row {
  margin-top: 0.5rem;
}

.term-submit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  transition: color var(--transition);
  letter-spacing: 0.02em;
}

.term-submit-btn:hover:not(:disabled) {
  color: #fff;
}

.term-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cursor {
  font-size: 0.9rem;
}

/* Status messages — terminal style */
.form-status {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
  font-size: 0.82rem;
  display: none;
  border-left: 2px solid var(--green-dim);
}

.form-status.success {
  display: block;
  color: var(--green);
  border-left-color: var(--green);
}

.form-status.error {
  display: block;
  color: #ff6b6b;
  border-left-color: rgba(255, 107, 107, 0.4);
}

/* Result / feedback line */
.term-result {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.3s ease forwards;
}

.success-msg { color: var(--green); }
.error-msg   { color: #ff6b6b; }
.dim         { color: var(--text-dim); }

/* ── OLD CONTACT PAGE (unused, kept for reference) ── */
.contact-main {
  max-width: 600px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
}

.form-wrapper {
  animation: fadeUp 0.5s var(--transition) 0.2s both;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-input {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: #0d0d0f;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.submit-btn:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 230, 80, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-arrow {
  font-size: 1rem;
  transition: transform var(--transition);
}

.submit-btn:hover:not(:disabled) .btn-arrow {
  transform: translate(2px, -2px);
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(0, 230, 80, 0.08);
  border: 1px solid rgba(0, 230, 80, 0.25);
  color: var(--green);
}

.form-status.error {
  display: block;
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.25);
  color: #ff6b6b;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 600px) {
  .terminal-body { padding: 1.2rem 1.25rem 1.5rem; }
  .links-output  { gap: 0.5rem; }
  .stat-strip    { gap: 1rem; }
  .stat-divider  { display: none; }
  .stat-num      { font-size: 1.1rem; }
  .skills-grid   { grid-template-columns: 1fr 1fr; }
}