/* ============================================
   Devapa — Site Styles
   ============================================ */

/* --- Variables --- */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --radius: 8px;
  --max-width: 960px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Nav --- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.current {
  color: var(--color-primary);
  text-decoration: none;
}

/* --- Main content --- */
main {
  flex: 1;
  padding: 3rem 0;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- Sections --- */
.section {
  margin-bottom: 3rem;
}

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

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* --- App cards --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.app-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.app-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.app-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.app-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.app-card .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
}

/* --- App detail page --- */
.app-detail-header {
  margin-bottom: 2rem;
}

.app-detail-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.app-detail-header .version {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.app-detail-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
}

@media (max-width: 640px) {
  .app-detail-body {
    grid-template-columns: 1fr;
  }
}

.app-description p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.app-description ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.app-description li {
  margin-bottom: 0.3rem;
}

.app-sidebar {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.app-sidebar .btn {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

.app-sidebar .file-info {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
}

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