  /* ============================================================
   Shared design system — code editor / terminal aesthetic
   Used by: index.html, contact.html (and any future page)
   ============================================================ */

:root{
  /* ---- color tokens (syntax-highlight inspired) ---- */
  --bg:            #262626;
  --bg-alt:        #1c1c1c;
  --bg-tab:        #1c1c1c;
  --border:        #444444;
  --text:          #5f875f;
  --text-dim:      #6c6c6c;
  --accent-violet: #af5f5f; /* keyword */
  --accent-amber:  #87875f; /* string */
  --accent-teal:   #5f875f; /* function */

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --content-w: 1080px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; }

.wrap{
  max-width: var(--content-w);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ---------------- Top bar : editor tab strip ---------------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-tab);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.dots{
  display:flex;
  gap:7px;
  flex: 0 0 auto;
}
.dots span{
  width:11px; height:11px; border-radius:50%;
  display:inline-block;
}
.dots span:nth-child(1){ background: var(--accent-violet); }
.dots span:nth-child(2){ background: var(--accent-amber); }
.dots span:nth-child(3){ background: var(--accent-teal); }

.logo{
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-right: auto;
  padding-left: 4px;
  text-decoration:none;
  color: inherit;
}
.logo::before{ content: "~/"; color: var(--text-dim); font-weight: 500; }

nav.tabs{
  display:flex;
  gap: 4px;
}
nav.tabs a{
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration:none;
  color: var(--text-dim);
  padding: 10px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
nav.tabs a:hover{
  color: var(--text);
  background: var(--bg-alt);
}
nav.tabs a.active{
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
  border-bottom-color: var(--bg);
}
nav.tabs a:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.menu-toggle{
  display:none;
  background:none;
  border:1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  width: 40px; height: 40px;
  font-family: var(--mono);
  cursor:pointer;
}

@media (max-width: 720px){
  nav.tabs{
    display:none;
    position:absolute;
    top: 64px; left:0; right:0;
    flex-direction:column;
    background: var(--bg-tab);
    border-bottom: 1px solid var(--border);
    padding: 8px 32px 16px;
    gap: 2px;
  }
  nav.tabs.open{ display:flex; }
  nav.tabs a{ border-radius: 6px; padding: 12px 14px; }
  .menu-toggle{ display:block; }
}

/* ---------------- shared section / type styling ---------------- */
section{ padding: 96px 0; }
.eyebrow{
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-teal);
  margin: 0 0 14px;
}
h1,h2,h3{ font-family: var(--mono); margin: 0; line-height:1.2; }

/* ---------------- buttons ---------------- */
.btn-row{ display:flex; gap:14px; flex-wrap:wrap; }
.btn{
  font-family: var(--mono);
  font-size: 0.88rem;
  text-decoration:none;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:none;
  color: var(--text);
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn.primary{
  background: var(--accent-violet);
  color: var(--bg);
  border-color: var(--accent-violet);
  font-weight: 600;
}
.btn.primary:hover{ transform: translateY(-1px); }
.btn.ghost:hover{ border-color: var(--accent-teal); color: var(--accent-teal); }

/* ---------------- terminal / editor-window card chrome ---------------- */
/* Reused for the project card and the contact form — the site's signature motif */
.terminal-card{
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
}
.terminal-card .card-chrome{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 12px 16px;
  background: var(--bg-tab);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.terminal-card .card-chrome .dots{ margin-right: 6px; }

/* ---------------- form fields (contact form, and any future forms) ---------------- */
.field{ margin-bottom: 22px; }
.field label{
  display:block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field-input{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  background: var(--bg-tab);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color .15s ease;
}
.field-input:focus-within{ border-color: var(--accent-teal); }
.field-input .prefix{
  font-family: var(--mono);
  color: var(--accent-teal);
  line-height: 1.5;
  user-select: none;
}
.field-input input,
.field-input textarea{
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}
.field-input input::placeholder,
.field-input textarea::placeholder{ color: #55536420; color: #4b4959; }

/* ---------------- footer ---------------- */
footer{
  padding: 32px 0 48px;
  text-align:center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
