/* ==========================================================================
   Chris Myll // Tea2Code // Portfolio & App Showcase
   QA Engineer & Android Developer
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces & Backgrounds (Dark Creative Slate) */
  --bg-canvas: #13141c;
  --bg-section-alt: #0e0f15;
  --bg-card: #1c1d27;
  --bg-card-hover: #232532;
  --bg-header: rgba(19, 20, 28, 0.92);

  /* Accents */
  --accent-coral: #f75023;
  --accent-coral-hover: #e04115;
  --accent-coral-subtle: rgba(247, 80, 35, 0.15);

  --accent-mint: #1cbe59;
  --accent-mint-subtle: rgba(28, 190, 89, 0.15);

  --accent-purple: #8067f0;
  --accent-purple-subtle: rgba(128, 103, 240, 0.15);

  --accent-blue: #38bdf8;
  --accent-blue-subtle: rgba(56, 189, 248, 0.15);

  /* Borders & Dividers */
  --border-card: #282a3a;
  --border-card-hover: #3d4056;
  --border-subtle: rgba(255, 255, 255, 0.09);

  /* Text & Contrast (Crisp High-Contrast Whites) */
  --text-primary: #ffffff;
  --text-secondary: #c5c8dc;
  --text-muted: #9396ac;

  /* Shadows */
  --shadow-card: 0 3px 10px rgba(0, 0, 0, 0.22);
  --shadow-card-hover: 0 6px 14px rgba(0, 0, 0, 0.32);
  --shadow-avatar: 0 4px 12px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas,
    monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.2, 0.9, 0.3, 1);
}

[data-theme="light"] {
  color-scheme: light;

  /* Surfaces & Backgrounds (Crisp White Dizme Light Theme) */
  --bg-canvas: #f7f8fb;
  --bg-section-alt: #edf0f6;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-header: rgba(247, 248, 251, 0.94);

  /* Accents */
  --accent-coral: #f75023;
  --accent-coral-hover: #dc3e13;
  --accent-coral-subtle: rgba(247, 80, 35, 0.1);

  --accent-mint: #139c47;
  --accent-mint-subtle: rgba(19, 156, 71, 0.12);

  --accent-purple: #6d4be0;
  --accent-purple-subtle: rgba(109, 75, 224, 0.12);

  --accent-blue: #0284c7;
  --accent-blue-subtle: rgba(2, 132, 199, 0.12);

  /* Borders & Dividers */
  --border-card: #e2e5ef;
  --border-card-hover: #f75023;
  --border-subtle: rgba(19, 20, 28, 0.08);

  /* Text & Contrast (Crisp Dark Charcoal) */
  --text-primary: #12131a;
  --text-secondary: #4a4e61;
  --text-muted: #6e7389;

  /* Shadows */
  --shadow-card: 0 3px 10px rgba(20, 24, 40, 0.05);
  --shadow-card-hover: 0 6px 14px rgba(20, 24, 40, 0.08);
  --shadow-avatar: 0 4px 12px rgba(20, 24, 40, 0.06);
}

/* --------------------------------------------------------------------------
   Reset & Baseline
   -------------------------------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark light;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

/* --------------------------------------------------------------------------
   Themed Browser Surfaces
   -------------------------------------------------------------------------- */

::selection {
  background-color: var(--accent-coral);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}

::-webkit-scrollbar-thumb {
  background: #2b2d3c;
  border-radius: var(--radius-xs);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c8ccd8;
}

::-webkit-scrollbar-thumb:hover {
  background: #3e4156;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #aab0c0;
}

:focus-visible {
  outline: 2px solid var(--accent-coral);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Layout Containers
   -------------------------------------------------------------------------- */

[id] {
  scroll-margin-top: 84px;
}

.site-container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-container {
  padding: 96px 0;
}

.section-muted {
  background-color: var(--bg-section-alt);
}

.section-heading-wrap {
  margin-bottom: 48px;
  max-width: 720px;
}

.section-title {
  font-size: clamp(2.25rem, 4.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-intro {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Top Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
  transition:
    background-color 200ms ease,
    border-color 200ms ease;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.logo-accent {
  color: var(--accent-coral);
  font-size: 1.5rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 140ms var(--ease-spring);
}

.nav-item:hover {
  color: var(--accent-coral);
}

/* Theme Toggle Button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    background-color 160ms var(--ease-spring),
    border-color 160ms var(--ease-spring),
    color 160ms var(--ease-spring),
    transform 160ms var(--ease-spring);
}

.theme-toggle:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  transform: scale(1.08);
}

.theme-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: block;
}

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

.hero-section {
  padding: 88px 0 104px;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}

/* Left Content */
.hero-headline {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.08;
  margin-bottom: 16px;
}

.highlight-name {
  color: var(--accent-coral);
}

.hero-subhead {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.45;
}

.hero-subhead strong {
  font-weight: 800;
  color: var(--text-primary);
}

.hero-text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 54ch;
  margin-bottom: 34px;
  line-height: 1.7;
}

/* Buttons */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 140ms var(--ease-spring),
    border-color 140ms var(--ease-spring),
    color 140ms var(--ease-spring),
    transform 120ms var(--ease-spring),
    box-shadow 140ms var(--ease-spring);
}

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

.btn-primary {
  background-color: var(--accent-coral);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--accent-coral-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-2px);
}

.btn-icon-arrow {
  width: 16px;
  height: 16px;
  transition: transform 120ms var(--ease-spring);
}

.btn-primary:hover .btn-icon-arrow {
  transform: translateX(3px);
}

/* Channels List */
.hero-channels {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.channels-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.channels-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background-color 140ms var(--ease-spring),
    border-color 140ms var(--ease-spring),
    color 140ms var(--ease-spring);
}

.channel-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.channel-link:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  color: var(--text-primary);
}

/* Profile Card (Right Column) */
.hero-aside {
  display: flex;
  justify-content: center;
}

.profile-card {
  width: 100%;
  max-width: 340px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 26px 28px;
  text-align: center;
  box-shadow: var(--shadow-avatar);
  transition:
    transform 180ms var(--ease-spring),
    border-color 180ms var(--ease-spring),
    box-shadow 180ms var(--ease-spring);
}

.profile-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-hover);
}

.profile-photo-housing {
  width: 150px;
  height: 150px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(
    135deg,
    var(--accent-coral) 0%,
    var(--accent-purple) 100%
  );
  box-shadow: var(--shadow-avatar);
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: var(--bg-canvas);
}

.profile-card-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 24px;
}

.profile-card-name {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.profile-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-coral);
}

.profile-card-org {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-quick-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stat-separator {
  width: 1px;
  height: 28px;
  background-color: var(--border-subtle);
}

/* --------------------------------------------------------------------------
   App Showcase Cards & Category Blocks
   -------------------------------------------------------------------------- */

.project-category-block {
  margin-bottom: 56px;
}

.project-category-block:last-of-type {
  margin-bottom: 48px;
}

.category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

.category-count {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 0;
}

.apps-grid-single {
  grid-template-columns: minmax(0, 680px);
}

.app-showcase-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition:
    border-color 150ms var(--ease-spring),
    transform 150ms var(--ease-spring),
    box-shadow 150ms var(--ease-spring);
}

.app-showcase-card:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.app-card-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-coral {
  background-color: var(--accent-coral-subtle);
  color: var(--accent-coral);
}

.badge-mint {
  background-color: var(--accent-mint-subtle);
  color: var(--accent-mint);
}

.badge-purple {
  background-color: var(--accent-purple-subtle);
  color: var(--accent-purple);
}

.badge-blue {
  background-color: var(--accent-blue-subtle);
  color: var(--accent-blue);
}

.badge-dim {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

[data-theme="light"] .badge-dim {
  background-color: rgba(18, 19, 26, 0.08);
  color: var(--text-secondary);
}

.app-card-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.app-card-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
  flex-grow: 1;
}

.app-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--accent-coral);
  flex-shrink: 0;
}

.app-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-card-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition:
    background-color 140ms var(--ease-spring),
    border-color 140ms var(--ease-spring),
    color 140ms var(--ease-spring);
}

.btn-card-primary svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.btn-card-primary:hover {
  background-color: var(--accent-coral);
  border-color: var(--accent-coral);
  color: #ffffff;
}

[data-theme="light"] .btn-card-primary {
  background-color: #edf0f7;
  color: var(--text-primary);
  border-color: var(--border-card);
}

[data-theme="light"] .btn-card-primary:hover {
  background-color: var(--accent-coral);
  border-color: var(--accent-coral);
  color: #ffffff;
}

.link-privacy {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 120ms var(--ease-spring);
}

.link-privacy:hover {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Catalog Banner */
.catalog-callout {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-card);
}

.callout-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.callout-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.callout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

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

.contact-card-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-link {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-coral);
  text-decoration: none;
  transition: color 120ms var(--ease-spring);
}

.contact-link:hover {
  color: var(--accent-coral-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-plain {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contact-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.contact-social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 120ms var(--ease-spring);
}

.contact-social-links a:hover {
  color: var(--accent-coral);
}

.link-divider {
  color: var(--border-card);
  user-select: none;
}

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

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0;
  background-color: var(--bg-section-alt);
}

.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-copy strong {
  color: var(--text-primary);
}

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

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
}

.footer-legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 120ms var(--ease-spring);
}

.footer-legal-links a:hover {
  color: var(--accent-coral);
}

.footer-dot {
  color: var(--border-card);
  user-select: none;
}

/* --------------------------------------------------------------------------
   Responsive Adaptations
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-channels {
    justify-content: center;
  }

  .hero-aside {
    order: -1;
  }

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

  .contact-card-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .catalog-callout {
    flex-direction: column;
    text-align: center;
  }

  .callout-actions {
    flex-direction: column;
    width: 100%;
  }

  .callout-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-flex {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .nav-right {
    gap: 14px;
  }

  .nav-menu {
    gap: 14px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .theme-icon {
    width: 17px;
    height: 17px;
  }

  .section-title {
    font-size: 2rem;
  }

  .profile-card {
    padding: 28px 18px;
  }

  .profile-photo-housing {
    width: 120px;
    height: 120px;
  }

  .catalog-callout {
    padding: 24px 20px;
  }

  .contact-card-wrap {
    padding: 24px 20px;
  }
}

/* --------------------------------------------------------------------------
   Accessibility: Reduced Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
