/* ===== THEME VARIABLES ===== */
:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --card: #1a1a1a;
  --text: #e6e6e6;
  --muted: #a3a3a3;
  --accent: #00c2ff;
  --header-bg: rgba(0, 0, 0, 0.6);
  --store-bg: #ffffff;
  --store-text: #111111;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #111111;
  --muted: #555555;
  --accent: #0078d4;
  --header-bg: rgba(255, 255, 255, 0.85);
  --store-bg: #111111;
  --store-text: #f5f5f5;
}

/* ===== GLOBAL RESETS & TYPOGRAPHY ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: large;
}

@media (max-width: 980px) {
  html { font-size: 17px; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
}

body {
  background: var(--bg);
  font-family: "Aptos", sans-serif;
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Aptos Display", sans-serif;
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 2.5vw, 2.6rem);
  margin-bottom: 1rem;
  color: var(--accent);
}

h3 {
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
}

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

a:hover {
  text-decoration: underline;
}

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

/* ===== HEADER & NAV ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1.0rem;
  transition: color 0.3s;
}

/* Active nav link (current section) */
nav a.active {
  color: var(--accent);
  position: relative;
}

nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

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

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.theme-switch {
  position: relative;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #333;
  border-radius: 999px;
  transition: 0.3s;
}

.theme-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.3s;
}

.theme-switch input:checked + .theme-slider {
  background: var(--accent);
}

.theme-switch input:checked + .theme-slider::before {
  transform: translateX(22px);
}

/* ===== LAYOUT ===== */
main {
  padding: 2rem 0.5rem;
  max-width: 1248px;
  margin: 0 auto;
}

section {
  scroll-margin-top: 96px;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  section {
    scroll-margin-top: 96px;
  }
}

@media (max-width: 980px) {
  section {
    scroll-margin-top: 148px;
  }
}

/* ===== PROFILE SECTION ===== */
.profile-card {
  display: flex;
  padding: 2rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  gap: 2rem;
  align-items: center;
}

.profile-card img {
  width: 120px;       /* smaller avatar */
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}

.profile-info h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.profile-info p {
  color: var(--muted);
  font-size: 1.02rem;
}

/* ===== APPS SECTION ===== */
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.app-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.app-card img {
  width: 56px;       /* smaller app icons */
  height: 56px;
  margin-bottom: 0.25rem;
  object-fit: cover;
}

.app-card p {
  color: var(--muted);
  height: 100%;
  text-align: start;
}

.store-badge {
  margin-top: auto;
  display: flex;
  opacity: 1;
  justify-content: center;
  width: 100%;
}

.store-btn {
  display: inline-flex;
  align-items: bottom;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: var(--store-bg);
  color: var(--store-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.store-btn span.icon {
  font-size: 1.1rem;
}

.store-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  opacity: 0.97;
}

/* ===== AI CAPABILITIES SECTION ===== */
#ai-capabilities {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

#ai-capabilities p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.ai-stats,
.ai-process,
.ai-timeline {
  margin-top: 1rem;
}

.ai-stats h3,
.ai-process h3,
.ai-timeline h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.ai-stats ul,
.ai-process ol,
.ai-timeline ol {
  padding-left: 1.2rem;
  color: var(--text);
  font-size: 0.95rem;
}

.ai-stats li + li,
.ai-process li + li,
.ai-timeline li + li {
  margin-top: 0.25rem;
}

.ai-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ===== CERTIFICATION SECTION ===== */
#certification {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.cert-card {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cert-title {
  font-size: 1.1rem;
}

.cert-provider {
  font-size: 0.95rem;
  color: var(--muted);
}

.cert-link {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ===== CONTACT & FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  header {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  nav a {
    margin-left: 0;
    font-size: 0.95rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-list {
    grid-template-columns: 1fr;
  }

  #ai-capabilities,
  #certification {
    padding: 1.5rem;
  }
}
