/* ===================================================================
   COMMON STYLESHEET — used by index.html, about.html, skills.html...
   Theme: "Engineering Blueprint" — built for a software engineer's
   freelance portfolio. Replace placeholder text/links marked with
   [ REPLACE ] before going live.
=================================================================== */

/* ---------- 1. RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---------- 2. DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --bg-deep:     #0B1E33;  /* main dark background (blueprint navy) */
  --bg-panel:    #11304F;  /* slightly lighter navy, for cards on dark */
  --paper:       #e5e4e1f3;  /* warm paper white, for light panels */
  --ink:         #0B1E33;  /* dark text on paper */
  --line:        #3E6E97;  /* blueprint grid / divider lines */
  --line-soft:   rgba(78, 130, 168, 0.25);
  --accent:      #FF8A3D;  /* copper accent — CTAs, highlights */
  --accent-dim:  #C96A2C;
  --muted:       #9FB3C8;  /* secondary text on dark bg */
  --muted-paper: #5B6B72;  /* secondary text on paper */
  --ok:          #4FAE85;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Layout */
  --maxw: 1180px;
  --gap: clamp(1rem, 2vw, 2rem);
  --radius: 4px;
}

/* ---------- 3. BASE ---------- */
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; position: relative; }

/* blueprint grid backdrop — used on dark sections */
.grid-bg {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* eyebrow / drawing-callout label, e.g. "FIG. 02 — ABOUT" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- 4. BUTTONS ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,138,61,0.25); }
.btn-outline {
  border: 1px solid var(--line);
  color: var(--paper);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 5. HEADER / NAV ---------- */
.top-strip {
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 7px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}
.top-strip .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 8px;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 30, 51, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--maxw); margin: 0 auto;
}
.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem; font-weight: 700;
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius);
  color: var(--accent);
}
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--paper); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 84px; left: 0; right: 0;
    background: var(--bg-deep); flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--line-soft);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a { padding: 16px 24px; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle { display: flex; }
  .nav-cta .btn-outline { display: none; }
}

/* ---------- 6. CARD / PANEL ---------- */
.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }

/* corner-bracket frame — the recurring "technical drawing" motif */
.bracket-frame { position: relative; padding: 14px; }
.bracket-frame::before, .bracket-frame::after,
.bracket-frame .b-tr, .bracket-frame .b-bl {
  content: ''; position: absolute; width: 22px; height: 22px;
  border: 2px solid var(--accent);
}
.bracket-frame::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.bracket-frame::after  { bottom: 0; right: 0; border-left: none; border-top: none; }
.bracket-frame .b-tr   { top: 0; right: 0; border-left: none; border-bottom: none; }
.bracket-frame .b-bl   { bottom: 0; left: 0; border-right: none; border-top: none; }

/* dimension / annotation line, e.g. used near labels and stats */
.dim-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.dim-label::before { content: '—'; color: var(--accent); }

/* ---------- 7. FOOTER ---------- */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--line-soft);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid p { color: var(--muted); margin-bottom: 18px; }
.footer-form { display: flex; gap: 8px; }
.footer-form input {
  flex: 1; background: var(--bg-deep); border: 1px solid var(--line);
  color: var(--paper); padding: 12px 14px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.9rem;
}
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }

.social-row { display: flex; gap: 14px; margin-top: 6px; }
.social-row a {
  width: 38px; height: 38px; border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-size: 1rem; color: var(--muted);
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.8rem;
  border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--radius);
  color: var(--paper);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  flex-wrap: wrap; gap: 12px;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- 8. FORMS (shared validation states) ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.04em; margin-bottom: 8px; color: var(--muted);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--line);
  color: var(--paper); padding: 13px 14px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem;
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group.has-error input,
.form-group.has-error textarea { border-color: #E0584B; }
.error-text {
  display: none; color: #E0584B; font-size: 0.8rem; margin-top: 6px;
  font-family: var(--font-mono);
}
.form-group.has-error .error-text { display: block; }

/* ---------- 9. SCROLL REVEAL (paired with script.js) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- 10. UTILITIES ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.text-muted { color: var(--muted); }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }

/* ---------- 11. RESPONSIVE EMBED (video / map iframes) ---------- */
.embed-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-panel);
}
.embed-frame iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.embed-frame.map-embed { padding-top: 42%; filter: grayscale(0.25) invert(0.92) contrast(0.9); }

/* ---------- 12. FILTER TABS (portfolio) ---------- */
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-tabs button {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--line); padding: 9px 18px; border-radius: var(--radius);
  transition: all 0.2s ease;
}
.filter-tabs button:hover { color: var(--paper); border-color: var(--accent); }
.filter-tabs button.active { background: var(--accent); color: var(--bg-deep); border-color: var(--accent); font-weight: 600; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag-chip {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent);
  border: 1px solid var(--line-soft); padding: 4px 10px; border-radius: 20px;
}

/* ---------- 13. PRICING TABLE ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); position: relative; transform: translateY(-6px); }
.price-card.featured::before {
  content: 'MOST PICKED'; position: absolute; top: -13px; left: 28px;
  background: var(--accent); color: var(--bg-deep); font-family: var(--font-mono);
  font-size: 0.68rem; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.06em;
}
.price-amount { font-family: var(--font-display); font-size: 2.1rem; color: var(--accent); margin-top: 14px; }
.price-amount span { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.price-list { margin-top: 24px; flex: 1; }
.price-list li { display: flex; gap: 10px; padding: 9px 0; font-size: 0.92rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.price-list li i { color: var(--ok); margin-top: 3px; }

/* ---------- 14. TESTIMONIALS ---------- */
.quote-mark { font-family: var(--font-display); font-size: 2.6rem; color: var(--accent); line-height: 1; }
.stars { color: var(--accent); font-size: 0.85rem; letter-spacing: 2px; margin-top: 6px; }
.client-row { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.client-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.client-name { font-family: var(--font-mono); font-size: 0.82rem; color: var(--paper); }
.client-role { font-size: 0.78rem; color: var(--muted); }

/* ---------- 15. FAQ ACCORDION ---------- */
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; padding: 22px 4px; font-family: var(--font-display);
  font-size: 1.02rem; color: var(--paper);
}
.faq-q i { color: var(--accent); transition: transform 0.25s ease; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { color: var(--muted); padding: 0 4px 22px; max-width: 720px; }

/* ---------- 16. DOWNLOAD CARD (resume / PDFs) ---------- */
.download-card {
  display: flex; align-items: center; gap: 20px; padding: 26px;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.download-card .file-icon {
  width: 52px; height: 52px; border-radius: var(--radius); background: var(--accent);
  color: var(--bg-deep); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.download-card .file-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* ---------- 17. FORM LAYOUT HELPERS ---------- */
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .field-row-2 { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.checkbox-row input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }

/* ---------- 18. BLOG / ARTICLE CARDS ---------- */
.blog-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); display: flex; gap: 14px; margin-top: 6px; }
.blog-body { max-width: 680px; }
.blog-body p { color: var(--muted); margin-bottom: 18px; font-size: 1rem; }
.blog-body h2 { margin: 40px 0 16px; font-size: 1.5rem; }
.blog-body ul { margin: 0 0 18px 20px; color: var(--muted); }
.blog-body li { list-style: disc; margin-bottom: 8px; }

/* ---------- 19. 404 ---------- */
.error-code {
  font-family: var(--font-display); font-size: 7rem; color: var(--accent); line-height: 1;
  -webkit-text-stroke: 2px var(--accent);
}
