/* ========================================
   Dan Anthony - Personal Website
   Bold & Distinctive Design
   ======================================== */

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

:root {
  --navy: #0B1120;
  --navy-light: #131B2E;
  --navy-mid: #1A2540;
  --blue: #3B82F6;
  --blue-bright: #60A5FA;
  --amber: #F59E0B;
  --amber-light: #FBBF24;
  --white: #FFFFFF;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--blue-bright);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--amber);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--blue);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(11, 17, 32, 0.98);
  border-bottom-color: rgba(59, 130, 246, 0.3);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--amber);
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

/* ========================================
   Hero Section (Home)
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 17, 32, 0.95) 0%,
    rgba(11, 17, 32, 0.7) 50%,
    rgba(11, 17, 32, 0.85) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 2px;
}

.hero h1 {
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--blue-bright);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: inline-block;
}

.hero-image img {
  border-radius: 4px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.hero-image::before {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-bright);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
}

/* ========================================
   Section Styles
   ======================================== */
.section {
  padding: 6rem 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header .accent-line {
  width: 60px;
  height: 3px;
  background: var(--amber);
  margin-bottom: 1.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
}

.section-alt {
  background: var(--navy-light);
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  background: var(--navy-light);
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ========================================
   Career Timeline (About)
   ======================================== */
.page-hero {
  padding: 10rem 0 4rem;
  background: var(--navy-light);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(245, 158, 11, 0.05));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
}

.about-intro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 4rem;
}

.about-photo {
  position: relative;
  display: inline-block;
}

.about-photo img {
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  display: block;
}

.about-photo::after {
  display: none;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), var(--amber), var(--blue));
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
  transform: translateX(-5px);
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--amber);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.timeline-company {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-bright);
}

.timeline-role {
  font-weight: 600;
  color: var(--white);
}

.timeline-dates {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
}

.timeline-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-highlights {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.timeline-highlights li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
}

.timeline-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.education-card {
  background: var(--navy-mid);
  padding: 1.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--blue);
}

.education-card h4 {
  margin-bottom: 0.25rem;
}

.education-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ========================================
   Media Page
   ======================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.media-card {
  background: var(--navy-light);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.media-card-image {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--navy-mid);
}

.media-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.media-card:hover .media-card-image img {
  transform: scale(1.05);
}

.media-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
  z-index: 1;
}

.badge-video {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.badge-article {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.badge-award {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

.badge-podcast {
  background: rgba(139, 92, 246, 0.9);
  color: white;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--transition);
}

.media-card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent var(--navy);
  margin-left: 3px;
}

.media-card-content {
  padding: 1.5rem;
}

.media-card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.media-card-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.media-card-source {
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   Blog
   ======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--navy-light);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
  position: relative;
  padding-top: 50%;
  overflow: hidden;
  background: var(--navy-mid);
}

.blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.blog-card-image img.portrait {
  position: static;
  width: 33.33%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.blog-card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-bright);
}

.blog-card-link:hover {
  color: var(--amber);
}

/* Blog Post */
.post-header {
  padding: 10rem 0 3rem;
  background: var(--navy-light);
  position: relative;
}

.post-header .container {
  max-width: 800px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
}

.post-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-bright);
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.post-hero-image {
  margin-top: 2rem;
  border-radius: 4px;
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 400px;
}

/* Inline figures (e.g. diagrams) shown in full, not cropped */
.post-figure {
  overflow: visible;
}

.post-figure img {
  object-fit: contain;
  max-height: none;
  max-width: 600px;
  margin: 0 auto;
  display: block;
}

.post-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.post-body h2 {
  font-size: 1.6rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--amber);
}

.post-body h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body blockquote {
  border-left: 3px solid var(--amber);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--text);
}

.post-body ul, .post-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-source {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========================================
   Photo Gallery Row (Home)
   ======================================== */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0;
}

.photo-strip img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: grayscale(30%);
  transition: all var(--transition);
}

.photo-strip img:hover {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--navy-light);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--amber);
}

/* ========================================
   Featured Section (Home)
   ======================================== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.featured-card {
  background: var(--navy-light);
  padding: 2rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.featured-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.featured-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.featured-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.featured-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 10rem;
  }

  .hero-image {
    display: none;
  }

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

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

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

  .about-intro {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-photo {
    max-width: 250px;
    margin: 0 auto;
  }

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

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

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(11, 17, 32, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-toggle {
    display: flex;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .timeline {
    padding-left: 2rem;
  }
}

@media (max-width: 480px) {
  .photo-strip {
    grid-template-columns: 1fr 1fr;
  }

  .photo-strip img {
    height: 150px;
  }

  .hero h1 {
    font-size: 2rem;
  }

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