/*
 * berkersaygin.com — Shared Design System
 * Dark-first, minimal, premium. Inspired by sindresorhus.com
 */

/* ─── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Custom Properties ────────────────────────────────────── */
:root {
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Background */
  --bg:          #020617;   /* slate-950 */
  --bg-soft:     #0f172a;   /* slate-900 */
  --bg-card:     rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.7);

  /* Text */
  --text:        #f1f5f9;   /* slate-100 */
  --text-muted:  #64748b;   /* slate-500 */
  --text-dim:    #94a3b8;   /* slate-400 */

  /* Accent */
  --accent:      #6366f1;   /* indigo-500 */
  --accent-2:    #8b5cf6;   /* violet-500 */
  --accent-3:    #ec4899;   /* pink-500 */

  /* Border */
  --border:      rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.04);

  /* Gradients */
  --grad-name: linear-gradient(135deg, #818cf8, #a78bfa, #f472b6);
  --grad-btn:  linear-gradient(135deg, #4f46e5, #7c3aed);

  /* Spacing */
  --max-w: 72rem;   /* 1152px */
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ─── Shared Navigation ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--text); }

.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.nav-icon-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-icon-link svg { width: 18px; height: 18px; }

/* ─── Shared Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
}

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

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.social-icon:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.social-icon svg { width: 18px; height: 18px; }

/* ─── Page Wrapper ──────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-body {
  flex: 1;
}

/* ─── Hero Section (index only) ────────────────────────────────── */
#nebula-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 2rem 1.5rem 6rem;
}

/* Profile ring */
.profile-ring-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 2rem;
}
.profile-ring-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #6366f1, #8b5cf6, #ec4899, #8b5cf6, #6366f1);
  animation: ring-spin 8s linear infinite;
  z-index: -1;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.profile-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  transition: transform 0.4s cubic-bezier(.16,1,.3,1);
  position: relative;
  z-index: 1;
}
.profile-ring-wrap:hover .profile-photo { transform: scale(1.04); }

/* Hero Text */
.hero-name {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1rem;
  background: var(--grad-name);
  background-size: 200% 200%;
  animation: grad-shift 5s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(139,92,246,0.25));
}
@keyframes grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

/* Hero Button */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--grad-btn);
  color: #fff;
  border: none;
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  text-decoration: none;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}
.hero-btn svg { width: 18px; height: 18px; }

/* ─── Apps Page ─────────────────────────────────────────────────── */
.apps-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.apps-hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.apps-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.apps-title-accent {
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.apps-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.apps-subtitle span { margin: 0 0.5rem; opacity: 0.4; }

/* App Grid */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
@media (min-width: 640px) {
  .apps-grid { grid-template-columns: 1fr 1fr; }
}

.app-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}
.app-card:hover { background: var(--bg-card-hover); }

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.app-info { flex: 1; min-width: 0; }

.app-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.app-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  text-transform: lowercase;
}
.app-tag.new    { color: #34d399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.app-tag.free   { color: #60a5fa; border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.08); }
.app-tag.paid   { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.08); }
.app-tag.ios    { color: #94a3b8; border-color: rgba(148,163,184,0.2); }
.app-tag.android{ color: #94a3b8; border-color: rgba(148,163,184,0.2); }

/* ─── App Detail Page ───────────────────────────────────────────── */
.app-detail {
  max-width: 56rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.app-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

.app-detail-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.3),
    0 8px 24px rgba(0,0,0,0.4),
    0 24px 64px rgba(0,0,0,0.3);
}

.app-detail-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.app-detail-desc {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

/* Download badges */
.download-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.download-badge img {
  height: 52px;
  transition: transform 0.2s, filter 0.2s;
}
.download-badge:hover img { transform: scale(1.04); filter: brightness(1.1); }

/* App nav links */
.app-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.app-nav-links a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.app-nav-links a:hover { text-decoration-color: currentColor; color: #a5b4fc; }

/* App prose content */
.app-prose {
  margin-top: 2.5rem;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
}
.app-prose p { margin-bottom: 1.25rem; }
.app-prose h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.app-prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.app-prose h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.app-prose ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.app-prose a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(129,140,248,0.4);
}
.app-prose a:hover { color: #a5b4fc; text-decoration-color: currentColor; }
.app-prose code {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85em;
  background: rgba(255,255,255,0.07);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: #c4b5fd;
}
.app-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Privacy Policy hidden anchor section */
.privacy-section {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
}
.privacy-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.privacy-section p, .privacy-section ul {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.privacy-section ul { padding-left: 1.5rem; }

/* ─── About Page ────────────────────────────────────────────────── */
.about-page {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.about-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 2.5rem;
}

.about-prose {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #818cf8; /* Sindre'nin sitesindeki gibi mavi-mor vurgu rengi */
}
.about-prose p .normal {
  color: var(--text-dim);
}

/* ─── Utility: Fade-in on scroll ───────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-footer { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-name { font-size: 2.8rem; }
  .app-detail-icon { width: 96px; height: 96px; border-radius: 22px; }
}
