/* =========================================================
   vincentbuff.com - personal portfolio
   Dark + FPGA/circuit aesthetic.
   Plain CSS, no framework. Mobile-first. System fonts.
   ========================================================= */

:root {
  /* Background layers */
  --bg:           #0a0e14;
  --bg-soft:      #0d1218;
  --bg-card:      #11161d;
  --bg-elev:      #161b22;

  /* Borders */
  --border:       #21262d;
  --border-active:#30363d;

  /* Text */
  --ink:          #e6edf3;
  --ink-soft:     #9ba1a8;
  --ink-mute:     #6e7681;

  /* Accents - NCSU Wolfpack Red */
  --primary:      #e6131a;
  --primary-d:    #cc0000;
  --primary-glow: rgba(230, 19, 26, 0.35);
  --primary-dim:  rgba(230, 19, 26, 0.10);

  --accent:       #ffa657;
  --accent-glow:  rgba(255, 166, 87, 0.18);

  --green:        #3fb950;
  --green-dim:    rgba(63, 185, 80, 0.12);

  /* Shadows + glow */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  --shadow-glow:  0 0 0 1px var(--primary), 0 0 20px var(--primary-glow);

  /* Geometry */
  --radius:       6px;
  --radius-lg:    10px;
  --maxw:         1000px;

  /* Fonts */
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:         "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Global textured backdrop: perfboard dot-grid + ambient red glows.
   Fixed behind all content; transparent/translucent sections let it show through. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 6%, rgba(230, 19, 26, 0.08), transparent 30%),
    radial-gradient(circle at 88% 94%, rgba(230, 19, 26, 0.06), transparent 32%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 26px 26px;
  background-position: 0 0, 0 0, 0 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.2s ease;
}
a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
  font-weight: 600;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul { padding-left: 1.2em; }
ul li { margin-bottom: 0.45em; }
ul li:last-child { margin-bottom: 0; }

::selection {
  background: var(--primary-glow);
  color: var(--ink);
}

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

/* =========================================================
   Header / nav - glass over dark
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--primary);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  box-shadow: 0 0 14px var(--primary-glow);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}
.nav-brand:hover {
  background: var(--primary);
  color: #fff;
  text-shadow: none;
  box-shadow: 0 0 22px var(--primary-glow), 0 0 4px var(--primary-glow);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav-links li {
  display: flex;
  align-items: center;
  margin: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  height: 1px;
  width: 0;
  background: var(--primary);
  transition: width 0.2s ease;
  box-shadow: 0 0 6px var(--primary-glow);
}
.nav-links a:hover {
  color: var(--ink);
  text-shadow: none;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================================================
   Hero - circuit trace backdrop
   ========================================================= */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
}

/* Circuit trace pattern - SVG data URI */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cdefs%3E%3Cpattern id='c' x='0' y='0' width='180' height='180' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 40 L50 40 L50 70 L130 70 L130 110 L180 110' fill='none' stroke='%23e6131a' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M80 0 L80 25 L120 25 L120 55 L180 55' fill='none' stroke='%23e6131a' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M0 130 L35 130 L35 160 L100 160 L100 180' fill='none' stroke='%23e6131a' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M150 0 L150 30 L170 30' fill='none' stroke='%23e6131a' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M0 95 L20 95 L20 115' fill='none' stroke='%23e6131a' stroke-width='0.8' opacity='0.35'/%3E%3Ccircle cx='50' cy='40' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='50' cy='70' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='130' cy='70' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='130' cy='110' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='80' cy='25' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='120' cy='25' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='120' cy='55' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='35' cy='130' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='35' cy='160' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='100' cy='160' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='150' cy='30' r='2' fill='%23e6131a' opacity='0.5'/%3E%3Ccircle cx='20' cy='95' r='2' fill='%23e6131a' opacity='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='180' height='180' fill='url(%23c)'/%3E%3C/svg%3E");
  opacity: 0.18;
  z-index: -2;
}

/* Radial glow over the pattern, focusing visual attention on the name */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 30% 40%,
    rgba(230, 19, 26, 0.12),
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
  animation: heroGlow 7s ease-in-out infinite;
}

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

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin: 0 0 1.25rem;
  text-shadow: 0 0 8px var(--primary-glow);
}

.hero-name {
  font-size: clamp(2.5rem, 5.5vw + 1rem, 4.25rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* Cyan accent rule beneath the name, like a powered trace */
.hero-name::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  margin-top: 0.85rem;
  box-shadow: 0 0 12px var(--primary-glow);
  border-radius: 2px;
}

.hero-pitch {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 42em;
  margin: 1.5rem 0;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}
.hero-meta .sep { margin: 0 0.6rem; color: var(--border-active); }

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: 3.5rem;
  align-items: center;
}
.hero-photo { margin: 0; }
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.06s ease, box-shadow 0.2s ease, color 0.15s ease;
  border: 1px solid transparent;
  font-family: var(--font);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 1px var(--primary), 0 0 16px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary);
  color: #fff;
  text-shadow: none;
  box-shadow: 0 0 0 1px var(--primary), 0 0 24px var(--primary-glow), 0 0 40px var(--primary-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-active);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
  background: var(--primary-dim);
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-alt { background: rgba(255, 255, 255, 0.018); }
.section:last-of-type { border-bottom: 0; }

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.015em;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 0.75rem;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--primary-glow);
  position: relative;
  top: -3px;
}

.section-lede {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 42em;
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  margin-top: 1rem;
}

.about-prose p {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.about-quick {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
}
.about-quick::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.5rem;
  width: 36px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}
.about-quick h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.about-quick dl { margin: 0; }
.about-quick dt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-top: 1.1rem;
}
.about-quick dt:first-child { margin-top: 0; }
.about-quick dd {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.55;
}

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.skill-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.skill-col:hover {
  border-color: var(--border-active);
}

.skill-tier {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid;
  font-weight: 500;
}
.skill-tier-strong { color: var(--primary); border-color: var(--primary); }
.skill-tier-mid    { color: var(--green);   border-color: var(--green); }
.skill-tier-light  { color: var(--ink-mute); border-color: var(--border); }

.skill-col ul {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-left: 1.1em;
}
.skill-col ul li::marker { color: var(--ink-mute); }
.skill-col strong { color: var(--ink); font-weight: 600; }

/* =========================================================
   Experience timeline
   ========================================================= */
.timeline {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.role {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}
.role::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 1.75rem;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-glow);
}
.role:hover {
  border-color: var(--border-active);
  border-left-color: var(--primary);
  transform: translateX(2px);
}

.role-head { margin-bottom: 1rem; }
.role-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.role-org {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.role-dates {
  margin: 0.3rem 0 0;
  color: var(--ink-mute);
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.role-bullets {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.role-bullets li::marker { color: var(--primary); }

/* =========================================================
   Projects
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-active), transparent);
}
.project:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--primary), 0 0 30px var(--primary-dim);
}

.project-featured {
  grid-column: span 2;
  border-color: var(--accent);
}
.project-featured::before {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 2px;
}
.project-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow);
}

.project-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.55rem;
  background: var(--primary-dim);
  border-radius: 3px;
  border: 1px solid var(--primary-dim);
  width: fit-content;
}
.project-featured .project-tag {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: transparent;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.project-stack {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.project-summary {
  font-size: 0.93rem;
  color: var(--ink-soft);
  flex: 1;
}
.project-summary strong { color: var(--ink); font-weight: 600; }

.project-link {
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  align-self: flex-start;
  font-family: var(--mono);
  letter-spacing: 0.01em;
}

/* =========================================================
   Other
   ========================================================= */
.other-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.other-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease;
}
.other-card:hover { border-color: var(--border-active); }

.other-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--ink);
}

.other-card .other-dates {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-mute);
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.other-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--primary), 0 0 25px var(--primary-dim);
  color: var(--ink);
}
.contact-card:hover .contact-value {
  text-shadow: 0 0 10px var(--primary-glow);
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 500;
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  word-break: break-word;
  transition: text-shadow 0.2s ease;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--ink-mute);
  padding: 2.25rem 0;
  font-size: 0.85rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer span:first-child {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  opacity: 0.7;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.is-open { max-height: 400px; }
  .nav-links li {
    border-top: 1px solid var(--border);
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
  }
  .nav-links a::after { display: none; }

  .hero { padding: 4rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { max-width: 260px; justify-self: center; }
  .hero-meta .sep { display: none; }
  .hero-meta { display: flex; flex-direction: column; gap: 0.3rem; }

  .section { padding: 3.5rem 0; }

  .about-grid,
  .skills-grid,
  .projects-grid,
  .other-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-featured { grid-column: span 1; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
