/* AI-tainment Studios — public homepage */

:root {
  --bg: #070a0f;
  --bg-elevated: #0e141c;
  --bg-card: #121a24;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #e8eef5;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.25);
  --chip-bg: rgba(56, 189, 248, 0.1);
  --radius: 14px;
  --max: 1080px;
  --pad: 1.25rem;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(99, 102, 241, 0.1), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
.btn:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: #041018;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 10, 15, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(99, 102, 241, 0.85));
  box-shadow: 0 0 24px var(--accent-glow);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(7, 10, 15, 0.55);
  border-radius: 4px;
}

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

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

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.25rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 6vw, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.hero-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-art {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.08),
    0 0 40px var(--accent-glow),
    0 24px 48px rgba(0, 0, 0, 0.35);
}

.hero-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  min-height: 2.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

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

.btn-primary:hover {
  background: #7dd3fc;
  color: #041018;
}

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

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.btn-small {
  padding: 0.55rem 0.9rem;
  min-height: 2.5rem;
  font-size: 0.88rem;
}

/* Sections */

section {
  padding: 2.75rem 0;
}

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

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

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

/* Project cards */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 26, 36, 0.95), rgba(14, 20, 28, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 100%;
  min-width: 0;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08), 0 18px 40px rgba(0, 0, 0, 0.25);
}

.card-media {
  margin: 0;
  background: #0a1018;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem 1.35rem 1.25rem;
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow-wrap: break-word;
}

.card-status {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--chip-bg);
  color: var(--accent);
  border: 1px solid var(--border-strong);
}

.card-status.dev {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
}

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

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* About / contact */

.about-panel,
.contact-panel {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-panel p,
.contact-panel p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  overflow-wrap: break-word;
}

.about-panel p:last-child,
.contact-panel p:last-child {
  margin-bottom: 0;
}

.contact-panel a.github-link {
  font-weight: 600;
}

/* Footer */

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

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

.footer-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-domains span {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Tablet: stack hero, keep 2-col cards where space allows */

@media (max-width: 860px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-art {
    max-width: 36rem;
    width: 100%;
  }

  .hero-lead {
    font-size: 1.05rem;
  }
}

/* Narrow tablet / large phone: single-column cards */

@media (max-width: 720px) {
  :root {
    --pad: 1.1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav {
    gap: 0.35rem 1rem;
  }
}

/* Phones (~320–480px) */

@media (max-width: 480px) {
  :root {
    --pad: 1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.75rem 0;
  }

  .brand {
    font-size: 0.98rem;
  }

  .nav {
    width: 100%;
    gap: 0.15rem 1.1rem;
    justify-content: flex-start;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 2.25rem 0 1.75rem;
  }

  .hero-actions {
    margin-top: 1.35rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 0.4rem);
  }

  .hero-art {
    max-width: none;
  }

  section {
    padding: 2rem 0;
  }

  .section-head h2 {
    font-size: 1.35rem;
  }

  .card-body {
    padding: 1.05rem 1.1rem 1.15rem;
  }

  .about-panel,
  .contact-panel {
    padding: 1.15rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.65rem;
  }
}

/* Very small phones */

@media (max-width: 360px) {
  :root {
    --pad: 0.85rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .brand > span:last-child {
    font-size: 0.92rem;
  }
}
