/* =========================================================
   GillenCTech — Design Tokens
   Palette: near-black charcoal + signal amber accent
   Type: IBM Plex Mono (labels/display) + IBM Plex Sans (body)
   Signature: access-badge component (nod to AD/Okta background)
   ========================================================= */

:root {
  --bg: #0F1319;
  --surface: #161C25;
  --surface-2: #1D2530;
  --border: #2A323D;
  --border-soft: #232B36;
  --text: #E7ECF2;
  --text-muted: #8B96A6;
  --text-faint: #5B6675;
  --accent: #3D8BFF;
  --accent-dim: #2E6BC7;
  --accent-ink: #071A33;
  --led: #3DDC84;

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --max-w: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 28px 28px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
  color: var(--text);
}

p { margin: 0 0 1em 0; color: var(--text-muted); }

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

/* ---------- Header / Nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 19, 25, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 8px var(--led);
  animation: pulse 2.4s ease-in-out infinite;
}

.brand a { color: inherit; text-decoration: none; }

.main-nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.main-nav a {
  color: var(--text-muted);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  text-decoration: none;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -20px;
  height: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 14px 24px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--accent);
  text-decoration: none;
  background: var(--surface);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--accent-dim);
  text-decoration: none;
  color: var(--text);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: #6BA5FF;
  border-color: #6BA5FF;
  color: var(--accent-ink);
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero .container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.3em;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 1.6em;
}

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

/* ---------- Access Badge (signature element) ---------- */

.access-badge {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 280px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}

.access-badge::before {
  /* punch hole */
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.badge-header .status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--led);
}

.badge-header .status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 6px var(--led);
}

.badge-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  margin-bottom: 16px;
}

.badge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.03);
}

.badge-field {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.badge-field:last-child { border-bottom: none; }

.badge-field .k { color: var(--text-faint); }
.badge-field .v { color: var(--text); text-align: right; }

.badge-barcode {
  margin-top: 16px;
  height: 28px;
  background: repeating-linear-gradient(
    90deg,
    var(--border-soft) 0px, var(--border-soft) 2px,
    transparent 2px, transparent 5px,
    var(--border) 5px, var(--border) 6px,
    transparent 6px, transparent 9px
  );
  border-radius: 3px;
  opacity: 0.7;
}

/* ---------- Sections ---------- */

section.page-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

section.page-section:last-of-type { border-bottom: none; }

.section-head {
  margin-bottom: 36px;
}

.section-head .eyebrow { margin-bottom: 10px; }

/* ---------- Cards / Grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; margin-bottom: 14px; }

/* Project card */

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-image: linear-gradient(135deg, rgba(255,180,84,0.05) 25%, transparent 25%, transparent 50%, rgba(255,180,84,0.05) 50%, rgba(255,180,84,0.05) 75%, transparent 75%, transparent);
  background-size: 16px 16px;
}

.project-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  background: var(--surface-2);
}

.project-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: auto;
}

/* ---------- Skills ---------- */

.skill-group {
  margin-bottom: 32px;
}

.skill-group h3 {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* ---------- Forms ---------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-dim);
  outline: none;
}

.field textarea { resize: vertical; min-height: 140px; }

.form-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.form-status.success {
  background: rgba(61, 220, 132, 0.08);
  border: 1px solid rgba(61, 220, 132, 0.3);
  color: var(--led);
}

.form-status.error {
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.3);
  color: #ff8080;
}

/* ---------- Footer status bar (echoes badge motif) ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 10px;
}

.status-bar .status-seg {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar .status-seg .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--led);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .access-badge { width: 100%; max-width: 280px; margin: 0 auto; }
  .grid-2, .grid-3, .about-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .status-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .brand .dot { animation: none; }
}
