:root {
  font-family: "Fira Code", system-ui, monospace;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #050508;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  background: #050508;
  color: rgba(255, 255, 255, 0.9);
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

a {
  font-weight: 500;
  color: #00ff88;
  text-decoration: inherit;
}
a:hover {
  color: #00cc6a;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}
/* ---- Portfolio app layout ---- */
.portfolio-app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #050508;
}

.canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.9) 0%, transparent 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
}

.nav a {
  font-family: "Fira Code", "Courier New", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav a:hover {
  color: #00ff88;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

/* ---- Main scroll content ---- */
.main-scroll {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 3rem 4rem;
}

/* ---- Sections ---- */
.section {
  padding: 4rem 0;
  min-height: 50vh;
}

.section-title {
  font-family: "Fira Code", "Courier New", monospace;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  color: #00ff88;
  letter-spacing: 0.08em;
  margin: 0 0 2rem;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.section-content {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.section-text {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.section-text strong {
  color: #00ff88;
}

.section-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ---- Hero ---- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Hero terminal ---- */
.hero-terminal {
  width: 100%;
  max-width: 820px;
  background: #080b10;
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.08),
    0 32px 80px rgba(0, 0, 0, 0.8),
    0 0 120px rgba(0, 255, 136, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: "Fira Code", "Courier New", monospace;
}

.hero-terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: #111520;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-bar-title {
  margin-left: 8px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  flex: 1;
  text-align: center;
  font-family: "Fira Code", monospace;
}

.hero-terminal-body {
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-line {
  display: flex;
  align-items: baseline;
  line-height: 1.8;
  font-size: clamp(0.82rem, 1.5vw, 0.95rem);
  white-space: pre;
}

.hero-line-cmd {}

.hero-prompt-text {
  color: rgba(255, 255, 255, 0.75);
}

/* name output */
.hero-out-name {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  color: #00ff88;
  text-shadow: 0 0 30px rgba(0, 255, 136, 0.45), 0 0 60px rgba(0, 255, 136, 0.2);
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 6px 0 4px;
  display: block;
}

/* role — bright accent */
.hero-out-role {
  font-size: clamp(0.82rem, 1.8vw, 1rem);
  color: #7dd3fc;
  letter-spacing: 0.02em;
  display: block;
  padding: 2px 0;
}

/* focus — dimmer */
.hero-out-focus {
  font-size: clamp(0.75rem, 1.5vw, 0.88rem);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
  display: block;
  padding: 2px 0;
}

/* location — subtle green */
.hero-out-loc {
  font-size: clamp(0.75rem, 1.5vw, 0.88rem);
  color: rgba(0, 255, 136, 0.55);
  letter-spacing: 0.02em;
  display: block;
  padding: 2px 0;
}

.hero-block-cursor {
  color: #00ff88;
  opacity: 0;
  font-size: 1em;
  transition: opacity 0.06s;
}

.hero-block-cursor.visible {
  opacity: 1;
}

/* ---- Experience ---- */
.experience-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-card {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.experience-card:hover {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.08);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.experience-role {
  font-weight: 600;
  color: #00ff88;
  font-size: 1.05rem;
}

.experience-period {
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.experience-company {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.experience-points {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ---- Projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 10px;
  padding: 1.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: rgba(0, 255, 136, 0.35);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.06);
}

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00ff88;
  margin: 0 0 0.6rem;
}

.project-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  line-height: 1.6;
}

.project-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #00aaff;
  text-decoration: none;
  transition: color 0.2s;
}

.project-link:hover {
  color: #00ff88;
}

/* ---- Skills v2 ---- */
.skills-v2-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skills-v2-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--accent, #00ff88);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.skills-v2-card:hover {
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent, #00ff88) 12%, transparent);
  border-color: var(--accent, #00ff88);
}

.skills-v2-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.skills-v2-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.skills-v2-label {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #00ff88);
}

.skills-v2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-v2-chip {
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent, #00ff88) 10%, rgba(0,0,0,0.3));
  border: 1px solid color-mix(in srgb, var(--accent, #00ff88) 30%, transparent);
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.2s, color 0.2s;
}

.skills-v2-chip:hover {
  background: color-mix(in srgb, var(--accent, #00ff88) 20%, transparent);
  color: #fff;
}

/* ---- Terminal section ---- */
.terminal-section .terminal-intro {
  margin-bottom: 1.5rem;
}

.terminal-section code {
  font-family: "Fira Code", monospace;
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---- Terminal screen (small embedded) ---- */
.terminal-screen {
  max-width: 640px;
  margin: 0 auto;
}

.terminal-screen-frame {
  background: #0a0e14;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.terminal-screen-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.terminal-screen-dots {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow:
    24px 0 0 0 rgba(0, 255, 136, 0.6),
    48px 0 0 0 rgba(0, 255, 136, 0.3);
}

.terminal-screen-title {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.terminal-screen-view {
  height: 320px;
  width: 100%;
  padding: 8px;
}

.terminal-screen-view .xterm {
  width: 100% !important;
  height: 100% !important;
  padding: 4px;
}

.terminal-screen-view .xterm-viewport {
  overflow-y: auto !important;
}

/* ---- Slides ---- */
.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .slides-grid {
    grid-template-columns: 1fr;
  }
}

.slide-card {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.slide-card:hover {
  border-color: var(--accent, #00ff88);
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent, #00ff88) 18%, transparent),
              0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ---- Preview iframe ---- */
.slide-preview-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #08080f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.slide-preview-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  transform-origin: top left;
  pointer-events: none;
}

.slide-preview-inner iframe {
  width: 1280px;
  height: 720px;
  border: none;
  display: block;
}

/* overlay so iframe doesn't catch hover events on the card */
.slide-preview-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.slide-preview-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 12px
  );
}

.slide-preview-soon-label {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent, #00ff88);
  opacity: 0.5;
}

/* ---- Card meta area ---- */
.slide-card-meta {
  padding: 1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.slide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.slide-card-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slide-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.slide-badge {
  font-family: "Fira Code", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent, #00ff88) 18%, transparent);
  border: 1px solid var(--accent, #00ff88);
  color: var(--accent, #00ff88);
  white-space: nowrap;
}

.slide-title {
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent, #00ff88);
  margin: 0;
}

.slide-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.75rem;
  font-style: italic;
}

.slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  flex: 1;
}

.slide-tag {
  font-family: "Fira Code", monospace;
  font-size: 0.64rem;
  padding: 0.18rem 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
}

.slide-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
}

.slide-open {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: var(--accent, #00ff88);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.slide-card:hover .slide-open {
  opacity: 1;
}

.slide-card--soon {
  cursor: default;
  opacity: 0.65;
}

.slide-card--soon:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* ---- Contact ---- */
.contact {
  text-align: center;
  padding-bottom: 5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.contact-link {
  font-family: "Fira Code", monospace;
  color: #00ff88;
  text-decoration: none;
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, box-shadow 0.2s;
}

.contact-link:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
}

.contact-phone {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---- Articles graph embed ---- */
.articles-graph-embed {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: #050508;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.06);
}

.articles-graph-frame {
  display: block;
  width: 100%;
  height: 560px;
  border: none;
}

.articles-graph-caption {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  padding: 0.5rem;
  border-top: 1px solid rgba(0, 255, 136, 0.1);
  letter-spacing: 0.06em;
}

/* ---- Articles ---- */
.articles-controls {
  margin-bottom: 1.25rem;
}

.articles-search-wrap {
  margin-bottom: 1rem;
}

.articles-search {
  width: 100%;
  max-width: 400px;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.articles-search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.articles-search:focus {
  border-color: #00ff88;
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.articles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.articles-tag {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.articles-tag:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
  color: #00ff88;
}

.articles-tag.active {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  color: #00ff88;
}

.articles-graph-3d-wrap {
  width: 100%;
  height: 420px;
  min-height: 380px;
  flex: 1 1 400px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.articles-graph-3d-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.articles-graph-controls-wrap {
  flex: 0 0 auto;
  min-width: 200px;
}

.articles-graph-controls {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.articles-graph-control-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.articles-graph-control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

.articles-graph-control-value {
  color: #00ff88;
  font-size: 0.7rem;
  min-width: 2.5rem;
  text-align: right;
}

.articles-graph-control-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 255, 136, 0.15);
  border-radius: 3px;
  outline: none;
}

.articles-graph-control-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ff88;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.articles-graph-control-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ff88;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.articles-graph-control-reset {
  margin-top: 0.25rem;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  color: #00ff88;
  cursor: pointer;
  transition: background 0.2s;
}

.articles-graph-control-reset:hover {
  background: rgba(0, 255, 136, 0.15);
}

.articles-graph-3d-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.articles-3d-label {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  background: rgba(5, 5, 8, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  color: #00ff88;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.articles-no-results {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin: 1rem 0;
}

/* ---- DNA strand timeline (Animus-style) ---- */
.dna-strand-wrap {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  min-height: 420px;
}

.dna-strand-label {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
}

.dna-strand-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 520px;
  display: flex;
  justify-content: center;
}

.dna-strand-svg {
  min-width: 320px;
  height: auto;
  display: block;
}

.dna-bead {
  transition: stroke-width 0.15s, filter 0.15s;
}

.dna-bead:hover {
  filter: url(#dna-glow) brightness(1.2);
}

/* 2D DNA helix (D3-style) */
.dna-helix-2d-wrap {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 12px;
  padding: 1rem;
}

.dna-helix-2d-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 12, 16, 0.6);
}

.dna-helix-2d-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 3D DNA helix */
.dna-3d-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.dna-3d-main {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dna-3d-wrap .dna-3d-canvas-wrap {
  flex: 1 1 400px;
  min-height: 480px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.dna-3d-wrap .dna-3d-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.dna-3d-controls {
  width: 100%;
  max-width: 260px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dna-3d-controls .articles-graph-control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dna-3d-controls .articles-graph-control-slider {
  width: 100%;
}

.dna-shader-wrap .dna-3d-canvas-wrap {
  min-height: 420px;
  height: 420px;
  flex: 1 0 auto;
}

.animus-panel {
  flex: 0 0 280px;
  max-width: 320px;
  background: linear-gradient(145deg, rgba(8, 12, 16, 0.98) 0%, rgba(4, 8, 12, 0.98) 100%);
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 255, 136, 0.08);
  position: relative;
  overflow: hidden;
}

.animus-panel-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
}

.animus-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.animus-panel-source {
  font-family: "Fira Code", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #00ff88;
  opacity: 0.9;
}

.animus-panel-date {
  font-family: "Fira Code", monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
}

.animus-panel-title {
  font-family: "Fira Code", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.75rem;
}

.animus-panel-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.animus-panel-tag {
  font-family: "Fira Code", monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid;
  border-radius: 4px;
  background: transparent;
}

.animus-panel-link {
  display: inline-block;
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: #00ff88;
  text-decoration: none;
  border: 1px solid rgba(0, 255, 136, 0.4);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s, box-shadow 0.2s;
}

.animus-panel-link:hover {
  background: rgba(0, 255, 136, 0.12);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.articles-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.articles-tab {
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.articles-tab:hover {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.4);
  color: #00ff88;
}

.articles-tab.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  color: #00ff88;
}

.articles-graph-wrap {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.articles-graph {
  width: 100%;
  max-width: 700px;
  height: auto;
  min-height: 380px;
  margin: 0 auto;
  display: block;
}

.articles-graph-edges {
  stroke: url(#grad-link);
  stroke-width: 1;
  stroke-opacity: 0.6;
}

.articles-graph-edge {
  stroke: rgba(0, 255, 136, 0.25);
  stroke-width: 1.5;
  transition: stroke 0.2s;
}

.articles-graph-edge:hover {
  stroke: rgba(0, 255, 136, 0.5);
}

.articles-graph-node-link {
  cursor: pointer;
  outline: none;
}

.articles-graph-node-link:focus .articles-graph-node {
  filter: url(#glow);
}

.articles-graph-node {
  fill: rgba(0, 255, 136, 0.5);
  stroke: #00ff88;
  stroke-width: 1.5;
  transition: fill 0.2s, stroke 0.2s;
}

.articles-graph-node-link:hover .articles-graph-node,
.articles-graph-node-link:focus .articles-graph-node {
  fill: #00ff88;
  stroke: #00ff88;
  filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.8));
}

.articles-graph-node[data-source="hexmos"] {
  fill: rgba(0, 170, 255, 0.5);
  stroke: #00aaff;
}

.articles-graph-node-link:hover .articles-graph-node[data-source="hexmos"],
.articles-graph-node-link:focus .articles-graph-node[data-source="hexmos"] {
  fill: #00aaff;
  stroke: #00aaff;
  filter: drop-shadow(0 0 6px rgba(0, 170, 255, 0.8));
}

.articles-graph-label {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  fill: rgba(255, 255, 255, 0.5);
}

.articles-graph-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0.5rem 0 0;
}

.articles-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.articles-source-block {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 10px;
  padding: 1.5rem;
}

.articles-source-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.articles-source-title a {
  color: #00ff88;
  text-decoration: none;
}

.articles-source-title a:hover {
  text-decoration: underline;
}

.articles-source-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 1rem;
}

.articles-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.articles-ul li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}

.articles-ul li:last-child {
  border-bottom: none;
}

.articles-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  flex: 1 1 280px;
}

.articles-link:hover {
  color: #00ff88;
}

.articles-date {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

/* ---- xterm overrides inside screen ---- */
.terminal-screen-view .xterm-screen,
.terminal-screen-view .xterm-rows,
.terminal-screen-view .xterm-viewport {
  width: 100% !important;
  min-width: 100% !important;
}

.terminal-screen-view .xterm canvas {
  width: 100% !important;
  min-width: 100% !important;
}

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