/* ==========================================================================
   MODHYT — Modern, Sleek, Dark Aesthetic
   Parent Studio of Pexer and Atlas File Manager
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Deep Pitch OLED / Obsidian */
  --bg-black: #050507;
  --bg-surface: #0a0c10;
  --bg-card: rgba(16, 19, 26, 0.7);
  --bg-card-hover: rgba(22, 27, 38, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-hover: rgba(255, 255, 255, 0.2);

  /* Typography Colors - Calibrated Chalk */
  --text-white: #f8fafc;
  --text-heading: #f1f5f9;
  --text-body: #94a3b8;
  --text-muted: #64748b;
  --text-subtle: #475569;

  /* Brand Accents */
  --pexer-amber: #f59e0b;
  --pexer-amber-glow: rgba(245, 158, 11, 0.18);
  --pexer-amber-border: rgba(245, 158, 11, 0.35);

  --atlas-cyan: #38bdf8;
  --atlas-cyan-glow: rgba(56, 189, 248, 0.18);
  --atlas-cyan-border: rgba(56, 189, 248, 0.35);

  --modhyt-silver: #e2e8f0;
  --modhyt-silver-glow: rgba(226, 232, 240, 0.12);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --max-width: 1140px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.25s var(--ease-spring);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-black);
  color: var(--text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-black);
  line-height: 1.6;
}

/* Background Atmosphere & Interactive Cursor Glow */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.mouse-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(56, 189, 248, 0.03) 40%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
  will-change: transform;
}

/* Subtle Grid Background Pattern */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

/* Main Container Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(5, 5, 7, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 50;
  padding: 16px 0;
  transition: var(--transition);
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.brand-wrapper:hover .brand-icon {
  transform: scale(1.05);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-white);
  line-height: 1.2;
}

.brand-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-body);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Hero Section */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-pill-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #ffffff;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  max-width: 840px;
  margin-bottom: 24px;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 660px;
  margin-bottom: 36px;
}

.hero-kbd-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.kbd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.72rem;
  color: var(--text-heading);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.08);
}

/* Projects Grid */
.projects-section {
  padding: 20px 0 80px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

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

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

/* Individual Project Card */
.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

/* Card Glow Effect Behind */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.card-pexer::before {
  background: radial-gradient(circle at 80% 20%, var(--pexer-amber-glow) 0%, transparent 65%);
}

.card-atlas::before {
  background: radial-gradient(circle at 80% 20%, var(--atlas-cyan-glow) 0%, transparent 65%);
}

.project-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.card-pexer:hover {
  border-color: var(--pexer-amber-border);
  box-shadow: 0 16px 36px -12px rgba(245, 158, 11, 0.16);
}

.card-pexer:hover::before {
  opacity: 1;
}

.card-atlas:hover {
  border-color: var(--atlas-cyan-border);
  box-shadow: 0 16px 36px -12px rgba(56, 189, 248, 0.16);
}

.card-atlas:hover::before {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 1;
}

/* Card Header */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-icon-wrap img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

.badge-pexer {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.badge-atlas {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

/* Card Titles */
.card-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-url-tag {
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 16px;
}

.card-pexer:hover .card-url-tag {
  color: var(--pexer-amber);
}

.card-atlas:hover .card-url-tag {
  color: var(--atlas-cyan);
}

.card-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 28px;
}

/* Spec Chips inside Card */
.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
}

/* Card Action Footer */
.card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-pexer {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.project-card:hover .btn-pexer {
  background: var(--pexer-amber);
  color: #000000;
  border-color: var(--pexer-amber);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-atlas {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.project-card:hover .btn-atlas {
  background: var(--atlas-cyan);
  color: #000000;
  border-color: var(--atlas-cyan);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.action-arrow {
  transition: transform 0.2s ease;
}

.project-card:hover .action-arrow {
  transform: translate(2px, -2px);
}

.card-status-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Architecture Pillars Section */
.pillars-section {
  padding: 60px 0 100px;
}

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

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

.pillar-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.pillar-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
  color: var(--text-white);
}

.pillar-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.pillar-desc {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.5);
  padding: 32px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-white);
}

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