/* Portfolio - Ed's Cyberspace */

:root {
  --bg-void: #1a0d2e;
  --bg-surface: #2d1b4e;
  --accent-pink: #ff6ec7;
  --accent-cyan: #5ffbf1;
  --accent-yellow: #f9f871;
  --accent-purple: #8b9aff;
  --text-bright: #ffffff;
  --text-mid: #d4a5ff;
  --text-dim: #8b9aff;
  --text-ghost: rgba(212, 165, 255, 0.4);
  --glow-pink: 0 0 12px rgba(255, 110, 199, 0.6);
  --glow-cyan: 0 0 12px rgba(95, 251, 241, 0.6);
  --scanline: rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: #11091e;
  color: var(--text-bright);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* CRT scanline overlay - disabled for now */
/*
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline) 0px,
    var(--scanline) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.15;
}
*/

/* System banner - canvas */
canvas.system-banner {
  display: block;
  margin: 0;
  width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0 0 0;
  min-height: 100vh;
  background: var(--bg-void);
  border-left: 1px solid var(--text-ghost);
  border-right: 1px solid var(--text-ghost);
  box-shadow:
    0 0 40px rgba(139, 154, 255, 0.08),
    0 0 80px rgba(139, 154, 255, 0.05);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1px;
  background: var(--bg-void);
  padding: 0;
  margin: 0;
}

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

/* Project Card */
.project-card {
  background: var(--bg-void);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  z-index: 10;
}

/* Card Media */
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-void);
}

.card-media img,
.card-media .media-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.card-media .media-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Card Content */
/* Card text canvas */
.card-text-canvas {
  display: block;
  width: 100%;
  background: var(--bg-void);
  border-top: 1px solid var(--text-ghost);
}

/* Clear filter */
.clear-filter {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s ease;
}

.clear-filter:hover {
  color: var(--accent-pink);
  text-shadow: var(--glow-pink);
}

/* ===== PROJECT DETAIL PAGE ===== */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-dim);
  text-decoration: none;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.back-btn::before {
  content: '< ';
  color: var(--accent-yellow);
}

.back-btn svg {
  display: none;
}

.back-btn:hover {
  color: var(--accent-pink);
  text-shadow: var(--glow-pink);
}

.project-detail {
  max-width: 1000px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
}

.detail-card {
  background: var(--bg-void);
  border: 1px solid var(--text-ghost);
}

.detail-media {
  width: 100%;
  background: var(--bg-void);
}

.detail-media video,
.detail-media img,
.detail-media .media-bg {
  width: 100%;
  display: block;
}

.detail-media .media-bg {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.detail-content {
  padding: 2rem;
  border-top: 1px solid var(--text-ghost);
}

@media (max-width: 600px) {
  .detail-content {
    padding: 1.5rem;
  }
}

.detail-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  color: var(--accent-cyan);
}

.detail-title::before {
  content: '> ';
  color: var(--accent-yellow);
}

.detail-url {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent-yellow);
  text-decoration: none;
  word-break: break-all;
  transition: all 0.2s ease;
}

.detail-url::before {
  content: 'link: ';
  color: var(--text-dim);
}

.detail-url:hover {
  color: var(--accent-cyan);
}

.detail-description {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 700px;
}

.detail-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 700px;
}

.detail-text ul,
.detail-text ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.detail-text li {
  margin-bottom: 0.5rem;
}

.detail-text a {
  color: var(--accent-yellow);
  text-decoration: none;
  transition: all 0.2s ease;
}

.detail-text a:hover {
  color: var(--accent-cyan);
}

/* Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
  box-shadow: var(--glow-pink);
}

.share-btn svg {
  width: 12px;
  height: 12px;
}

/* Detail tags */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2rem;
  padding: 1rem 2rem;
  border-top: 1px solid var(--text-ghost);
}

.detail-tags .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  padding: 0.3rem 0;
  color: var(--text-dim);
  text-decoration: none;
  margin-right: 1rem;
  transition: all 0.2s ease;
}

.detail-tags .tag::before {
  content: '[';
  color: #543a6e;
}

.detail-tags .tag::after {
  content: ']';
  color: #543a6e;
}

.detail-tags .tag:hover {
  color: var(--accent-pink);
}

.detail-tags .tag:hover::before,
.detail-tags .tag:hover::after {
  color: var(--accent-pink);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
  box-shadow: var(--glow-pink);
}

/* Selection */
::selection {
  background: var(--accent-pink);
  color: var(--bg-void);
}

/* Blinking cursor effect for active elements */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
