* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Disable all transitions on page load to prevent flash */
.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
  animation: none !important;
}

:root {
  --text-color: #4578a2;
  --text-light: #666;
  --bg-color: #e9e5dc;
  --accent: #1a1a1a;
  --border: #d0d0d0;
  /* --heading-color: #1a1a1a; */
  --heading-color: rgb(133, 185, 222);
  --typewriter-color: #4578a2;
}

[data-theme="dark"] {
  --text-color: #e8e8e8;
  --text-light: #a0a0a0;
  --bg-color: #1a1a1a;
  --accent: #e8e8e8;
  --border: #333;
  --heading-color: rgba(255, 249, 197, 0.6);
  --typewriter-color: rgba(255, 249, 197, 0.6);
}

body {
  font-family: "Inter", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-color);
  background: var(--bg-color);
  transition:
    background 0.3s ease,
    color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 320px;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

header .nav,
.hero,
.about .container,
.skills .container,
.blog .container,
.contact .container,
footer .container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Typography */
h1,
h2,
.hero-content .subtitle {
  font-family: "Fraunces", "Georgia", serif;
}

h1 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

h2 {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

[data-theme="dark"] h2 {
  color: var(--heading-color);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--heading-color);
}

p {
  margin-bottom: 1.25rem;
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

/* Layout */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 4rem;
  width: 100%;
  box-sizing: border-box;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.logo-link {
  text-decoration: none;
  border: none;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  border: none;
  opacity: 0.7;
}

.logo-text {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-color);
  font-style: italic;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  font-size: 0.95rem;
}

/* "Free Consultation" item appears only in the mobile hamburger menu */
.nav-links .mobile-only-nav {
  display: none;
}

.nav-links a {
  color: var(--text-light);
  border: none;
  font-weight: 400;
  position: relative;
  transition: color 0.3s ease-in-out;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  color: var(--heading-color);
}

[data-theme="dark"] .nav-links a::after {
  background-color: var(--heading-color);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.3s ease-in-out,
    color 0.3s ease-in-out;
  color: var(--text-light);
}

.theme-toggle:hover {
  border-color: var(--text-color);
  color: var(--text-color);
}

[data-theme="dark"] .theme-toggle:hover {
  border-color: var(--heading-color);
  color: var(--heading-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--heading-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
  color: var(--text-color);
}

.mobile-nav-buttons {
  display: none;
}

[data-theme="dark"] .mobile-menu-btn {
  color: var(--heading-color);
}

.logo-link img {
  opacity: 0.3;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.mobile-menu-close {
  display: none;
}

[data-theme="dark"] .mobile-menu-close {
  color: var(--heading-color);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.mobile-menu-overlay.active {
  display: block;
}

/* Section Dividers */
.section-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: -1px 0;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: 80px;
}

.section-divider svg path {
  fill: var(--border);
  opacity: 0.3;
}

/* Sections */
section {
  padding: 6rem 0;
  overflow-x: hidden;
}

/* section:last-of-type {
  padding:  0 0 6rem;
} */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.hero .container {
  position: relative;
}

.hero-decoration {
  position: absolute;
  right: 20px;
  top: 65%;
  transform: translateY(-50%);
  width: 650px;
  height: 650px;
  pointer-events: none;
  opacity: 0.25;
  z-index: -1;
}

.hero-decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-decoration .bridge-dark {
  display: none;
}

[data-theme="dark"] .hero-decoration .bridge-light {
  display: none;
}

[data-theme="dark"] .hero-decoration .bridge-dark {
  display: block;
}

[data-theme="dark"] .hero-decoration {
  opacity: 0.18;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: 0.25rem;
}

.hero-content .subtitle {
  font-size: 1.75rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 500;
  font-style: italic;
}

.hero-content .description {
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 55ch;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;

  align-items: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-color);
  color: var(--text-color);
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
}

[data-theme="dark"] .btn-primary {
  background: var(--heading-color);
  color: var(--bg-color);
  border: none;
}

.btn-primary:hover {
  /* background: var(--text-light); */
  background: var(--heading-color);
  opacity: 0.9;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--heading-color);
  opacity: 0.8;
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--bg-color);
  opacity: 0.7;
  color: var(--text-color);
  border-color: var(--text-color);
}

.btn-outline:hover {
  opacity: 0.9;
  color: var(--heading-color);
  border-color: var(--heading-color);
}

[data-theme="dark"] .btn-outline {
  background: var(--bg-color);
  opacity: 0.7;
  color: var(--heading-color);
  border-color: #2a2a2a;
  border-width: 1px;
}

[data-theme="dark"] .btn-outline:hover {
  border-color: var(--heading-color);
}

/* Background Geometric Shapes */
.geo-shape {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
}

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(var(--rotation, 0deg));
  }
  50% {
    transform: translateY(-120px) translateX(var(--float-x, 0px))
      rotate(var(--rotation, 0deg));
  }
}

@keyframes floatAlt {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(var(--rotation, 0deg));
  }
  50% {
    transform: translateY(80px) translateX(var(--float-x, 0px))
      rotate(var(--rotation, 0deg));
  }
}

/* Increase shape visibility in light mode */
:root:not([data-theme="dark"]) .about::before,
:root:not([data-theme="dark"]) .about::after,
:root:not([data-theme="dark"]) .about .container::before,
:root:not([data-theme="dark"]) .about .container::after,
:root:not([data-theme="dark"]) .skills::before,
:root:not([data-theme="dark"]) .skills-grid::after,
:root:not([data-theme="dark"]) .skill-category:nth-child(2)::before,
:root:not([data-theme="dark"]) .projects::before,
:root:not([data-theme="dark"]) .projects::after,
:root:not([data-theme="dark"]) .project-card:nth-child(1)::before,
:root:not([data-theme="dark"]) .project-card:nth-child(1)::after,
:root:not([data-theme="dark"]) .project-card:nth-child(2)::before,
:root:not([data-theme="dark"]) .project-card:nth-child(2)::after,
:root:not([data-theme="dark"]) .project-card:nth-child(3)::before,
:root:not([data-theme="dark"]) .project-card:nth-child(3)::after,
:root:not([data-theme="dark"]) .project-card:nth-child(4)::before,
:root:not([data-theme="dark"]) .project-card:nth-child(4)::after,
:root:not([data-theme="dark"]) .blog::before,
:root:not([data-theme="dark"]) .blog::after,
:root:not([data-theme="dark"]) .blog-grid::before,
:root:not([data-theme="dark"]) .blog-grid::after,
:root:not([data-theme="dark"]) .blog .container::before,
:root:not([data-theme="dark"]) .blog .container::after,
:root:not([data-theme="dark"]) .contact::before,
:root:not([data-theme="dark"]) .contact::after,
:root:not([data-theme="dark"]) .contact-form-wrapper::before,
:root:not([data-theme="dark"]) .contact-form-wrapper::after {
  opacity: 0.1;
}

.about::before {
  content: "";
  position: absolute;
  top: 10%;
  right: 20%;
  width: 300px;
  height: 300px;
  background: #8b5cf6;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
  --rotation: 15deg;
  --float-x: 50px;
}

.about::after {
  content: "";
  position: absolute;
  top: 0;
  left: 3%;
  width: 250px;
  height: 250px;
  background: #10b981;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 16s ease-in-out infinite 1s;
  --rotation: -8deg;
  --float-x: -60px;
}

.skills::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 2%;
  width: 240px;
  height: 240px;
  background: #f59e0b;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 0.5s;
  --rotation: -20deg;
  --float-x: -70px;
}

.skills .container::before {
  content: "";
  position: absolute;
  top: 40%;
  right: 5%;
  width: 220px;
  height: 220px;
  background: #10b981;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 1.5s;
  --float-x: 45px;
}

.skills .container::after {
  content: "";
  position: absolute;
  top: 25%;
  left: 25%;
  width: 220px;
  height: 220px;
  background: #8b5cf6;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: -1;
  pointer-events: none;
  animation: float 17s ease-in-out infinite 1s;
  --rotation: 18deg;
  --float-x: 55px;
}

.projects::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 6%;
  width: 280px;
  height: 280px;
  background: #3b82f6;
  opacity: 0.06;
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 18s ease-in-out infinite 0.8s;
  --rotation: -12deg;
  --float-x: -50px;
}

.projects::after {
  content: "";
  position: absolute;
  bottom: 8%;
  right: 7%;
  width: 240px;
  height: 240px;
  background: #ec4899;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 1.2s;
  --rotation: 20deg;
  --float-x: 65px;
}

.blog::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 12%;
  width: 300px;
  height: 300px;
  background: #14b8a6;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 0.3s;
  --rotation: -15deg;
  --float-x: -55px;
}

.blog::after {
  content: "";
  position: absolute;
  bottom: 15%;
  right: 10%;
  width: 270px;
  height: 270px;
  background: #f97316;
  opacity: 0.08;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: float 17s ease-in-out infinite 1.5s;
  --float-x: 40px;
}

.blog-grid::before {
  content: "";
  position: absolute;
  top: 30%;
  right: 8%;
  width: 220px;
  height: 220px;
  background: #a855f7;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 16s ease-in-out infinite 0.9s;
  --rotation: 12deg;
  --float-x: 60px;
}

.blog-grid::after {
  content: "";
  position: absolute;
  bottom: 25%;
  left: 5%;
  width: 240px;
  height: 240px;
  background: #10b981;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 15s ease-in-out infinite 1.3s;
  --rotation: -10deg;
  --float-x: -45px;
}

.blog .container::before {
  content: "";
  position: absolute;
  top: 5%;
  right: 20%;
  width: 200px;
  height: 200px;
  background: #3b82f6;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 17s ease-in-out infinite 0.6s;
  --float-x: 35px;
}

.blog .container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2%;
  width: 210px;
  height: 210px;
  background: #06b6d4;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 18s ease-in-out infinite 1.1s;
  --rotation: 20deg;
  --float-x: -70px;
}

.contact::before {
  content: "";
  position: absolute;
  top: 15%;
  right: 5%;
  width: 290px;
  height: 290px;
  background: #8b5cf6;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 2s;
  --rotation: -22deg;
  --float-x: -65px;
}

.contact::after {
  content: "";
  position: absolute;
  bottom: 8%;
  left: 5%;
  width: 310px;
  height: 310px;
  background: #06b6d4;
  opacity: 0.08;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 40s ease-in-out infinite 0.5s;
  --rotation: 10deg;
  --float-x: 280px;
}

.contact-intro {
  padding-inline: 1rem;
}

.contact-intro p {
  color: var(--text-light);
  margin: 0 auto;
  max-width: 600px;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* About */
.about {
  padding: 6rem 0;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

.about .container::before {
  content: "";
  position: absolute;
  top: 35%;
  right: 5%;
  width: 200px;
  height: 200px;
  background: #f59e0b;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 1s;
  --float-x: 40px;
}

.about .container::after {
  content: "";
  position: absolute;
  bottom: 25%;
  right: 30%;
  width: 180px;
  height: 180px;
  background: #3b82f6;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 0.5s;
  --rotation: 25deg;
  --float-x: -50px;
}

.about-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
  overflow: visible;
}

.about-image .placeholder {
  width: 400px;
  height: 500px;
  overflow: visible;
  position: relative;
  border-radius: 0;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0.5;
  transform: scale(1.5) translateY(-2%);
}

[data-theme="dark"] .about-image img {
  opacity: 0.3;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-family: "Fraunces", serif;
}

.about-text p {
  color: var(--text-light);
  line-height: 1.7;
  max-width: none;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Skills */
.skills {
  padding: 6rem 0;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

.skills .bg-pop-art {
  position: absolute;
  top: 10%;
  left: 50%;
  width: clamp(500px, 75vw, 1200px);
  height: clamp(500px, 75vw, 1200px);
  opacity: 0.15;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  transform: translateX(-50%);
}

:root:not([data-theme="dark"]) .skills .bg-pop-art {
  opacity: 0.2;
}

@media (max-width: 768px) {
  .skills .bg-pop-art {
    top: 18%;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3rem;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.skills-grid::after {
  content: "";
  position: absolute;
  bottom: 0%;
  left: 2%;
  width: 160px;
  height: 160px;
  background: #14b8a6;
  opacity: 0.07;
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 0.4s;
  --rotation: 10deg;
  --float-x: 50px;
}

.skill-category:nth-child(2)::before {
  content: "";
  position: absolute;
  top: 60%;
  left: 70%;
  width: 155px;
  height: 155px;
  background: #ef4444;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 0.2s;
  --transform-translate: translate(-50%, -50%);
  --rotation: 45deg;
  --float-x: -55px;
}

.skill-category h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color);
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: 0.5rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.skill-list li:last-child {
  border-bottom: none;
}

/* Projects */
.projects {
  padding: 6rem 0;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

.projects .bg-pop-art {
  position: absolute;
  top: 31%;
  left: 5%;
  width: clamp(420px, 55vw, 1120px);
  height: clamp(420px, 55vw, 1120px);
  /* opacity: 0.09; */
  opacity: 0.2;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  transform: rotate(12deg);
}

:root:not([data-theme="dark"]) .projects .bg-pop-art {
  /* opacity: 0.11; */
  opacity: 0.18;
}

@media (max-width: 768px) {
  .projects .bg-pop-art {
    top: 50%;
  }
}

.projects > .section-title {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 4rem;
}

.projects-list {
  counter-reset: project-counter;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  position: relative;
}

.projects-list::before {
  content: "";
  position: absolute;
  top: 35%;
  right: 8%;
  width: 260px;
  height: 260px;
  background: #8b5cf6;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  animation: floatAlt 17s ease-in-out infinite 0.6s;
  --rotation: -18deg;
  --float-x: -60px;
  pointer-events: none;
}

.projects-list::after {
  content: "";
  position: absolute;
  bottom: 15%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: #10b981;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: float 18s ease-in-out infinite 1.2s;
  --float-x: 50px;
}

.project-card:nth-child(1)::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 42%;
  width: 180px;
  height: 180px;
  background: #ef4444;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 0.4s;
  --rotation: 35deg;
  --float-x: 55px;
}

.project-card:nth-child(2)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 28%;
  width: 220px;
  height: 220px;
  background: #f59e0b;
  opacity: 0.06;
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 1s;
  --rotation: 8deg;
  --float-x: -70px;
}

.project-card:nth-child(3)::before {
  content: "";
  position: absolute;
  bottom: 28%;
  left: 38%;
  width: 180px;
  height: 180px;
  background: #a855f7;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 0.7s;
  --rotation: -28deg;
  --float-x: 45px;
}

.project-card:nth-child(4)::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 5%;
  width: 150px;
  height: 150px;
  background: #06b6d4;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: -1;
  pointer-events: none;
  animation: float 17s ease-in-out infinite 0.3s;
  --rotation: 15deg;
  --float-x: -65px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 10rem;
  width: 100%;
  max-width: 100%;
}

.project-card .device-wrapper {
  grid-column: 2;
  grid-row: 1;
}

.project-card .project-content {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  padding-right: 1rem;
}

.project-tech,
.project-links {
  justify-content: flex-end;
}

.device-wrapper {
  width: 100%;
  min-width: 0;
  overflow: visible;
  box-sizing: border-box;
}

.device-wrapper device-mockup {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.project-content {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.project-content::before {
  counter-increment: project-counter;
  content: "0" counter(project-counter);
  display: block;
  font-size: 8rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 0.8;
  font-family: "Fraunces", serif;
  opacity: 0.15;
  margin-bottom: 1rem;
}

.project-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-family: "Fraunces", serif;
  line-height: 1.2;
}

.project-content p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.project-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.project-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  border-bottom: none;
  transition: color 0.3s ease-in-out;
}

.project-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--heading-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease-in-out;
}

[data-theme="dark"] .project-links a {
  color: var(--text-light);
}

.project-links a:hover {
  color: var(--heading-color);
}

.project-links a:hover::after {
  transform: scaleX(1);
}

/* Blog */
.blog {
  padding: 0 0 6rem 0; /*removed rss ticker*/
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

.blog .bg-pop-art {
  position: absolute;
  top: 5%;
  left: 50%;
  width: clamp(420px, 70vw, 900px);
  height: clamp(420px, 70vw, 900px);
  /* opacity: 0.09; */
  opacity: .1;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  transform: translateX(-50%) rotate(-8deg);
}

:root:not([data-theme="dark"]) .blog .bg-pop-art {
  opacity: 0.18;
}

@media (max-width: 768px) {
  .blog .bg-pop-art {
    top: 20%;
  }
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 3rem auto 0;
  max-width: 1600px;
  position: relative;
}

.blog-grid::before {
  content: "";
  position: absolute;
  top: 30%;
  right: 5%;
  width: 200px;
  height: 200px;
  background: #ef4444;
  opacity: 0.06;
  animation: floatAlt 16s ease-in-out infinite 0.8s;
  --rotation: 22deg;
  --float-x: -60px;
  z-index: -1;
  pointer-events: none;
}

.blog-grid::after {
  content: "";
  position: absolute;
  bottom: 20%;
  left: 10%;
  width: 230px;
  height: 230px;
  background: #ec4899;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: -1;
  pointer-events: none;
}

.blog-card {
  display: block;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.blog-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-read-more {
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  border: none;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.blog-read-more i {
  transition: transform 0.2s ease;
}

.blog-read-more:hover {
  color: var(--heading-color);
  border: none;
}

.blog-read-more:hover i {
  transform: translateX(4px);
}

[data-theme="dark"] .blog-read-more {
  color: var(--text-light);
}

[data-theme="dark"] .blog-read-more:hover {
  color: var(--heading-color);
}

.blog-image {
  display: none;
}

.blog-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.blog-meta i {
  display: none;
}

.blog-content h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.2s ease;
  font-family: "Fraunces", "Georgia", serif;
  max-width: 50ch;
}

.blog-excerpt {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 90ch;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  max-width: 500px;
}

.blog-tag {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.blog-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Contact */
.contact {
  /* padding: 6rem 0; */
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

.contact .bg-pop-art {
  position: absolute;
  bottom: 0;
  left: 60%;
  width: clamp(650px, 85vw, 1500px);
  height: clamp(560px, 60vw, 1122px);
  max-height: 90%;
  opacity: 0.15;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  z-index: 0;
  transform: translateX(-50%);
}

:root:not([data-theme="dark"]) .contact .bg-pop-art {
  opacity: 0.25;
}

.typewriter-container {
  display: flex;
  justify-content: center;
  max-width: 1600px;
  margin: 0 auto 1rem;
  text-align: center;
}

.typewriter-container typewriter-effect {
  width: 100%;
  text-align: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 5rem;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.contact-layout::before {
  content: "";
  position: absolute;
  top: 20%;
  left: -5%;
  width: 190px;
  height: 190px;
  background: #10b981;
  opacity: 0.06;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: floatAlt 15s ease-in-out infinite 0.5s;
  --float-x: 40px;
}

.contact-layout::after {
  content: "";
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 210px;
  height: 210px;
  background: #f59e0b;
  opacity: 0.06;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: -1;
  pointer-events: none;
  animation: float 16s ease-in-out infinite 1s;
  --float-x: -50px;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.contact-left .typewriter-container {
  margin-bottom: 0;
}

.contact-left .contact-intro p {
  margin-bottom: 0;
}

.contact-right {
  min-width: 0;
}

.retro-tv-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: block;
}

.retro-tv-container retro-tv-mockup {
  display: block;
  width: 100%;
}

@media (max-width: 968px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .contact-left {
    gap: 1rem;
  }

  .contact .bg-pop-art {
    bottom: 0;
    left: 50%;
  }
}

.contact-form-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.form-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  justify-content: center;
}

.toggle-btn {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: "Fraunces", serif;
}

.toggle-btn:hover {
  color: var(--text-color);
}

.toggle-btn.active {
  color: var(--text-color);
  border-bottom-color: var(--text-color);
}

[data-theme="dark"] .toggle-btn.active {
  color: var(--heading-color);
  border-bottom-color: var(--heading-color);
}

.contact-form-container {
  width: 100%;
}

#form-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#form-container > * {
  width: 100%;
  max-width: 600px;
}

/* Form submit buttons dark mode */
contact-form,
web-inquiry-form {
  --submit-button-bg: var(--text-color);
  --submit-button-color: var(--bg-color);
  --submit-button-border: var(--text-color);
}

[data-theme="dark"] contact-form,
[data-theme="dark"] web-inquiry-form {
  --submit-button-bg: var(--heading-color);
  --submit-button-color: var(--bg-color);
  --submit-button-border: var(--heading-color);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  /* margin-top: 4rem; */
}

.footer .container {
  padding: 0 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.footer p {
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--typewriter-color);
  font-size: 1.25rem;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  opacity: 0.8;
}

.social-links a:hover {
  transform: translateY(-4px);
  color: var(--typewriter-color);
  border: none;
  transition:
    color 0.3s ease-in-out,
    transform 0.3s ease;
  opacity: 1;
}

[data-theme="dark"] .social-links a:hover {
  color: var(--heading-color);
}

/* Responsive */
@media (max-width: 1400px) {
  .device-wrapper device-mockup {
    transform: scale(0.9);
    transform-origin: center;
  }
}

@media (max-width: 1200px) {
  .device-wrapper device-mockup {
    transform: scale(0.8);
    transform-origin: center;
  }

  .footer .container {
    padding: 0 4rem 0 5rem;
  }
}

@media (max-width: 1024px) {
  .project-card {
    gap: 2rem;
  }

  .project-content::before {
    font-size: 5rem;
  }

  .device-wrapper device-mockup {
    transform: scale(0.7);
    transform-origin: center;
  }
}

@media (max-width: 900px) {
  .device-wrapper device-mockup {
    transform: scale(0.65);
    transform-origin: center;
    position: relative;
    right: 15%;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  h3 {
    font-size: 2rem;
  }

  /* .blog .section-title h2 {
    font-size: 2.25rem;
  } */

  .blog-content h3 {
    font-size: 1.25rem;
  }

  .blog-excerpt {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .blog-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  .container {
    padding: 0 2rem;
  }

  .nav {
    padding: 1rem 2rem;
  }

  .hero-decoration {
    /* width: 450px;
    height: 450px; */
    width: 100vw;
    /* height: 80vh; */
    right: 0;
  }

  /* Resize geometric shapes for mobile - varied sizes for artistic effect */
  .skills::after,
  .project-card:nth-child(2)::before,
  .contact-layout::before {
    width: 80px;
    height: 80px;
  }

  .about::before,
  .blog::after,
  .project-card:nth-child(4)::before {
    width: 120px;
    height: 120px;
  }

  .about::after,
  .skills .container::after,
  .project-card:nth-child(1)::after,
  .blog-grid::after,
  .contact::after {
    width: 180px;
    height: 180px;
  }

  .about .container::before,
  .project-card:nth-child(3)::before,
  .blog::before,
  .contact::before {
    width: 200px;
    height: 200px;
  }

  .about .container::after,
  .skills::before,
  .projects::after,
  .project-card:nth-child(2)::after {
    width: 150px;
    height: 150px;
  }

  .skills .container::before,
  .projects::before,
  .project-card:nth-child(1)::before,
  .project-card:nth-child(3)::after,
  .project-card:nth-child(4)::after,
  .blog-grid::before,
  .contact-layout::after {
    width: 110px;
    height: 110px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    gap: 0;
  }

  .mobile-menu-close {
    display: block;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--heading-color);
    cursor: pointer;
    padding: 1rem;
    align-self: flex-end;
    margin-right: 0.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
  }

  .mobile-menu-close:hover {
    color: var(--text-color);
  }

  .nav-links.mobile-open {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
  }

  /* Reveal the consultation CTA in the hamburger menu */
  .nav-links .mobile-only-nav {
    display: flex;
  }

  .nav-links .mobile-only-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-links .desktop-theme-toggle {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .mobile-theme-toggle {
    display: flex;
    /* color: var(--text-color); */
    color: var(--heading-color);
  }

  .mobile-theme-toggle:hover {
    border-color: var(--text-color);
  }

  [data-theme="dark"] .mobile-theme-toggle {
    color: var(--heading-color);
  }

  [data-theme="dark"] .mobile-theme-toggle:hover {
    border-color: var(--heading-color);
  }

  .hero a.btn.btn-primary,
  .hero a.btn.btn-outline {
    font-size: 12px;
    padding: 0.75rem 1rem;
  }

  .hero-content .subtitle {
    font-size: 1.3rem;
  }
  .mobile-menu-btn {
    display: block;
  }

  section {
    padding: 1rem 0;
  }

  section.about,
  section.skills,
  section.projects,
  section.blog,
  section.contact {
    padding: 2.5rem 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    /* text-align: center; */
  }

  .about-image .placeholder {
    width: 70%;
    height: auto;
    margin: 0 auto;
  }

  .about-image img {
    transform: scale(1.5) translateY(-5%);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skill-category {
    margin: 0;
  }

  .skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .skill-list li {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    flex: 0 0 auto;
  }

  .skill-list li:last-child {
    border: 1px solid var(--border);
  }

  .projects {
    padding: 4rem 0;
  }

  .projects-list {
    padding: 0 2rem;
  }

  .projects > .section-title {
    padding: 0 2rem;
  }

  .contact .container {
    padding: 0 2rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 6rem;
  }

  .project-card .device-wrapper {
    grid-column: 1;
    grid-row: 1;
    /* No extra margin: the grid row-gap already separates device and content */
    margin-bottom: 0;
    /* Center the device like the retro TV when stacked vertically */
    display: flex;
    justify-content: center;
  }

  .device-wrapper device-mockup {
    /* Sized to fill the column via JS (initializeResponsiveProjectDevices);
       reset the desktop transform/offset hacks so it sits centered. */
    transform: none;
    position: static;
    left: auto;
    top: auto;
    margin: 0 auto;
  }

  .project-card .project-content {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    /* Device height is reserved in JS now, so only a small gap is needed */
    margin-top: 1rem;
    padding-right: 0;
  }

  .project-tech,
  .project-links {
    justify-content: flex-start;
  }

  .project-content::before {
    font-size: 4rem;
  }

  .blog-grid {
    gap: 2.5rem;
  }

  .blog-card {
    padding-bottom: 2.5rem;
  }

  /* .hero-decoration {
    width: 500px;
    height: 500px;
    right: 10px;
    top: 70%;
  } */

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }

  .btn {
    width: auto;
    flex: 0 1 auto;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  h3,
  .project-content h3 {
    font-size: 1.75rem;
  }

  .hero-content .subtitle {
    font-size: 1rem;
  }

  .blog-grid {
    gap: 2.5rem;
  }

  .about-image .placeholder {
    width: 80%;
    height: auto;
    margin: 0 auto;
  }

  .about-image img {
    transform: scale(1.5) translateY(-5%);
  }

  .projects {
    padding: 4rem 0;
  }

  .project-content::before {
    font-size: 3rem;
  }

  .project-card .project-content {
    margin-top: 1rem;
  }

  .typewriter-container {
    padding: 0 1rem;
  }

  .typewriter-container typewriter-effect {
    font-size: 1.6rem;
  }

  .hero-decoration {
    /* width: 450px;
    height: 450px;  */
    width: 100vw;

    /* height: 100vw; */
    /* right: 5px; */
    top: 23%;
  }

  .logo-link img {
    width: 45px;
    height: 45px;
  }

  .all-rights {
    display: block;
  }
}

@media (max-width: 400px) {
  .hero-content .subtitle {
    font-size: 0.95rem;
  }
}

@media (max-width: 376px) {
  .cta-buttons {
    gap: 1rem;
  }

  .hero a.btn.btn-primary,
  .hero a.btn.btn-outline {
    padding-inline: 0.75rem;
  }

  .hero-content .subtitle {
    font-size: 0.85rem;
  }
}

@media (max-width: 350px) {
  h1 {
    font-size: 36px;
  }
  /* .blog .section-title h2 {
    font-size: 1.75rem;
  } */

  .hero-content .subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 340px) {
  .cta-buttons {
    gap: 0.5rem;
  }
}

/* Remove custom cursor on mobile */
/* @media (max-width: 768px) {
  body {
    cursor: auto !important;
  }

  custom-cursor {
    display: none;
  }
} */

/* Section titles */
.section-title {
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 100%;
}

h3.skill-heading {
  color: var(--text-light);
}

h3.skill-heading i {
  color: var(--heading-color);
  margin-right: 0.5rem;
}

/* RSS ticker styling */
.blog-ticker {
  display: block;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-bottom: 3rem;
  margin-top: -3rem;
}

rss-ticker {
  --title-color: var(--accent);
  --domain-color: var(--text-color);
}

.blog-header {
  margin-top: 0;
}

/* Ensure images don't have gradients */
/* .blog-image {
  background: var(--border);
} */

@media (max-height: 600px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .hero {
    padding-top: 25%;
    overflow: visible;
  }
}

/* =================================
   Blog Post Page Styles
   ================================= */

.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.blog-post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.back-to-blog,
.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}

.back-to-blog i,
.rss-link i {
  transition: transform 0.2s ease;
}

.back-to-blog:hover,
.rss-link:hover {
  color: var(--heading-color);
  border: none;
}

.back-to-blog:hover i {
  transform: translateX(-4px);
}

.rss-link:hover i {
  transform: translateY(-2px);
}

[data-theme="dark"] .back-to-blog,
[data-theme="dark"] .rss-link {
  color: var(--text-light);
}

[data-theme="dark"] .back-to-blog:hover,
[data-theme="dark"] .rss-link:hover {
  color: var(--heading-color);
}

.blog-post-header {
  margin-bottom: 2rem;
}

.blog-post-header h1 {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  color: var(--heading-color);
  margin: 1rem 0;
  line-height: 1.2;
}

.blog-subtitle {
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 500;
  margin: 0.5rem 0 1rem 0;
  line-height: 1.4;
}

.blog-post-header .blog-meta {
  margin-bottom: 1rem;
}

.blog-post-header .blog-tags {
  margin-top: 1rem;
}

.blog-post-cover {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2.5rem;
}

.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.blog-post-content h2 {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  color: var(--heading-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  color: var(--heading-color);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
  max-width: none;
}

.blog-post-content a {
  color: var(--heading-color);
  text-decoration: underline;
  border: none;
}

.blog-post-content a:hover {
  opacity: 0.8;
}

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

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

.blog-post-content pre {
  background: var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.blog-post-content code {
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9em;
}

.blog-post-content p code,
.blog-post-content li code {
  background: var(--border);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
}

.blog-post-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 0;
  font-size: 1.3rem;
  font-style: oblique;
  color: var(--heading-color);
  position: relative;
  padding-left: 3rem;
}

.blog-post-content blockquote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--heading-color);
  opacity: 0.3;
}

.blog-post-content blockquote::after {
  content: '"';
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--heading-color);
  opacity: 0.3;
}

.blog-post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Blog listing page */
.blog.blog-listing {
  padding-top: 8rem;
}

.blog-listing .section-title h1 {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  color: var(--heading-color);
}

/* Responsive blog post */
@media (max-width: 768px) {
  .blog-ticker {
    margin-bottom: 0;
  }

  .blog.blog-listing {
    padding-top: 6rem;
  }

  .blog-post {
    padding: 7rem 1.25rem 3rem;
  }

  .blog-post-header h1 {
    font-size: 1.75rem;
  }

  .blog-post-content {
    font-size: 1rem;
  }

  .blog-post-content h2 {
    font-size: 1.5rem;
  }

  .blog-post-content h3 {
    font-size: 1.25rem;
  }

  .blog-post-cover {
    max-height: 300px;
  }
}
