/* ═══════════════════════════════════════════════════════════
   ExoSource Media — Personal Portfolio Wireframe
   Theme: Dark, near-black + amber accent
   Fonts: Syne (headings) + Epilogue (body) + IBM Plex Mono (labels)
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Copper Oxide Palette */
  --bg: #07080D;
  --bg-surface: #0E1016;
  --bg-surface-hover: #151720;
  --accent: #C97E4A;
  --accent-dark: #9A5F35;
  --accent-dim: rgba(201, 126, 74, 0.10);
  --accent-glow: rgba(201, 126, 74, 0.07);
  --text: #DDD8D3;
  --text-secondary: #9CA3AF;
  --text-muted: #8F897F;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Epilogue', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Status */
  --status-live: #34D399;
  --status-dev: #C97E4A;
  --status-experiment: #A78BFA;
  --status-concept: #6B7280;

  /* Layout */
  --panel-width: 340px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }


/* ═══════════════════════════════════════════════════════════
   LAYOUT: Two-Column Split
   ═══════════════════════════════════════════════════════════ */

.identity-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--panel-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 36px 36px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 50;
}

.content-panel {
  margin-left: var(--panel-width);
  min-height: 100vh;
  padding: 64px 48px 80px;
  position: relative;
}

/* Cursor glow */
.content-panel::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--panel-width);
  right: 0;
  bottom: 0;
  background: radial-gradient(
    700px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--accent-glow),
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
  opacity: 0;
}

.content-panel.glow-active::before {
  opacity: 1;
}

/* Content sections need to sit above the glow */
.content-panel > * {
  position: relative;
  z-index: 1;
}


/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
}


/* ═══════════════════════════════════════════════════════════
   IDENTITY PANEL
   ═══════════════════════════════════════════════════════════ */

.panel-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.panel-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.panel-name-accent {
  color: var(--accent);
}

.panel-tagline {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}

/* Scroll-spy Navigation */
.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-nav a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 0;
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-nav a::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: var(--text-muted);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  flex-shrink: 0;
}

.panel-nav a:hover {
  color: var(--text);
  opacity: 1;
}

.panel-nav a:hover::before {
  width: 28px;
  background: var(--text);
}

.panel-nav a.active {
  color: var(--text);
  font-weight: 500;
}

.panel-nav a.active::before {
  width: 40px;
  background: var(--accent);
}

/* Social Links */
.panel-bottom {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.panel-social a {
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.panel-social a:hover {
  color: var(--text);
  opacity: 1;
}

.panel-social a svg {
  width: 20px;
  height: 20px;
}


/* ═══════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════ */

.section {
  margin-bottom: 96px;
}

.section:last-child {
  margin-bottom: 0;
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 64px 0;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.section-divider-diamond {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.6;
}


/* ═══════════════════════════════════════════════════════════
   HERO LOCKUP
   ═══════════════════════════════════════════════════════════ */

.hero-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 64px;
}

.lockup-icon {
  flex-shrink: 0;
}

h1.lockup-wordmark,
.lockup-wordmark {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.lockup-name {
  color: var(--text);
}

.lockup-media {
  color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════ */

.about-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 640px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  transition: border-color 0.2s, color 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════════════════════════════ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

/* Card Hero */
.card-hero {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #08090E;
}

/* Bottom fade into card body */
.card-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-surface), transparent);
  pointer-events: none;
  z-index: 1;
}

.card-hero-visual {
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .card-hero-visual {
  transform: scale(1.04);
}

/* Arrow badge on hero */
.card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

.card-arrow svg {
  width: 14px;
  height: 14px;
  color: var(--text);
}

.project-card:hover .card-arrow {
  opacity: 1;
}

/* Card Body */
.card-body {
  padding: 20px;
}

/* Status Badge */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-status-dot--live { background: var(--status-live); }
.card-status-dot--dev { background: var(--status-dev); }
.card-status-dot--experiment { background: var(--status-experiment); }
.card-status-dot--concept { background: var(--status-concept); }

.card-status-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Status label colors match their dots */
.card-status--live .card-status-label { color: var(--status-live); }
.card-status--dev .card-status-label { color: var(--status-dev); }
.card-status--experiment .card-status-label { color: var(--status-experiment); }
.card-status--concept .card-status-label { color: var(--status-concept); }

/* Card Title */
.card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

/* Card Description */
.card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Stats Grid */
.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.card-stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Tech Stack Pills */
.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

/* Pills are not interactive — no hover state */

/* Bookmark Toggle */
.card-bookmark {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s;
}

.card-bookmark svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: color 0.2s, fill 0.2s;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.card-bookmark:hover svg {
  color: var(--accent);
}

.card-bookmark.bookmarked svg {
  color: var(--accent);
  fill: var(--accent);
}

/* ── Flagship Card ── */
.card--flagship {
  margin-bottom: 64px;
}

.card--flagship .card-hero {
  height: 390px;
}

.card--flagship .card-title {
  font-size: 24px;
}

.card--flagship .card-desc {
  -webkit-line-clamp: unset;
  max-width: 640px;
}

/* Flagship badge */
.flagship-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: 0.04em;
}

/* Flagship hover CTA */
.flagship-cta {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(7, 8, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2;
}

.card--flagship:hover .flagship-cta {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bookmark on flagship — reposition outside hero */
.card--flagship .card-bookmark {
  top: auto;
  right: 20px;
  bottom: 20px;
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
}


/* ═══════════════════════════════════════════════════════════
   BUILD LOG
   ═══════════════════════════════════════════════════════════ */

.log-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-entry {
  padding: 24px 20px 24px 24px;
  border-left: 2px solid var(--border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.log-entry:hover {
  border-left-color: var(--accent);
  background: var(--bg-surface);
}

.log-entry + .log-entry {
  margin-top: 4px;
}

/* Latest entry gets extra prominence */
.log-entry:first-child {
  border-left-width: 3px;
  border-left-color: var(--accent);
}

.log-entry:first-child .log-title {
  font-size: 18px;
}

.log-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.log-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.log-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.log-preview {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.log-full {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin 0.3s ease;
  margin-top: 0;
}

.log-full p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.log-full p:last-child {
  margin-bottom: 0;
}

.log-entry.open .log-full {
  max-height: 600px;
  margin-top: 12px;
}

.log-entry.open .log-preview {
  -webkit-line-clamp: unset;
}

.log-toggle {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.log-toggle:hover {
  color: var(--text);
}

.log-entry:hover .log-toggle,
.log-entry.open .log-toggle {
  opacity: 1;
  transform: translateX(0);
}


/* ═══════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════ */

.contact-inner {
  max-width: 520px;
}

.subscribe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

/* Decorative Matrix watermark */
.subscribe-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background:
    linear-gradient(135deg, transparent 40%, var(--accent-dim) 40%, var(--accent-dim) 45%, transparent 45%),
    linear-gradient(135deg, transparent 55%, var(--accent-dim) 55%, var(--accent-dim) 60%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

.subscribe-heading {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.subscribe-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.subscribe-form {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.subscribe-input {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-input::placeholder {
  color: var(--text-muted);
}

.subscribe-input:focus {
  border-color: var(--accent);
}

.subscribe-btn {
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: filter 0.2s;
  white-space: nowrap;
}

.subscribe-btn:hover {
  filter: brightness(1.1);
}

.subscribe-error {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #EF4444;
  margin-top: 4px;
  display: none;
}

.subscribe-error.visible {
  display: block;
}

.subscribe-success {
  display: none;
  padding: 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(201, 126, 74, 0.2);
  border-radius: var(--radius-md);
}

.subscribe-success.visible {
  display: block;
}

.subscribe-success h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.subscribe-success p {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-email {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-email-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.contact-email a {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}

.contact-open {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.site-footer {
  margin-left: var(--panel-width);
  padding: 24px 48px;
  border-top: 1px solid var(--border);
}

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

.footer-left {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
}

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

.footer-center a {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-center a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-right a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-right a svg {
  width: 16px;
  height: 16px;
}


/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.12s; }
.fade-in:nth-child(3) { transition-delay: 0.24s; }
.fade-in:nth-child(4) { transition-delay: 0.36s; }
.fade-in:nth-child(5) { transition-delay: 0.48s; }
.fade-in:nth-child(6) { transition-delay: 0.60s; }


/* ═══════════════════════════════════════════════════════════
   SKIP LINK (Accessibility)
   ═══════════════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  opacity: 1;
  color: var(--bg);
}


/* ═══════════════════════════════════════════════════════════
   FOCUS-VISIBLE (Accessibility)
   ═══════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-dim);
}


/* ═══════════════════════════════════════════════════════════
   HAMBURGER MENU (Mobile)
   ═══════════════════════════════════════════════════════════ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
}


/* ═══════════════════════════════════════════════════════════
   GENERATIVE HERO BACKGROUNDS
   ═══════════════════════════════════════════════════════════ */

.hero-visual--nodes {
  background:
    radial-gradient(circle at 25% 35%, rgba(201, 126, 74, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 55%, rgba(201, 126, 74, 0.06) 0%, transparent 45%),
    linear-gradient(160deg, #0C0D14 0%, #0A0B10 50%, #0E1016 100%);
}

.hero-visual--circles {
  background:
    radial-gradient(circle at 50% 50%, transparent 18%, rgba(255,255,255,0.06) 18.5%, transparent 19.5%),
    radial-gradient(circle at 50% 50%, transparent 32%, rgba(255,255,255,0.05) 32.5%, transparent 33.5%),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(255,255,255,0.04) 46.5%, transparent 47.5%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(255,255,255,0.03) 60.5%, transparent 61.5%),
    radial-gradient(circle at 45% 45%, rgba(167, 139, 250, 0.06) 0%, transparent 60%),
    linear-gradient(160deg, #0C0D14 0%, #0A0B10 50%, #0E1016 100%);
}

.hero-visual--bars {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 16px,
      rgba(255,255,255,0.04) 16px,
      rgba(255,255,255,0.04) 17px
    ),
    linear-gradient(90deg, rgba(201, 126, 74, 0.07) 0%, transparent 50%),
    linear-gradient(160deg, #0C0D14 0%, #0A0B10 50%, #0E1016 100%);
}

.hero-visual--grid {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(255,255,255,0.04) 31px,
      rgba(255,255,255,0.04) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(255,255,255,0.04) 31px,
      rgba(255,255,255,0.04) 32px
    ),
    radial-gradient(circle at 55% 40%, rgba(52, 211, 153, 0.05) 0%, transparent 50%),
    linear-gradient(160deg, #0C0D14 0%, #0A0B10 50%, #0E1016 100%);
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .identity-panel {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 8, 13, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
  }

  .panel-top {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .panel-tagline {
    display: none;
  }

  .panel-nav {
    display: none;
  }

  .panel-bottom {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 8, 13, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

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

  .mobile-nav a {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 16px 0;
    transition: color 0.2s;
  }

  .mobile-nav a:hover {
    color: var(--text);
    opacity: 1;
  }

  .mobile-nav-social {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }

  .mobile-nav-social a {
    color: var(--text-muted);
    padding: 0;
    font-size: 0;
  }

  .mobile-nav-social a svg {
    width: 20px;
    height: 20px;
  }

  .content-panel {
    margin-left: 0;
    padding: 32px 20px 64px;
  }

  .content-panel::before {
    left: 0;
    display: none;
  }

  .site-footer {
    margin-left: 0;
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .section {
    margin-bottom: 64px;
  }

  .section-heading {
    font-size: 28px;
  }

  /* Hero */
  .lockup-wordmark {
    font-size: 22px;
  }

  .hero-lockup {
    margin-bottom: 40px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .card--flagship .card-hero {
    height: 280px;
  }

  .card--flagship .card-title {
    font-size: 20px;
  }

  /* Build Log */
  .log-entry {
    padding: 16px 0 16px 16px;
  }

  .log-link {
    opacity: 1;
    transform: translateX(0);
  }

  /* Contact */
  .subscribe-form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .panel-name {
    font-size: 18px;
  }

  .section-heading {
    font-size: 24px;
  }

  .card-stats {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════
   FLAGSHIP SCAN ANIMATION
   ═══════════════════════════════════════════════════════════ */

.scan-line, .scan-line-bar {
  animation: scan-sweep 3.5s ease-in-out forwards;
}

.scan-clip-rect {
  animation: scan-clip-sweep 3.5s ease-in-out forwards;
}

@keyframes scan-sweep {
  0%, 10% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(210px); opacity: 1; }
  100% { transform: translateY(210px); opacity: 0; }
}

@keyframes scan-clip-sweep {
  0%, 10% { height: 60px; }
  85%, 100% { height: 270px; }
}

/* Particle drift */
.particle-field {
  animation: particle-drift 18s linear infinite;
}

@keyframes particle-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}


/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION (Accessibility)
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .fade-in { transition: none; opacity: 1; transform: none; }
  .card-hero-visual { transition: none; }
  .content-panel::before { display: none; }
  .scan-line, .scan-line-bar, .scan-clip-rect, .particle-field { animation: none; }
  .scan-clip-rect { height: 270px; }
}
