/* =========================================================
   Ralf Winkelmann — Portfolio styles
   Plain CSS. No build step. Mobile-first.
   ========================================================= */

:root {
  --bg: #1a1f2b;
  --bg-elev: #232a39;
  --bg-alt: #1f2532;
  --border: #323a4d;
  --text: #eef1f7;
  --text-muted: #b0b8c8;
  --accent: #8fa8ff;
  --accent-strong: #6e8bff;
  --accent-soft: rgba(143, 168, 255, 0.15);
  --success: #5eead4;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --container: 1080px;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfd;
    --bg-elev: #ffffff;
    --bg-alt: #f3f5fa;
    --border: #e6e8ef;
    --text: #15171c;
    --text-muted: #5b6373;
    --accent: #4866ff;
    --accent-strong: #2e4cf0;
    --accent-soft: rgba(72, 102, 255, 0.1);
    --shadow: 0 10px 30px rgba(20, 25, 50, 0.08);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--accent-strong);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.5vw + 1rem, 3.5rem);
  font-weight: 700;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.name-mark {
  position: relative;
  display: inline-block;
  font-weight: 700;
  padding: 0.03em 0.3em;
  margin: 0 0.2em;
  white-space: nowrap;
  isolation: isolate;
}

.name-mark::before {
  content: "";
  position: absolute;
  inset: -0.14em -0.2em -0.15em -0.1em;
  background: var(--accent-strong);
  border-radius: 50% 38% 55% 45% / 55% 45% 60% 40%;
  transform: rotate(-3deg);
  z-index: -1;
}

.role {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 600;
  margin-top: 0.35em;
  color: var(--text-muted);
}

h2 {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #b48bff);
  box-shadow: 0 6px 18px rgba(124, 156, 255, 0.35);
}

.brand-name {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.9rem;
  }
  .brand-name {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background:
    radial-gradient(
      60% 60% at 20% 20%,
      rgba(124, 156, 255, 0.25),
      transparent 60%
    ),
    radial-gradient(
      45% 60% at 85% 10%,
      rgba(180, 139, 255, 0.18),
      transparent 60%
    );
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    transform 0.05s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #0b0d12;
}
.btn-primary:hover {
  background: var(--accent-strong);
  color: #0b0d12;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- App grid ---------- */

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.app-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 50%, var(--border));
  color: var(--text);
}

.app-card-art {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--bg-elev), var(--bg-alt));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.app-card-art img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.app-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.app-card-body h3 {
  margin: 0;
}

.app-card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.platform-pill {
  align-self: flex-start;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr;
}

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

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  max-width: 520px;
}

.contact h2 {
  margin-bottom: 0.5rem;
}

.contact p {
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-links {
  display: flex;
  list-style: none;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}

/* =========================================================
   App subpage layout
   ========================================================= */

.app-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.app-hero-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
}

@media (max-width: 820px) {
  .app-hero-inner {
    grid-template-columns: 1fr;
  }
}

.app-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-heading img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.app-heading h1 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  margin: 0;
}

.app-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.app-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1.25rem;
}

.app-store-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-screenshot {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.app-screenshot img {
  max-height: 520px;
  width: auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.app-section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.app-section h2 {
  margin-bottom: 0.75rem;
}

.privacy {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.privacy-body {
  max-width: 70ch;
  color: var(--text-muted);
}

.privacy-body h3 {
  color: var(--text);
  margin-top: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

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