/* ========================================
   Color Palette (matches CV)
   ======================================== */
:root {
  --deep-teal: #007377;
  --dark-navy: #112233;
  --soft-grey: #4D4D4D;
  --accent: #e85d4a;
  --bg-white: #ffffff;
  --bg-light: #f7f8fa;
  --bg-hero: #112233;
  --border-subtle: #e5e7eb;
  --text-muted: #6b7280;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

/* ========================================
   Base
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-white);
  color: var(--soft-grey);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-navy);
  font-weight: 700;
}

a {
  color: var(--deep-teal);
  transition: color var(--transition);
}

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

section {
  padding: 5rem 0;
}

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

/* ========================================
   Navbar
   ======================================== */
.navbar {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: var(--dark-navy);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar-brand:hover {
  color: var(--deep-teal);
}

.nav-link {
  color: var(--soft-grey);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--deep-teal);
}

.btn-outline-primary {
  color: var(--deep-teal);
  border-color: var(--deep-teal);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
}

.btn-outline-primary:hover {
  background-color: var(--deep-teal);
  border-color: var(--deep-teal);
  color: #fff;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  min-height: 70vh;
  background-color: var(--bg-hero);
  color: #fff;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 115, 119, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.hero .accent-text {
  background: linear-gradient(135deg, #00c9ce, #007377, #00a3a7, #00c9ce);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero .lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 540px;
  line-height: 1.7;
}

.hero .btn-hero {
  background-color: var(--deep-teal);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background-color var(--transition), transform var(--transition);
}

.hero .btn-hero:hover {
  background-color: #009296;
  transform: translateY(-2px);
}

/* ========================================
   Section Headings
   ======================================== */
.section-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-navy);
}

.section-subheading {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ========================================
   About Section
   ======================================== */
#about {
  background-color: var(--bg-white);
}

#about img {
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--border-subtle);
}

#about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--soft-grey);
}

/* ========================================
   Career Timeline
   ======================================== */
.timeline-phase {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--border-subtle);
}

.timeline-phase:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--deep-teal);
  border: 2px solid var(--bg-white);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

/* ========================================
   Project Cards
   ======================================== */
.project-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 3px solid var(--deep-teal);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 0 20px rgba(0, 115, 119, 0.12);
  border-color: rgba(0, 115, 119, 0.3);
}

.project-card h5 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

.project-card .project-meta {
  font-size: 0.85rem;
  color: var(--deep-teal);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--soft-grey);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ========================================
   Side Projects
   ======================================== */
.side-project-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  height: 100%;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.side-project-card:hover {
  box-shadow: 0 0 20px rgba(0, 115, 119, 0.12);
  border-color: rgba(0, 115, 119, 0.3);
}

.side-project-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.side-project-card .tech-label {
  font-size: 0.8rem;
  color: var(--deep-teal);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.side-project-card p {
  font-size: 0.9rem;
  color: var(--soft-grey);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ========================================
   Tech Stack
   ======================================== */
#techstack {
  background-color: var(--bg-white);
}

.tech-icon {
  width: 44px;
  height: 44px;
  filter: grayscale(30%);
  transition: filter var(--transition), transform var(--transition);
}

.tech-icon:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.tech-label-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soft-grey);
  margin-top: 0.4rem;
}

/* ========================================
   What I Bring
   ======================================== */
.bring-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.bring-item:last-child {
  margin-bottom: 0;
}

.bring-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 115, 119, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-teal);
  font-size: 1.1rem;
}

.bring-item h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 0.15rem;
}

.bring-item p {
  font-size: 0.9rem;
  color: var(--soft-grey);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ========================================
   Contact Section
   ======================================== */
#contact {
  background-color: var(--bg-hero);
  color: #fff;
}

#contact h2 {
  color: #fff;
}

#contact .section-subheading {
  color: rgba(255, 255, 255, 0.6);
}

#contact .card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: none;
}

#contact .card:hover {
  transform: none;
  box-shadow: none;
}

#contact .btn-submit {
  background-color: var(--deep-teal);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background-color var(--transition);
}

#contact .btn-submit:hover {
  background-color: #009296;
}

/* ========================================
   Footer
   ======================================== */
footer.footer {
  background-color: var(--dark-navy);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: none;
}

.footer-icon-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-icon-link:hover {
  color: var(--deep-teal);
  text-decoration: none;
}

.footer-icon-link:focus {
  outline: 2px solid var(--deep-teal);
  outline-offset: 2px;
}

.footer-backtotop {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-backtotop:hover {
  color: var(--deep-teal);
  text-decoration: none;
}

.footer-backtotop i {
  vertical-align: middle;
  margin-right: 0.3em;
}

/* ========================================
   Dark Mode
   ======================================== */
body.dark-mode {
  background-color: #0f1419;
  color: #d1d5db;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #f3f4f6;
}

body.dark-mode .navbar {
  background-color: rgba(15, 20, 25, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .navbar-brand {
  color: #f3f4f6 !important;
}

body.dark-mode .nav-link {
  color: #9ca3af !important;
}

body.dark-mode .nav-link:hover {
  color: var(--deep-teal) !important;
}

body.dark-mode .navbar .btn-outline-secondary {
  border-color: #374151;
  background: #1f2937;
  color: #d1d5db !important;
}

body.dark-mode .navbar .btn-outline-secondary:hover {
  background: #374151;
  color: #fff !important;
}

body.dark-mode .btn-outline-primary {
  color: var(--deep-teal);
  border-color: var(--deep-teal);
}

body.dark-mode .btn-outline-primary:hover {
  background-color: var(--deep-teal);
  color: #fff;
}

body.dark-mode .hero {
  background-color: #0a0f14;
}

body.dark-mode #about,
body.dark-mode #techstack {
  background-color: #0f1419 !important;
}

body.dark-mode .bg-light,
body.dark-mode section {
  background-color: #0f1419 !important;
  color: #d1d5db;
}

body.dark-mode .alt-bg {
  background-color: #151b22 !important;
}

body.dark-mode .project-card,
body.dark-mode .side-project-card {
  background-color: #1a2028;
  border-color: #1f2937;
}

body.dark-mode .project-card:hover,
body.dark-mode .side-project-card:hover {
  box-shadow: 0 0 25px rgba(0, 115, 119, 0.15);
  border-color: rgba(0, 115, 119, 0.35);
}

body.dark-mode .project-card h5,
body.dark-mode .side-project-card h5 {
  color: #f3f4f6;
}

body.dark-mode .project-card p,
body.dark-mode .side-project-card p {
  color: #9ca3af;
}

body.dark-mode .timeline-phase {
  border-left-color: #374151;
}

body.dark-mode .timeline-dot {
  border-color: #0f1419;
}

body.dark-mode .tech-label-text {
  color: #9ca3af;
}

body.dark-mode .tech-icon {
  filter: brightness(0.85) grayscale(30%);
}

body.dark-mode .tech-icon:hover {
  filter: brightness(1) grayscale(0%);
}

body.dark-mode .bring-icon {
  background-color: rgba(0, 115, 119, 0.2);
}

body.dark-mode .bring-item p {
  color: #9ca3af;
}

body.dark-mode #about img {
  border-color: #374151;
}

body.dark-mode #contact {
  background-color: #0a0f14 !important;
}

body.dark-mode #contact .card {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode footer {
  background-color: #0a0f14 !important;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 3rem 1.5rem;
  }

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

  .hero .lead {
    font-size: 1.05rem;
  }

  .section-heading {
    font-size: 1.6rem;
  }

  section {
    padding: 3.5rem 0;
  }
}

/* ========================================
   Blog
   Editorial reading layer on top of the site's design system.
   UI stays Inter; long-form prose uses Newsreader for a calmer read.
   ======================================== */

.blog-listing,
.blog-post {
  background-color: var(--bg-white);
}

/* --- Listing --- */
.blog-listing-header {
  margin-bottom: 3rem;
}

.blog-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--deep-teal);
  margin-bottom: 0.75rem;
}

.blog-listing-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 38rem;
}

.blog-list {
  margin: 0;
  padding: 0;
}

.blog-list-item + .blog-list-item {
  margin-top: 1.25rem;
}

.blog-list-link {
  display: block;
  padding: 1.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--deep-teal);
  border-radius: var(--radius);
  text-decoration: none;
  transition: box-shadow 0.3s ease, border-color 0.3s ease,
    transform 0.2s ease;
}

.blog-list-link:hover {
  box-shadow: 0 0 24px rgba(0, 115, 119, 0.12);
  border-color: rgba(0, 115, 119, 0.3);
  border-left-color: var(--deep-teal);
  transform: translateY(-2px);
}

.blog-list-meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--deep-teal);
  margin-bottom: 0.35rem;
}

.blog-list-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

.blog-list-link:hover .blog-list-title {
  color: var(--deep-teal);
}

.blog-list-summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--soft-grey);
}

/* --- Post --- */
.blog-post .blog-container {
  max-width: 720px;
}

.blog-back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--deep-teal);
  text-decoration: none;
  margin-bottom: 2rem;
}

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

.blog-post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-post-meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--deep-teal);
  margin-bottom: 0.75rem;
}

.blog-post-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: var(--dark-navy);
  margin-bottom: 1rem;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background-color: rgba(0, 115, 119, 0.1);
  color: var(--deep-teal);
}

/* Long-form prose */
.blog-content {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.75;
  color: #2b3440;
}

.blog-content > p:first-of-type {
  font-size: 1.4rem;
  line-height: 1.55;
  color: var(--dark-navy);
}

.blog-content p {
  margin-bottom: 1.5rem;
}

.blog-content h2,
.blog-content h3 {
  font-family: "Newsreader", Georgia, serif;
  color: var(--dark-navy);
  letter-spacing: -0.3px;
}

.blog-content h2 {
  font-size: 1.9rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.blog-content a {
  color: var(--deep-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 115, 119, 0.4);
}

.blog-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.blog-content blockquote {
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 3px solid var(--deep-teal);
  font-style: italic;
  color: var(--text-muted);
}

.blog-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 3rem auto;
  width: 100%;
}

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

.blog-content li {
  margin-bottom: 0.5rem;
}

/* Inline code keeps the UI font; code blocks come pre-themed from Shiki */
.blog-content code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background-color: rgba(0, 115, 119, 0.1);
  color: var(--deep-teal);
}

.blog-content pre {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid var(--border-subtle);
}

.blog-content .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
}

/* --- Blog dark mode (mirrors the site's dark palette) --- */
body.dark-mode .blog-listing,
body.dark-mode .blog-post {
  background-color: #0f1419 !important;
}

body.dark-mode .blog-list-link {
  background-color: #1a2028;
  border-color: #1f2937;
  border-left-color: var(--deep-teal);
}

body.dark-mode .blog-list-link:hover {
  box-shadow: 0 0 25px rgba(0, 115, 119, 0.15);
  border-color: rgba(0, 115, 119, 0.35);
}

body.dark-mode .blog-list-title {
  color: #f3f4f6;
}

body.dark-mode .blog-list-summary {
  color: #9ca3af;
}

body.dark-mode .blog-post-header {
  border-bottom-color: #1f2937;
}

body.dark-mode .blog-post-title,
body.dark-mode .blog-content h2,
body.dark-mode .blog-content h3 {
  color: #f3f4f6;
}

body.dark-mode .blog-content {
  color: #c3cad3;
}

body.dark-mode .blog-content > p:first-of-type {
  color: #e5e7eb;
}

body.dark-mode .blog-content blockquote {
  color: #9ca3af;
}

body.dark-mode .blog-content hr {
  border-top-color: #1f2937;
}

body.dark-mode .blog-content pre {
  border-color: #1f2937;
}

@media (max-width: 768px) {
  .blog-post-title {
    font-size: 2.1rem;
  }

  .blog-content {
    font-size: 1.15rem;
  }

  .blog-content > p:first-of-type {
    font-size: 1.25rem;
  }

  .blog-list-link {
    padding: 1.25rem;
  }
}
