:root {
  /* Professional background colours */
  --t-bg: #f8fafc;
  --t-bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  --t-bg-overlay: rgba(248, 250, 252, 0.8);
  --t-card-bg: #ffffff;
  --t-card-bg-hover: #ffffff;

  /* Professional text colours */
  --t-text: #1e293b;
  --t-text-secondary: #334155;
  --t-muted: #64748b;
  --t-muted-light: #94a3b8;

  /* Professional brand colours */
  --t-primary: #2563eb;
  --t-primary-dark: #1d4ed8;
  --t-primary-light: #3b82f6;
  --t-accent: #0f172a;
  --t-accent-light: #334155;
  --t-accent-secondary: #475569;

  /* Semantic colours */
  --t-success: #059669;
  --t-warning: #d97706;
  --t-error: #dc2626;

  /* Professional border and surface colours */
  --t-border: #e2e8f0;
  --t-border-light: #f1f5f9;
  --t-border-accent: #cbd5e1;

  /* Clean, professional shadows */
  --t-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --t-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --t-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --t-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --t-shadow-accent: 0 4px 14px rgba(37, 99, 235, 0.15);
  --t-shadow-glow: 0 0 0 1px rgba(37, 99, 235, 0.1);

  /* Spacing and sizing */
  --t-radius: 12px;
  --t-radius-sm: 8px;
  --t-radius-lg: 16px;
  --t-space: 24px;
  --t-space-sm: 16px;
  --t-space-lg: 32px;
  --t-max-width: 1200px;

  /* Typography */
  --t-font-size-xs: 0.75rem;
  --t-font-size-sm: 0.875rem;
  --t-font-size-base: 1rem;
  --t-font-size-lg: 1.125rem;
  --t-font-size-xl: 1.25rem;
  --t-font-size-2xl: 1.5rem;
  --t-font-size-3xl: 1.875rem;
  --t-font-size-4xl: 2.25rem;
  --t-font-size-5xl: 3rem;
}

/* Base / reset-lite */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--t-bg-gradient);
  color: var(--t-text);
  line-height: 1.6;
  font-size: var(--t-font-size-base);
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Professional dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    /* Professional dark backgrounds */
    --t-bg: #0f172a;
    --t-bg-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --t-bg-overlay: rgba(15, 23, 42, 0.9);
    --t-card-bg: #1e293b;
    --t-card-bg-hover: #334155;

    /* Professional dark text colours */
    --t-text: #f8fafc;
    --t-text-secondary: #e2e8f0;
    --t-muted: #94a3b8;
    --t-muted-light: #64748b;

    /* Professional dark brand colours */
    --t-primary: #3b82f6;
    --t-primary-dark: #2563eb;
    --t-primary-light: #60a5fa;
    --t-accent: #f8fafc;
    --t-accent-light: #e2e8f0;
    --t-accent-secondary: #cbd5e1;

    /* Professional dark borders */
    --t-border: #334155;
    --t-border-light: #475569;
    --t-border-accent: #64748b;

    /* Professional dark shadows */
    --t-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --t-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --t-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    --t-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.4);
    --t-shadow-accent: 0 4px 14px rgba(59, 130, 246, 0.25);
    --t-shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.2);
  }
}

/* Dark theme overrides */
@media (prefers-color-scheme: dark) {
  .header {
    background: rgba(15, 23, 42, 0.8);
  }
  
  .brand {
    color: #ffffff;
  }
  
  .brand:hover {
    color: #f1f5f9;
  }
}

/* Light theme overrides (system preference): make "Trusted by professionals" white */
@media (prefers-color-scheme: light) {
  .t-title {
    color: #ffffff;
  }
}

:root[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.8);
}

:root[data-theme="dark"] .brand {
  color: #ffffff;
}

:root[data-theme="dark"] .brand:hover {
  color: #f1f5f9;
}

/* Manual theme override via data attribute */
:root[data-theme="light"] {
  --t-bg: #f8fafc;
  --t-bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  --t-bg-overlay: rgba(248, 250, 252, 0.8);
  --t-card-bg: #ffffff;
  --t-text: #1e293b;
  --t-muted: #64748b;
  --t-border: #e2e8f0;
  --t-primary: #2563eb;
  --t-accent: #0f172a;
}

:root[data-theme="dark"] {
  --t-bg: #0f172a;
  --t-bg-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --t-bg-overlay: rgba(15, 23, 42, 0.9);
  --t-card-bg: #1e293b;
  --t-text: #f8fafc;
  --t-muted: #94a3b8;
  --t-border: #334155;
  --t-primary: #3b82f6;
  --t-accent: #f8fafc;
}

/* Page structure */
.header {
  padding: var(--t-space-lg) var(--t-space) var(--t-space);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--t-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: var(--t-shadow-sm);
}

.header-inner {
  margin: 0 auto;
  max-width: var(--t-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--t-space);
}

.brand {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: var(--t-font-size-xl);
  letter-spacing: -0.02em;
  color: var(--t-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.brand::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--t-primary);
  transition: width 0.3s ease;
}

.brand:hover {
  color: var(--t-primary-dark);
  transform: translateY(-1px);
}

.brand:hover::after {
  width: 100%;
}

@media (min-width: 640px) {
  .brand {
    font-size: var(--t-font-size-2xl);
  }
}

@media (min-width: 1024px) {
  .brand {
    font-size: var(--t-font-size-3xl);
  }
}

.t-section {
  padding: var(--t-space-lg) var(--t-space) 80px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .t-section {
    padding: 64px var(--t-space-lg) 120px;
  }
}

.t-container {
  width: 100%;
  max-width: var(--t-max-width);
}

.t-header {
  display: grid;
  gap: var(--t-space-sm);
  margin-bottom: 48px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.t-title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: var(--t-font-size-4xl);
  line-height: 1.2;
  color: var(--t-text);
  margin: 0;
}

@media (min-width: 640px) {
  .t-title {
    font-size: var(--t-font-size-4xl);
  }
}

@media (min-width: 1024px) {
  .t-title {
    font-size: 3rem; /* 48px */
  }
}

.t-subtitle {
  color: var(--t-muted);
  font-weight: 400;
  font-size: var(--t-font-size-lg);
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.t-grid {
  display: grid;
  gap: var(--t-space);
  grid-template-columns: 1fr; /* Single column layout for all screen sizes */
}

@media (min-width: 640px) {
  .t-grid {
    gap: var(--t-space-lg);
  }
}

@media (min-width: 1024px) {
  .t-grid {
    gap: var(--t-space-lg);
  }
}

@media (min-width: 1280px) {
  .t-grid {
    gap: 40px;
  }
}

.t-card {
  background: var(--t-card-bg);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow);
  padding: var(--t-space-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .t-card {
    flex-direction: row;
    align-items: center;
    gap: var(--t-space-lg);
    padding: var(--t-space-lg) var(--t-space-lg);
  }
}

.t-card:focus-within,
.t-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--t-shadow-lg);
  border-color: var(--t-primary);
}

.t-card:hover .t-avatar {
  transform: scale(1.05);
  box-shadow: var(--t-shadow-accent);
}

.t-quote {
  position: relative;
  margin: 0 0 var(--t-space) 0;
  padding-left: 24px;
  color: var(--t-text);
  font-size: var(--t-font-size-lg);
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex-grow: 1;
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .t-quote {
    margin: 0;
    flex: 1;
  }
}

.t-quote::before {
  content: "“";
  position: absolute;
  left: -2px;
  top: -6px;
  font-size: 28px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: var(--t-primary);
  opacity: 0.4;
  pointer-events: none;
  transition: all 0.3s ease;
}

.t-card:hover .t-quote::before {
  opacity: 0.6;
  color: var(--t-primary-dark);
}

.t-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--t-space-sm);
  align-items: center;
  padding-top: var(--t-space-sm);
  border-top: 1px solid var(--t-border-light);
}

@media (min-width: 768px) {
  .t-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
    min-width: 280px;
    grid-template-columns: 72px 1fr auto;
  }
}

.t-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--t-border);
  object-fit: cover;
  background: var(--t-border-light);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .t-avatar {
    width: 72px;
    height: 72px;
  }
}

.t-meta {
  display: grid;
  gap: 4px;
}

.t-name {
  font-weight: 600;
  font-size: var(--t-font-size-sm);
  line-height: 1.3;
  color: var(--t-text);
}

.t-role {
  font-weight: 400;
  font-size: var(--t-font-size-xs);
  color: var(--t-muted);
  line-height: 1.4;
}

.t-date {
  font-size: var(--t-font-size-xs);
  color: white;
  font-weight: 500;
  padding: 4px 8px;
  background: var(--t-primary);
  border-radius: var(--t-radius-sm);
  white-space: nowrap;
}

/* Focus visibility for keyboard users */
.t-card:focus-within {
  outline: 3px solid var(--t-primary);
  outline-offset: 2px;
  border-color: var(--t-primary);
}

/* Loading indicator */
.t-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px var(--t-space);
  text-align: center;
  position: relative;
}

.t-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--t-primary) 0%, transparent 70%);
  opacity: 0.1;
  animation: t-pulse 2s ease-in-out infinite;
}

.t-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--t-border-light);
  border-top: 3px solid var(--t-primary);
  border-right: 3px solid var(--t-accent);
  border-radius: 50%;
  animation: t-spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin-bottom: var(--t-space);
  position: relative;
  z-index: 1;
}

.t-loading-spinner::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top: 2px solid var(--t-accent-light);
  animation: t-spin-reverse 0.8s linear infinite;
}

.t-loading-text {
  margin: 0;
  color: var(--t-text-secondary);
  font-size: var(--t-font-size-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

@keyframes t-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes t-spin-reverse {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes t-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }
}

/* Respect reduced motion preferences */
/* Enhanced animations and interactions */
.t-grid {
  animation: fadeInUp 0.6s ease-out;
}

.t-card:nth-child(1) {
  animation-delay: 0.1s;
}
.t-card:nth-child(2) {
  animation-delay: 0.2s;
}
.t-card:nth-child(3) {
  animation-delay: 0.3s;
}
.t-card:nth-child(4) {
  animation-delay: 0.4s;
}
.t-card:nth-child(5) {
  animation-delay: 0.5s;
}
.t-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-card {
    transition: border-color 200ms ease;
    animation: none;
  }
  .t-card:hover {
    transform: none;
    box-shadow: var(--t-shadow);
  }
  .t-loading-spinner {
    animation: none;
    border-top-color: var(--t-border);
    border-right-color: var(--t-border);
  }
  .t-loading-spinner::after {
    animation: none;
  }
  .t-loading::before {
    animation: none;
  }
  .brand:hover {
    transform: none;
  }
  .theme-toggle:hover {
    transform: none;
  }
  .t-grid {
    animation: none;
  }
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: var(--t-space-lg) var(--t-space) 64px;
  color: var(--t-muted);
  font-size: var(--t-font-size-sm);
  text-align: center;
  border-top: 1px solid var(--t-border-light);
  background: var(--t-bg);
}

.site-footer a {
  color: var(--t-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--t-primary-dark);
  text-decoration: underline;
}

/* Theme toggle button */
.theme-toggle {
  appearance: none;
  border: 1px solid var(--t-border);
  background: var(--t-card-bg);
  color: var(--t-text);
  border-radius: var(--t-radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 44px;
}

.theme-toggle:hover {
  border-color: var(--t-primary);
  background: var(--t-primary);
  color: white;
  box-shadow: var(--t-shadow);
  transform: translateY(-1px);
}

.theme-toggle:focus {
  outline: 2px solid var(--t-primary);
  outline-offset: 2px;
  border-color: var(--t-primary);
}

.theme-toggle:active {
  transform: translateY(0);
}

/* Theme icons */
.theme-icon {
  position: absolute;
  transition: all 0.3s ease;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon.sun-icon {
  opacity: 1;
}

.theme-icon.moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
}

/* Dark theme icon states */
:root[data-theme="dark"] .theme-icon.sun-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.8);
}

:root[data-theme="dark"] .theme-icon.moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* System dark theme icon states */
@media (prefers-color-scheme: dark) {
  .theme-icon.sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
  }
  
  .theme-icon.moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Override system preference when manual theme is set to light */
:root[data-theme="light"] .theme-icon.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

:root[data-theme="light"] .theme-icon.moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
}
