/* ============================================
   MarkThomasFirestone.com — Stylesheet v2
   Bold, animated, professional
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #080a0f;
  --color-surface: #0f1219;
  --color-surface-alt: #141923;
  --color-border: #1e2433;
  --color-border-hover: #2a3348;
  --color-text: #b0b8c8;
  --color-text-muted: #5c6478;
  --color-heading: #e8ecf4;
  --color-accent: #3b8bff;
  --color-accent-2: #00d4aa;
  --color-accent-3: #a855f7;
  --color-glow: rgba(59, 139, 255, 0.15);
  --gradient-main: linear-gradient(135deg, #3b8bff, #00d4aa);
  --gradient-warm: linear-gradient(135deg, #3b8bff, #a855f7);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 960px;
  --header-height: 64px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  margin-top: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* --- Gradient Text Utility --- */
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

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

/* Decorative section divider */
.section--alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid rgba(30, 36, 51, 0.6);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: color 0.25s;
}

.header__logo:hover {
  color: var(--color-accent);
}

/* --- Navigation --- */
.nav__list {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav__link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.25s;
  white-space: nowrap;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-heading);
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px;
  min-width: 44px;
  min-height: 44px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-heading);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient orbs behind hero */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent), transparent 70%);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent-2), transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero__photo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem;
  border: 3px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image:
    linear-gradient(var(--color-bg), var(--color-bg)),
    var(--gradient-main);
  position: relative;
  z-index: 1;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 3rem;
}

.hero__title {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero__subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero__bio {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

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

/* --- Role Cards --- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

/* Gradient top border on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59, 139, 255, 0.08),
              0 4px 12px rgba(0, 0, 0, 0.3);
}

.card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(59, 139, 255, 0.12), rgba(0, 212, 170, 0.08));
  border: 1px solid rgba(59, 139, 255, 0.15);
}

.card__title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.card__text {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.card__link {
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Skills Grid --- */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.skill-tag {
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  font-size: 0.825rem;
  color: var(--color-text);
  transition: border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-heading);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 139, 255, 0.1);
}

/* --- Social Links --- */
.socials {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.3s;
}

.social-link:hover {
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 139, 255, 0.2);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link span,
.social-link {
  position: relative;
  z-index: 1;
}

/* --- Page Content (Role pages, Blog posts) --- */
.page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gradient-main);
}

.page-header__title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header__subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.content {
  padding: 2.5rem 0 4rem;
}

.content img {
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.content p,
.content ul,
.content ol {
  margin-bottom: 1.25rem;
}

.content ul,
.content ol {
  padding-left: 1.5rem;
}

.content ul {
  list-style: disc;
}

.content ol {
  list-style: decimal;
}

.content li {
  margin-bottom: 0.375rem;
}

.content strong {
  color: var(--color-heading);
}

/* --- Blog Listing --- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.blog-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.blog-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(59, 139, 255, 0.06);
}

.blog-card__date {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.blog-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.blog-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Blog Post --- */
.post-meta {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* --- Back Link --- */
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.25s, transform 0.25s;
}

.back-link:hover {
  color: var(--color-accent);
  transform: translateX(-3px);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.825rem;
  color: var(--color-text-muted);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--gradient-main);
}

.footer__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--color-text-muted);
  font-size: 0.825rem;
  transition: color 0.25s;
}

.footer__links a:hover {
  color: var(--color-accent);
}

/* --- Noise Overlay (subtle texture) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Utilities --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-accent {
  color: var(--color-accent);
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: rgba(8, 10, 15, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s,
                visibility 0.3s;
  }

  .nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav__link {
    font-size: 1rem;
  }

  .nav__toggle {
    display: block;
  }

  .nav__toggle--open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle--open span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle--open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  h1, .hero__title {
    font-size: 2rem;
  }

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

  .hero::before {
    width: 300px;
    height: 300px;
    opacity: 0.2;
  }

  .hero::after {
    width: 250px;
    height: 250px;
    opacity: 0.15;
  }

  .hero__photo {
    width: 130px;
    height: 130px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .page-header__title {
    font-size: 1.5rem;
  }

  .socials {
    gap: 0.5rem;
  }

  .social-link {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  h1, .hero__title {
    font-size: 3.25rem;
  }
}
