/* ===========================================================
   Brattynn Thompson — Portfolio Site
   Shared stylesheet for all pages
   =========================================================== */

/* ---------- Theme tokens ----------
   Colors, gradients, spacing, and fonts shared by every page */
:root {
  --bg: #0b0e17;
  --bg-alt: #111623;
  --surface: #161c2c;
  --surface-2: #1d2438;
  --border: #2a3350;
  --text: #e8ebf5;
  --text-dim: #9aa3c0;
  --text-faint: #6b7394;

  --accent-1: #7c5cff;   /* violet */
  --accent-2: #00d4ff;   /* cyan */
  --accent-3: #ff5fa8;   /* pink */
  --accent-warn: #ffb454;

  --gradient-main: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --gradient-alt: linear-gradient(135deg, var(--accent-3) 0%, var(--accent-1) 100%);
  --gradient-text: linear-gradient(135deg, #a78bff 0%, #5fe3ff 100%);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 40px rgba(124, 92, 255, 0.15);
  --max-width: 1120px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

/* ---------- Global reset & base page styles ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 92, 255, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 212, 255, 0.12), transparent),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-1); }

img { max-width: 100%; display: block; }

/* Shared centered max-width wrapper used inside most sections */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ----------
   Site header: sticky top bar with logo, link list, and the
   hamburger toggle that takes over on tablet/mobile widths */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 14, 23, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 0 12px var(--accent-2);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ----------
   Homepage intro banner: heading, lead paragraph, CTA buttons, social links */
.hero {
  padding: 100px 0 70px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-dim);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-socials {
  margin-top: 36px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-socials a {
  color: var(--text-dim);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.hero-socials a:hover { color: var(--text); border-color: var(--accent-1); }

/* ---------- Buttons ----------
   Reusable .btn / .btn-primary / .btn-ghost styles used across all pages */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient-main);
  color: #0b0e17;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { color: #0b0e17; box-shadow: 0 12px 30px rgba(124, 92, 255, 0.5); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent-2); }

/* ---------- Sections ----------
   Generic page section spacing and centered heading blocks (.section-head) */
section { padding: 70px 0; }

.section-head {
  margin-bottom: 42px;
  text-align: center;
}

.section-head .kicker {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 10px 0 12px;
}

.section-head p {
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Cards ----------
   Generic content cards used for project/skill listings on multiple pages */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.card p { color: var(--text-dim); margin: 0 0 16px; font-size: 0.95rem; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 999px;
}

.card-links { display: flex; gap: 16px; font-size: 0.9rem; font-weight: 600; }

/* ---------- Featured project (live embed) ----------
   Highlighted project card with a browser-chrome-style live iframe embed */
.featured-project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 40px;
}

.featured-header h3 { margin: 4px 0 10px; font-size: 1.3rem; }
.featured-header p { color: var(--text-dim); margin: 0 0 16px; font-size: 0.95rem; }

.embed-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.embed-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.embed-dots { display: flex; gap: 6px; }
.embed-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.embed-url { flex: 1; }
.embed-open { color: var(--accent-1); font-weight: 600; text-decoration: none; white-space: nowrap; }
.embed-open:hover { color: var(--accent-2); }

.embed-frame iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
  background: #fff;
}

@media (max-width: 640px) {
  .embed-frame iframe { height: 480px; }
}

/* ---------- Timeline (About / Resume) ----------
   Vertical dotted-line timeline used for work history / education entries */
.timeline {
  position: relative;
  margin-left: 12px;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}

.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--accent-2);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-2);
  margin-bottom: 4px;
}

.timeline-item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.timeline-item .org { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.timeline-item p { color: var(--text-dim); margin: 0; }
.timeline-item ul { color: var(--text-dim); padding-left: 20px; margin: 8px 0 0; }

/* ---------- Skills ----------
   Grouped skill cards with labeled progress bars (Resume/About pages) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.skill-group h4 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--accent-2);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.skill-bar-row { margin-bottom: 12px; }
.skill-bar-row:last-child { margin-bottom: 0; }

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.skill-bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-main);
}

/* ---------- Blog ----------
   Blog index post list and the rendered article body on individual posts */
.post-list { display: flex; flex-direction: column; gap: 18px; }

.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: block;
  transition: transform .15s ease, border-color .15s ease;
}
.post-item:hover { transform: translateX(4px); border-color: var(--accent-1); }

.post-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.post-item h3 { margin: 0 0 8px; color: var(--text); font-size: 1.25rem; }
.post-item p { margin: 0; color: var(--text-dim); }

.post-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.post-body h1, .post-body h2, .post-body h3 { color: var(--text); }
.post-body p, .post-body li { color: var(--text-dim); }
.post-body a { color: var(--accent-2); }
.post-body code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-body pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.post-body blockquote {
  border-left: 3px solid var(--accent-1);
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
}

/* ---------- Updates feed ----------
   Dashed vertical feed of dated update entries on the Updates page */
.updates-feed {
  position: relative;
  margin-left: 12px;
  padding-left: 28px;
  border-left: 2px dashed var(--border);
}

.update-item { position: relative; padding-bottom: 32px; }
.update-item:last-child { padding-bottom: 0; }

.update-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--bg);
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
}

.update-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.update-item p { color: var(--text-dim); margin: 0; }

/* ---------- Contact ----------
   Two-column contact layout (info cards + form) that stacks on narrow screens */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { order: 2; }
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.contact-form label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-1);
}

.contact-info .card { margin-bottom: 16px; }

/* ---------- Footer ----------
   Site-wide footer bar at the bottom of every page */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.site-footer a { color: var(--text-dim); }

/* ---------- SolidWorks Portfolio ----------
   Project write-ups plus the thumbnail gallery and click-to-zoom lightbox */
.sw-project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}

.sw-project-head { margin-bottom: 20px; }

.sw-project-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sw-project-head h3 { margin: 6px 0 12px; font-size: 1.3rem; }
.sw-project-head p { color: var(--text-dim); margin: 0 0 14px; font-size: 0.97rem; }

.sw-learned {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-1);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.sw-learned strong { color: var(--text); }

.sw-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.sw-gallery figure {
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sw-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  background: #e8ebf5;
  transition: transform .2s ease;
}

.sw-gallery img:hover { transform: scale(1.03); }

.sw-gallery figcaption {
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

@media (max-width: 1024px) {
  .sw-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .sw-gallery img { aspect-ratio: 1 / 1; }

  .sw-gallery figcaption {
    padding: 6px 4px;
    font-size: 0.68rem;
    line-height: 1.3;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .sw-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .sw-gallery figcaption {
    font-size: 0.62rem;
  }
}

.sw-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 1000;
  cursor: zoom-out;
}

.sw-lightbox.open { display: flex; }

.sw-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ---------- Utility ----------
   Small one-off helper classes used sparingly across pages */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}
