/* SJP Apps — Portfolio Styles */

:root {
  --bg: #050508;
  --bg-raised: #0c0c14;
  --bg-card: #111119;
  --bg-card-hover: #16161f;
  --text: #eeeef2;
  --text-dim: #8b8ba0;
  --text-muted: #555568;
  --accent: #6c9fff;
  --accent-glow: rgba(108, 159, 255, 0.15);
  --gold: #d4a843;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-brand em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: var(--text-dim); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero { padding: 140px 0 60px; text-align: center; position: relative; }
.hero::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108, 159, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.15rem; color: var(--text-dim); max-width: 560px; margin: 0 auto 12px; }
.hero .stats { display: flex; gap: 40px; justify-content: center; margin-top: 40px; }
.hero .stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.hero .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== Category Sections ===== */
.category { padding: 60px 0 20px; }
.cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.cat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.cat-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.cat-sub { font-size: 0.9rem; color: var(--text-muted); margin-left: 4px; }

/* ===== App Grid ===== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s var(--ease);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.app-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--card-color, var(--accent));
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.app-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.app-card:hover::after { opacity: 1; }

.app-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.app-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
  background: var(--card-color, var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-card h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.app-card .app-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; flex-grow: 1; margin-bottom: 16px; }
.app-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tag.web { color: #6c9fff; background: rgba(108, 159, 255, 0.1); }
.tag.ios { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.tag.android { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.tag.desktop { color: #a78bfa; background: rgba(167, 139, 250, 0.1); }
.tag.hardware { color: #f472b6; background: rgba(244, 114, 182, 0.1); }
.tag.python { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

/* ===== Principles ===== */
.principles { padding: 80px 0; }
.principles h2 { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 40px; letter-spacing: -0.02em; }
.principle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.principle {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 24px; text-align: center;
}
.principle .p-icon { font-size: 1.6rem; margin-bottom: 12px; }
.principle h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.principle p { color: var(--text-dim); font-size: 0.85rem; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border); padding: 40px 0; text-align: center;
  color: var(--text-muted); font-size: 0.82rem;
}

/* ===== App Detail Pages (shared) ===== */
.app-hero { padding: 120px 0 48px; text-align: center; }
.app-hero .icon-large {
  width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center; font-size: 2.8rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.app-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 10px; }
.app-hero .tagline { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.app-hero .badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.platform-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border); font-size: 0.82rem; color: var(--text-dim);
}

.section { padding: 48px 0; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.section-sub { color: var(--text-dim); margin-bottom: 32px; font-size: 1rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px; transition: all 0.2s var(--ease);
}
.feature-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.feature-card .icon { font-size: 1.6rem; margin-bottom: 12px; }
.feature-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.feature-card p { color: var(--text-dim); font-size: 0.88rem; }

.specs-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.specs-table th, .specs-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.specs-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.specs-table td { font-size: 0.92rem; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 0.88rem; padding: 8px 0; transition: color 0.2s; }
.back-link:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 120px 0 40px; }
  .hero .stats { gap: 24px; }
  .wrap { padding: 0 16px; }
}

@media (max-width: 480px) {
  .principle-grid { grid-template-columns: 1fr; }
  .hero .stats { flex-wrap: wrap; }
}
