/* ========================================
   Colin Vaughn — Portfolio
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #0b0b0e;
  --bg-raised: #111116;
  --bg-surface: #17171d;
  --bg-hover: #1e1e26;

  --border: #222230;
  --border-hover: #33334a;

  --text: #e8e8ed;
  --text-dim: #8888a0;
  --text-faint: #55556a;

  --accent: #c4f54a;
  --accent-dim: rgba(196, 245, 74, 0.12);
  --accent-glow: rgba(196, 245, 74, 0.06);
  --accent-secondary: #5eead4;
  --accent-secondary-dim: rgba(94, 234, 212, 0.10);
  --blue: #60a5fa;
  --rose: #fb7185;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Utility ---- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 28px; }

.section { padding: 120px 0; position: relative; }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.heading {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}

.subheading {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 480px;
  margin-top: 14px;
  line-height: 1.7;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ---- Noise overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease);
}

.nav.pinned {
  padding: 14px 0;
  background: rgba(11, 11, 14, 0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-brand span { color: var(--text-faint); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 6px;
  transition: all 0.25s var(--ease);
}

.nav-menu a:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.nav-menu a.contact-btn {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}

.nav-menu a.contact-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 1px;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}

.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1px;
  margin-bottom: 28px;
  opacity: 0;
  animation: rise 0.7s var(--ease) 0.2s forwards;
}

.hero-eyebrow .line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--border-hover);
  vertical-align: middle;
  margin-right: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin-bottom: 32px;
  opacity: 0;
  animation: rise 0.7s var(--ease) 0.35s forwards;
}

.hero h1 .thin {
  font-weight: 300;
  color: var(--text-dim);
}

.hero h1 .pop {
  color: var(--accent);
  position: relative;
}

.hero-summary {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 44px;
  opacity: 0;
  animation: rise 0.7s var(--ease) 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.7s var(--ease) 0.65s forwards;
}

/* Floating grid pattern behind hero */
.hero-pattern {
  position: absolute;
  top: 0;
  right: -5%;
  width: 55%;
  height: 100%;
  opacity: 0.04;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 80% at 70% 40%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 70% 40%, black, transparent 70%);
}

/* Accent glow blob */
.hero-glow {
  position: absolute;
  right: 10%;
  top: 25%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(180px);
  opacity: 0.05;
  pointer-events: none;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-accent {
  background: var(--accent);
  color: #0b0b0e;
}

.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196, 245, 74, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-surface);
  transform: translateY(-2px);
}

/* ============ SKILLS ============ */
.skills-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 48px;
}

.skill-block {
  background: var(--bg-raised);
  padding: 32px 28px;
  transition: background 0.35s var(--ease);
}

.skill-block:hover { background: var(--bg-surface); }

.skill-block-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-faint);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-block-title .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.skill-block-title .dot.green { background: var(--accent); }
.skill-block-title .dot.teal { background: var(--accent-secondary); }
.skill-block-title .dot.blue { background: var(--blue); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
}

.tag:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ============ PROJECTS (Bento) ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.bento-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.bento-card:hover::after { opacity: 1; }

.bento-card.featured {
  grid-column: span 7;
}

.bento-card.featured::after {
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
}

.bento-card.side { grid-column: span 5; }

.bento-card.half { grid-column: span 6; }

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bento-mark {
  flex-shrink: 0;
  overflow: visible;
}

.bento-icon.i-vpn { background: var(--accent-dim); color: var(--accent); }
.bento-icon.i-omni { background: rgba(96, 165, 250, 0.12); color: var(--blue); }
.bento-icon.i-a11y { background: var(--accent-secondary-dim); color: var(--accent-secondary); }
.bento-icon.i-bfpc { background: rgba(251, 113, 133, 0.12); color: var(--rose); }

.bento-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
}

.bento-badge.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.bento-badge.soon {
  color: var(--text-faint);
  background: var(--bg-hover);
}

.bento-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.bento-card .bento-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.bento-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
}

.bento-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.bento-tech span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-faint);
}

.bento-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.bento-link {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s var(--ease);
}

.bento-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.bento-link svg { width: 14px; height: 14px; }

.bento-card.dimmed {
  opacity: 0.4;
  pointer-events: none;
}

/* ============ EXPERIENCE ============ */
.exp-list { margin-top: 48px; }

.exp-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.exp-row:first-child { border-top: 1px solid var(--border); }

.exp-row:hover { padding-left: 12px; }

.exp-when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  padding-top: 4px;
  letter-spacing: 0.5px;
}

.exp-what h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.exp-where {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.exp-where a { color: inherit; }
.exp-where a:hover { text-decoration: underline; }

.exp-points {
  padding: 0;
}

.exp-points li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}

.exp-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--accent);
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  margin-top: 48px;
  align-items: start;
}

.about-copy {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.8;
}

.about-copy p + p { margin-top: 18px; }

.stats-col { display: flex; flex-direction: column; gap: 12px; }

.stat-block {
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.stat-block:hover {
  border-color: var(--border-hover);
  transform: translateX(-4px);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-text {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 2px;
}

/* ============ FOOTER ============ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ============ PROJECT DETAIL ============ */
.proj-hero {
  padding: 140px 0 80px;
  position: relative;
}

.proj-hero-glow {
  position: absolute;
  right: 5%;
  top: 20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(200px);
  opacity: 0.04;
  pointer-events: none;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: 40px;
  transition: all 0.25s var(--ease);
}

.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--accent); transform: translateX(-6px); }

.proj-hero .label { margin-bottom: 16px; }

.proj-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin-bottom: 20px;
}

.proj-hero h1 .pop { color: var(--accent); }

.proj-desc {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.proj-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Architecture & Feature cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.35s var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.card-emoji {
  font-size: 26px;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.card-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-faint);
}

/* Features 2-col grid */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.feat {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.35s var(--ease);
}

.feat:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.feat-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feat-title .fe { font-size: 18px; }

.feat p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .skills-row { grid-template-columns: 1fr; }
  .bento-card.featured,
  .bento-card.side,
  .bento-card.half { grid-column: span 12; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-col { flex-direction: row; flex-wrap: wrap; }
  .stat-block { flex: 1; min-width: 130px; }
  .exp-row { grid-template-columns: 1fr; gap: 4px; }
  .feat-grid { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 11, 14, 0.96);
    backdrop-filter: blur(24px);
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .section { padding: 80px 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .proj-actions { flex-direction: column; }
  .proj-actions .btn { width: 100%; justify-content: center; }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- Skip link (WCAG 2.4.1) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---- Focus visible (WCAG 2.4.7 / 2.4.11) ---- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.tag:focus-visible,
.bento-link:focus-visible,
.bento-card:focus-visible,
.card:focus-visible,
.feat:focus-visible,
.nav-menu a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Reduced motion (WCAG 2.3.3) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
