/* sdtareq portfolio — dark-first, light via prefers-color-scheme */

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-elevated: #12141a;
  --surface: #171a22;
  --surface-hover: #1c202b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eceef4;
  --text-muted: #9aa3b5;
  --text-faint: #6b7385;
  --hero-glow: rgba(148, 163, 184, 0.07);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 1100px;
  --pad: clamp(1.25rem, 4vw, 2rem);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f5f8;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8f9fc;
    --border: rgba(15, 18, 28, 0.08);
    --border-strong: rgba(15, 18, 28, 0.14);
    --text: #141821;
    --text-muted: #5b6475;
    --text-faint: #8a93a5;
    --hero-glow: rgba(71, 85, 105, 0.08);
    --shadow: 0 16px 40px rgba(20, 24, 33, 0.08);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--hero-glow), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: var(--pad);
  top: 0.75rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--pad);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand span {
  color: var(--text-muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
}

.hero-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  max-width: 12ch;
}

.hero-lead {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text-muted);
}

.apps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(3rem, 8vw, 5rem);
}

.section-label {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.app-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.app-card {
  --accent: #94a3b8;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong));
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.app-card[data-app="tasbeeh"] { --accent: #26a69a; }
.app-card[data-app="grammar"] { --accent: #6366f1; }
.app-card[data-app="math"] { --accent: #4f46e5; }
.app-card[data-app="mateflow"] { --accent: #14e3b3; }

.app-card-media {
  position: relative;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  /* Fixed height (not min-height) so every card's media area lines up in the
     grid whether or not that app has a screenshot yet — a has-shot card's
     220px-max image and a shot-less card's bare icon both render in the
     same box instead of the row growing/shrinking per card. */
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.app-card-media.has-shot {
  padding: 1rem 1rem 0;
  min-height: 14rem;
  align-items: stretch;
}

.app-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 1.15rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.app-card-media.has-shot .app-card-icon {
  align-self: flex-end;
  margin-bottom: 1rem;
}

.app-shot {
  width: min(42%, 160px);
  margin-left: auto;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  object-position: top center;
  max-height: 220px;
}

.app-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.35rem 1.4rem;
  border-top: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.app-meta li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 75%, var(--text-muted));
}

.app-meta li:not(:last-child)::after {
  content: "·";
  margin-left: 0.65rem;
  color: var(--text-faint);
  font-weight: 500;
}

.app-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.app-tagline {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

.app-desc {
  margin: 0 0 1.25rem;
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-top: auto;
}

.privacy-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.privacy-link:hover,
.privacy-link:focus-visible {
  color: var(--text);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  background: #000;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.play-badge:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.play-badge[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.play-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.play-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.play-badge-text small {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.play-badge-text strong {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.coming-soon {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, black);
  padding: 2.5rem var(--pad) 2rem;
}

@media (prefers-color-scheme: light) {
  .site-footer {
    background: #ebecef;
  }
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.footer-contact,
.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-contact a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-copy {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-policies h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.footer-policies ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.footer-policies a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-policies a:hover,
.footer-policies a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card,
  .play-badge {
    transition: none;
  }
  .app-card:hover {
    transform: none;
  }
}
