*,
*::after,
*::before {
  box-sizing: border-box;
}

:root {
  font-size: 12px;
  --color-text: #131313;
  --color-bg: #fff;
  --color-link: rgb(13, 115, 184);
  --color-link-hover: rgb(13, 115, 184);
  --page-padding-y: 2.5rem;
  --page-padding-x: 4rem;
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: "Questrial", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(ellipse at top, #c3e8fa, #77bae6);
  background-size: 100% 100vh;
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: var(--color-link);
  outline: none;
  cursor: pointer;
}

.logo img {
  display: inline;
  max-width: 240px;
}

.small {
  font-size: 0.8em;
}

a:hover {
  text-decoration: underline;
  color: var(--color-link-hover);
  outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
  /* Provide a fallback style for browsers
	 that don't support :focus-visible */
  outline: none;
  background: lightgrey;
}

a:focus:not(:focus-visible) {
  /* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
  background: transparent;
}

a:focus-visible {
  /* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
  outline: 2px solid red;
  background: transparent;
}

.frame {
  position: relative;
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: max-content;
  font-size: 13px;
  text-transform: uppercase;
  width: 100%;
}

.frame #cdawrap,
.frame__inner {
  max-width: none;
  padding: 0.5rem 1rem;
  border: 1px solid;
  border-radius: 2vw;
}

.frame__inner {
  grid-area: frame-inner;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%;
  align-items: center;
}

.frame__title {
  font-size: inherit;
  margin: 0;
}

.frame__tags {
  display: contents;
}

.logo {
  position: fixed;
  top: var(--page-padding-y);
  left: 3.3rem;
  z-index: 999;
}

.logo__pre {
  font-weight: bold;
  font-size: 32px;
  font-family: "ivyora-display", serif;
}

.oh {
  overflow: hidden;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--page-padding-y) var(--page-padding-x) 0;
  font-size: clamp(1.1rem, 4vw, 1.7rem);
  letter-spacing: -0.025em;
  text-wrap: balance;
  padding-left: calc(280px + var(--page-padding-x));
}

.content--img {
  min-height: auto;
  margin: 10vh 0;
  transition: all 0.3s ease;
  justify-content: flex-start;
}

.content--img img {
  max-width: 100%;
  height: auto;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .content--img {
    min-height: 60vh;
    margin: 8vh 0;
  }
}

@media screen and (max-width: 480px) {
  .content--img {
    min-height: 40vh; /* Much shorter on mobile */
    margin: 5vh 0; /* Reduced vertical margins */
  }
}

.content--intro {
  min-height: 70vh;
  margin: 0;
  padding-bottom: 20vh;
}

.content p {
  max-width: 1260px;
  padding: 1rem 0;
  margin: 0;
}

.content h1 {
  font-size: clamp(2rem, 6vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 2rem 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.content h2,
.contact-form h3 {
  font-size: 36px;
  font-weight: 600;
  margin: 0;
  line-height: 0.9;
}

.contact-form h3 {
  margin-bottom: 1.5rem;
}

/* Original space class with responsive adjustments */
.space {
  margin-bottom: 50px;
  transition: margin 0.3s ease;
}

.content a {
  text-decoration: underline;
}

.content a:hover,
.content a:focus {
  text-decoration: none;
}

.content--outro {
  padding-bottom: var(--page-padding-y);
}

.contact-form {
  width: 100%;
  max-width: 600px;
  padding-top: 20vh;
}

.form-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.2rem;
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
}

.form-group textarea {
  height: 160px;
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  line-height: 1.6;
}

.contact-form button {
  color: var(--color-text);
  border: none;
  padding: 1.2rem 2.8rem;
  font-size: 1rem;
  border-radius: 30px;
  border: 1px solid var(--color-text);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.contact-form button:active {
  transform: translateY(0);
}

/* Optional: Add focus styles for accessibility */
.contact-form button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Optional: Add loading state styles */
.contact-form button.loading {
  opacity: 0.8;
  cursor: wait;
}

@media screen and (min-width: 53em) {
  :root {
    font-size: 16px;
  }
}

.bluesky p {
  margin-bottom: 2em;
}

/* Existing logo styles modified */
.logo {
  position: fixed;
  top: var(--page-padding-y);
  left: 3.3rem;
}

/* Modified content spacing */
.content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--page-padding-y) var(--page-padding-x) 0;
  font-size: clamp(1.1rem, 4vw, 1.7rem);
  letter-spacing: -0.025em;
  text-wrap: balance;
  /* Remove fixed padding and make it responsive */
  padding-left: var(--page-padding-x);
  margin-left: 0;
  transition: all 0.3s ease;
  align-items: flex-start;
}

/* Responsive breakpoints */
@media screen and (min-width: 1024px) {
  .content {
    padding-left: calc(280px + var(--page-padding-x));
  }
}

@media screen and (max-width: 1023px) {
  .logo {
    position: relative;
    top: 2rem;
    left: var(--page-padding-x);
    margin-bottom: 2rem;
  }

  .content {
    padding-left: var(--page-padding-x);
  }
}

@media screen and (max-width: 768px) {
  :root {
    --page-padding-x: 2rem;
    --page-padding-y: 1.5rem;
  }

  .logo img {
    max-width: 180px;
  }

  .content {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .content h2 {
    font-size: clamp(2rem, 6vw, 8rem);
  }
}

@media screen and (max-width: 480px) {
  :root {
    --page-padding-x: 1.5rem;
    --page-padding-y: 1rem;
  }

  .logo {
    left: var(--page-padding-x);
  }

  .logo img {
    max-width: 140px;
  }

  .content--intro {
    min-height: auto;
    padding-top: 2rem;
  }
}

/* Navigation styles */
.nav {
  position: absolute !important;
  top: 3rem;
  right: 3rem;
  display: flex;
  gap: 1.5rem;
  z-index: 1000;
  font-size: 1.25rem !important; /* Larger font size */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 2rem;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1.1rem; /* Ensure link font size */
  white-space: nowrap;
}

.nav a:hover {
  /* background: rgba(255, 255, 255, 0.5); */
  text-decoration: none;
  transform: translateY(-1px);
}

.nav a.active {
  /* background: rgba(255, 255, 255, 0.6); */
  font-weight: 600;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

/* Responsive navigation */
@media screen and (max-width: 1023px) {
  .nav {
    position: static;
    margin: 1rem var(--page-padding-x);
    margin-top: -1rem;
    gap: 1rem;
    font-size: 1rem;
    width: fit-content;
  }
  
  .nav a {
    padding: 0.5rem 1rem;
  }
}

@media screen and (max-width: 768px) {
  .nav {
    position: static !important;
    margin: 0 0 0.5rem 0;
    width: 100%;
    justify-content: flex-start;
    border-radius: 30px;
    box-shadow: none;
    background: rgba(255,255,255,0.18);
    padding: 0.4rem 0.5rem;
  }
  
  .nav a {
    padding: 0.4rem 0.8rem;
  }
}

/* Endorsement card styles */
.endorsement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.endorsement-card {
  background: white;
  border: 1px solid rgba(119, 186, 230, 0.3);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.endorsement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.endorsement-card blockquote {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text);
  font-style: italic;
}

.endorsement-author {
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--color-text);
  opacity: 0.8;
}

.endorsement-author a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 900;
}

.endorsement-author a:hover {
  text-decoration: underline;
}

/* Responsive endorsement cards */
@media screen and (max-width: 768px) {
  .endorsement-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .endorsement-card {
    padding: 1.5rem;
  }
  
  .endorsement-card blockquote {
    font-size: 1rem;
  }
}

/* Heading styles for scrubber page */
.content h1 {
  font-size: clamp(2rem, 6vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 2rem 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.content h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  line-height: 1.2;
}

/* Content with image section */
.content--with-image .content__inner {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: flex-start;
  padding-top: 10vh;
  max-width: 100%;
}

.content--with-image .content__text {
  flex: 1;
  min-width: 0;
}

.content--with-image .content__image {
  flex: 0 0 auto;
  max-width: 350px;
  width: 100%;
}

.content--with-image .content__image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Responsive content with image */
@media screen and (max-width: 1200px) {
  .content--with-image .content__inner {
    flex-direction: column;
  }
  
  .content--with-image .content__image {
    max-width: 600px;
    margin: 2rem 0 0;
  }
}

@media screen and (max-width: 768px) {
  .content--with-image .content__image {
    max-width: 100%;
  }
}

/* --- Add styles for header container to stack logo and nav on mobile --- */
.header-container {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media screen and (min-width: 769px) {
  .header-container {
    display: block;
    padding: 0;
  }
}

/* --- Adjust nav for mobile to appear under logo --- */
@media screen and (max-width: 768px) {
  .nav {
    position: static !important;
    margin: 0 0 0.5rem 0;
    width: 100%;
    justify-content: flex-start;
    border-radius: 30px;
    box-shadow: none;
    background: rgba(255,255,255,0.18);
    padding: 0.4rem 0.5rem;
  }
}
