:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --line-color: #000000;
  --header-bg: rgba(255, 255, 255, 0.9);
  --hero-voffset: -10vh;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --line-color: #ffffff;
    --header-bg: rgba(0, 0, 0, 0.9);
  }
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #000000;
  --line-color: #000000;
  --header-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #ffffff;
  --line-color: #ffffff;
  --header-bg: rgba(0, 0, 0, 0.9);
}

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

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dm-serif-display-regular {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-style: normal;
}

.dm-serif-display-regular-italic {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-style: italic;
}

.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 20px;
  z-index: 1000;
}

.header-cloud-left, .header-cloud-right {
  position: absolute;
  top: 0;
  width: 250px;
  height: 120px;
  background-color: var(--bg-color);
  z-index: -1;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

.header-cloud-left {
  left: 0;
  -webkit-mask-image: radial-gradient(ellipse at top left, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at top left, black 0%, transparent 70%);
}

.header-cloud-right {
  right: 0;
  -webkit-mask-image: radial-gradient(ellipse at top right, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at top right, black 0%, transparent 70%);
}

.theme-toggle {
  background: none;
  border: none;
  font-family: inherit;
  color: var(--text-color);
  cursor: pointer;
  font-size: 16px;
}

.info-link {
  color: var(--text-color);
  text-decoration: none;
  font-family: inherit;
  font-size: 16px;
}

.hero-section {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#widget-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.bottom-cloud {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 200px;
  background-color: var(--bg-color);
  -webkit-mask-image: linear-gradient(to top, black 5px, transparent 100%);
  mask-image: linear-gradient(to top, black 5px, transparent 100%);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, background-color 0.3s ease;
}

.bottom-cloud.visible {
  opacity: 1;
}

.scroll-prompt-cloud {
  position: absolute;
  bottom: 25vh;
  left: 50%;
  transform: translate(-50%, 30%);
  width: 350px;
  height: 100px;
  background-color: var(--bg-color);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  z-index: 5;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

.scroll-prompt {
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  opacity: 0;
  /* WHAT IS POSITION */
  position: absolute;
  /* WHAT IS BOTTOM */
  bottom: 25vh; /* Halfway between center and bottom */
  /* WHAT IS LEFT */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  margin: 0;
}

.text-overlay {
  position: relative;
  z-index: 10;
  text-align: center;
  transform: translateY(-45%);
}

.text-cloud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 1400px;
  height: 600px;
  background-color: var(--bg-color);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  z-index: 5;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

.blake-north-title {
  font-size: 8rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0;
}

.software-engineer-subtitle {
  font-size: 2.5rem;
  line-height: 1;
  opacity: 0;
}

.projects-section {
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.project-title {
  display: block;
  font-family: "DM Serif Display", serif;
  font-size: 5rem;
  color: var(--text-color);
  text-decoration: none;
  margin-bottom: 6rem;
  line-height: 1.1;
  text-align: left;
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.affiliate {
  display: block;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.title-mask {
  overflow: hidden;
  padding-bottom: 10px; /* Add padding to prevent descender cutoff */
}

.project-title::after {
  content: '';
  position: absolute;
  bottom: -3rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  opacity: 0.3;
}

.projects-section .project-title:last-child::after {
  display: none;
}

.title-text {
  display: block;
  transform: translateY(100%);
  transition: opacity 0.3s ease;
}

.project-title:hover .title-text {
  opacity: 0.7;
}

.project-title:hover {
  opacity: 1; /* Reset main opacity so it doesn't affect divider/affiliate */
}

@media (max-width: 768px) {
  .blake-north-title {
    font-size: 4rem;
  }

  .software-engineer-subtitle {
    font-size: 1.5rem;
  }

  .project-title {
    font-size: 3rem;
    margin-bottom: 4rem;
  }

  .project-title::after {
    bottom: -2rem;
    width: 60px;
  }

  .text-cloud {
    width: 100%;
    height: 400px;
  }
}

.project-page {
  padding: 120px 20px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.project-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 2rem;
  display: block;
}

.project-description {
  margin-bottom: 3rem;
  line-height: 1.8;
  font-size: 1.2rem;
}

.project-description p {
  margin-bottom: 1.5rem;
}

.project-description p:last-child {
  margin-bottom: 0;
}

.next-project {
  display: block;
  font-family: "DM Serif Display", serif;
  font-size: 3rem;
  text-align: center;
  color: var(--text-color);
  text-decoration: none;
  margin-top: 4rem;
}

.next-project:hover {
  opacity: 0.7;
}
