@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;600&family=Manrope:wght@400;700&display=swap');

html {
  font-size: 19.2px; /* 120% of default 16px — matches Richard's preferred zoom */
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  color: #e0e0e0;
  font-family: 'Bai Jamjuree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@keyframes scanShift {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

@keyframes roll {
  0% { transform: translateY(0); }
  100% { transform: translateY(3px); }
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    transparent 0px,
    rgba(255,255,255,0.06) 2px,
    transparent 4px
  );
  animation: scanShift 2s linear infinite, roll 6s ease-in-out infinite alternate;
  mix-blend-mode: screen;
  filter: contrast(1.4) brightness(1.2);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 998;
  background: inherit;
  mix-blend-mode: difference;
  filter: blur(1px) saturate(2);
}

.centered {
  position: absolute;
  z-index: 10;
  padding: 1rem 2rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.4);
  max-width: 90vw;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin: 0.5rem 0;
  color: #ffffff;
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 600;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: #00ffff;
  font-weight: 400;
  margin: 0.3rem 0 0.5rem;
  letter-spacing: 0.05em;
  font-family: 'Bai Jamjuree', sans-serif;
}

.centered p {
  margin: 0.3rem 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.5;
  max-width: 90vw;
}

.centered p a {
  color: #00ffff;
  text-decoration: none;
}

.centered p a:hover {
  text-decoration: underline;
}

.icons {
  margin-top: 1rem;
}

.icons a {
  color: #00e5e3;
  margin: 0 0.5rem;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  transition: color 0.3s ease;
  text-decoration: none;
}

.icons a:hover {
  color: #ffffff;
}

.home-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.home-cta .cta-button {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.home-cta-secondary {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #666;
}

.home-cta-secondary a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.home-cta-secondary a:hover {
  color: #00e5e3;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid rgba(0, 229, 227, 0.1);
}

nav .nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

nav .logo img {
  height: 32px;
  width: auto;
  transition: opacity 0.3s ease;
}

nav .logo:hover img {
  opacity: 0.8;
}

nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

nav .hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: background 0.3s ease;
}

nav .hamburger::before,
nav .hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #fff;
  left: 0;
  transition: transform 0.3s ease;
}

nav .hamburger::before {
  top: -7px;
}

nav .hamburger::after {
  top: 7px;
}

nav.nav-open .hamburger {
  background: transparent;
}

nav.nav-open .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

nav.nav-open .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

nav .nav-links {
  display: flex;
  gap: 2rem;
}

nav .nav-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: #00ffff;
}

/* Inner pages - allow scrolling */
body.inner-page {
  overflow: auto;
  min-height: 100vh;
  display: block;
}

body.inner-page .page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  position: relative;
  z-index: 10;
}

/* Page header */
.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  color: #fff;
}

.page-header .subtitle {
  color: #00e5e3;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Services intro */
.services-intro {
  text-align: left;
  margin-bottom: 3rem;
}

.services-intro p {
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.services-intro p:first-child {
  font-size: 1.1rem;
  color: #ddd;
  font-weight: 600;
}

/* Service cards */
.services-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 227, 0.15);
  transition: border-color 0.3s ease, transform 0.3s ease;
  text-align: left;
}

.service-card:hover {
  border-color: rgba(0, 229, 227, 0.4);
  transform: translateY(-2px);
}

.service-card h2 {
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  text-align: center;
}

.service-card .service-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: #00e5e3;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 229, 227, 0.3);
  border-radius: 3px;
}

.service-card p {
  color: #aaa;
  line-height: 1.7;
  margin: 0;
  text-align: left;
}

.service-card ul {
  color: #999;
  margin: 1rem 0 0 0;
  padding-left: 1.2rem;
  line-height: 1.8;
  text-align: left;
}

.service-card li::marker {
  color: #00e5e3;
}

/* About page */
.about-content {
  text-align: left;
}

.about-content p {
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-content p:first-of-type {
  font-size: 1.2rem;
  color: #ddd;
}

.highlight-text {
  color: #00e5e3 !important;
  font-weight: 500;
}

.track-record {
  margin: 3rem 0;
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 227, 0.15);
}

.track-record h2 {
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 1.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.track-record ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-record li {
  color: #999;
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.track-record li:last-child {
  border-bottom: none;
}

.track-record li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #00e5e3;
}

.philosophy {
  margin: 3rem 0;
  padding: 2rem;
  border-left: 3px solid #00e5e3;
  background: rgba(0, 229, 227, 0.03);
}

.philosophy p {
  margin: 0;
  font-style: italic;
  color: #ccc !important;
  font-size: 1.1rem;
}

/* Contact page */
.contact-content {
  text-align: center;
}

.contact-content p {
  color: #aaa;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-content p:first-of-type {
  font-size: 1.1rem;
  color: #ddd;
  font-weight: 600;
  text-align: left;
}

.contact-intro {
  text-align: left;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 227, 0.2);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: #00e5e3;
  background: rgba(0, 229, 227, 0.1);
  transform: translateY(-2px);
}

.contact-link i,
.contact-link svg {
  color: #00e5e3 !important;
  fill: #00e5e3 !important;
  font-size: 1.4rem !important;
  width: 1.4rem !important;
  height: 1.4rem !important;
}

.contact-note {
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
  color: #666 !important;
}

/* CTA Section */
.cta-section {
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  background: rgba(0, 229, 227, 0.05);
  border: 1px solid rgba(0, 229, 227, 0.2);
}

.cta-section p {
  color: #ccc;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid #00e5e3;
  color: #00e5e3;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #00e5e3;
  color: #0a0a0a;
}

/* Insights listing */
.insights-intro {
  text-align: left;
  margin-bottom: 3rem;
}

.insights-intro p {
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.insights-intro p:first-child {
  font-size: 1.1rem;
  color: #ddd;
  font-weight: 600;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.insight-card {
  border-radius: 12px;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 227, 0.15);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.insight-card:hover {
  border-color: rgba(0, 229, 227, 0.4);
  transform: translateY(-2px);
}

.insight-link {
  display: block;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
}

.insight-date {
  display: block;
  font-size: 0.75rem;
  color: #00e5e3;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.insight-card h2 {
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 0.75rem 0;
  font-weight: 600;
  line-height: 1.3;
}

.insight-excerpt {
  color: #999;
  line-height: 1.7;
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
}

.insight-read {
  display: inline-block;
  color: #00e5e3;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Article pages */
.article-container {
  max-width: 720px;
}

.back-link {
  display: inline-block;
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #00e5e3;
}

.article-header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.article-header.has-hero {
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  overflow: hidden;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-top: -1rem;
}

.article-header.has-hero .article-header-inner {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.article-header.has-hero h1 {
  color: #fff;
}

.article-header.has-hero .article-date {
  color: #00e5e3;
}

.article-header.has-hero .article-reading-time {
  color: rgba(255,255,255,0.7);
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0.5rem 0 0 0;
  text-align: left;
}

.article-date {
  font-size: 0.8rem;
  color: #00e5e3;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-reading-time {
  font-size: 0.8rem;
  color: #666;
  margin-left: 1rem;
}

.article-body {
  text-align: left;
}

.article-lead {
  font-size: 1.25rem;
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.article-body p {
  color: #bbb;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.article-body h2 {
  font-size: 1.4rem;
  color: #fff;
  margin: 2.5rem 0 1rem 0;
  font-weight: 600;
}

.article-body ul {
  color: #aaa;
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
  line-height: 1.9;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body li::marker {
  color: #00e5e3;
}

.article-body em {
  color: #ddd;
  font-style: italic;
}

.article-body a {
  color: #00e5e3;
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-cta {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  border-left: 3px solid #00e5e3;
  background: rgba(0, 229, 227, 0.05);
}

.article-cta p {
  margin: 0;
  color: #ccc !important;
}

.related-articles {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-articles h3 {
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1rem 0;
}

.related-empty {
  color: #555;
  font-size: 0.9rem;
  font-style: italic;
}

/* Mobile nav */
@media (max-width: 600px) {
  nav .nav-container {
    padding: 0.8rem 1rem;
  }
  
  nav .nav-toggle {
    display: block;
    z-index: 1002;
  }
  
  nav .nav-links {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: #0a0a0a;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
  }
  
  nav.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
  }
  
  nav .nav-links a {
    position: relative;
    z-index: 1001;
  }
  
  nav .nav-links a {
    font-size: 1.2rem;
  }
  
  body.inner-page .page-container {
    padding: 5rem 1rem 3rem;
  }
  
  .article-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* About page portrait */
.about-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.about-portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(0, 229, 227, 0.3);
  box-shadow: 0 0 30px rgba(0, 229, 227, 0.15);
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.about-portrait:hover img {
  filter: grayscale(0%);
}

.about-title {
  text-align: center;
}

.about-title h1 {
  margin: 0;
}

/* Homepage background */
.hero-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/richard-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: 1;
  filter: grayscale(40%);
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 70% at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at center, black 20%, transparent 70%);
  animation: dissolve 3s ease-out 7s forwards;
}

@keyframes dissolve {
  from {
    opacity: 0.25;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .about-portrait {
    width: 140px;
    height: 140px;
  }
}

/* Contact caveat */
.contact-caveat {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Contact link with caveat */
.contact-link.has-caveat {
  flex-direction: column;
  padding: 1.25rem 2rem;
}

.contact-link.has-caveat small {
  display: block;
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
  font-weight: 400;
}

.key-hover-label {
  display: block;
  font-size: 0.7rem;
  color: #00e5e3;
  height: 1rem;
  transition: opacity 0.2s ease;
  opacity: 0;
  font-family: 'Bai Jamjuree', monospace;
  letter-spacing: 0.05em;
}

.dual-link:hover .key-hover-label {
  opacity: 1;
}

.contact-link.dual-link small {
  word-break: break-all;
  overflow-wrap: anywhere;
  font-family: 'Bai Jamjuree', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

/* Dual icon contact link */
.contact-link.dual-link {
  cursor: default;
}

.dual-icons {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.dual-icons a {
  color: #00e5e3;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.dual-icons a:hover {
  color: #fff;
}

/* Tweet embeds */
.tweet-embed {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 227, 0.15);
  border-left: 3px solid #1da1f2;
}

.tweet-embed p {
  color: #e0e0e0 !important;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.tweet-embed .tweet-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #888;
  font-size: 0.85rem;
}

.tweet-embed .tweet-meta a {
  color: #1da1f2 !important;
  text-decoration: none;
}

.tweet-embed .tweet-meta a:hover {
  text-decoration: underline;
}

.tweet-embed .tweet-meta svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: #1da1f2;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #00ffff;
}

.footer-copy {
  color: #555;
  font-size: 0.8rem;
  margin: 0;
}

/* Inline code */
code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 3px;
  padding: 0.15em 0.4em;
  font-family: 'Bai Jamjuree', monospace;
  font-size: 0.88em;
  color: #00ffff;
}

/* Code blocks */
pre code {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 6px;
  padding: 1em;
  display: block;
  overflow-x: auto;
  color: #ccc;
}

/* Content links (about, services, articles) */
.about-content a,
.services-content a,
.article-content a {
  color: #00ffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  transition: border-color 0.2s;
}

.about-content a:hover,
.services-content a:hover,
.article-content a:hover {
  border-bottom-color: #00ffff;
}

.service-card a {
  color: #00ffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  transition: border-color 0.2s;
}

.service-card a:hover {
  border-bottom-color: #00ffff;
}

/* Service card read links */
.service-read {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.service-read a {
  color: #00ffff;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.service-read a:hover {
  opacity: 1;
}
