/* Folio-inspired calm paper theme */

:root {
  --bg: #f4f1ea;
  --bg-2: #ece7dc;
  --surface: #fffdf8;
  --surface-2: #f7f3eb;
  --surface-3: #ece7dc;
  --paper: #fffdf8;
  --text: #16140f;
  --muted: #6b6558;
  --muted-2: #8a8478;
  --border: rgba(22, 20, 15, 0.1);
  --accent-2: #0d9488;
  --display: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "Outfit", "Segoe UI", sans-serif;
  --shadow: 0 20px 50px rgba(48, 40, 24, 0.08);
  --radius: 24px;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 92% -8%, rgba(199, 210, 254, 0.55), transparent 34%),
    radial-gradient(circle at 0% 18%, rgba(153, 246, 228, 0.38), transparent 30%),
    linear-gradient(rgba(22, 20, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 20, 15, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--display);
}

#progress {
  background: var(--accent, #4f46e5);
}

.header {
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__cta {
  border-radius: 999px;
  font-weight: 500;
}

.header__cta:hover {
  background: var(--text);
  color: #fff;
}

.btn {
  border-radius: 999px;
  font-weight: 500;
}

.btn:hover {
  background: var(--text);
  color: #fff;
}

.footer {
  border-top-color: var(--border);
}

.footer__brand,
.footer__nav a,
.footer__social a {
  color: var(--muted);
}

.footer__copy {
  color: var(--muted-2);
}

.footer__nav a:hover,
.footer__social a:hover {
  color: var(--text);
}

.more-work__grid {
  background: transparent;
  gap: 1rem;
}

.more-work__card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.more-work__card:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.copy-email-btn.is-copied {
  background: var(--text) !important;
  color: #fff !important;
  border-color: var(--text) !important;
  box-shadow: var(--shadow);
}

.contact-link.copy-email-btn.is-copied {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

.contact-link.copy-email-btn.is-copied .contact-link__value {
  color: var(--muted);
}

.resume-modal__panel {
  background: var(--surface);
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.resume-modal__header,
.resume-modal__actions {
  border-bottom-color: var(--border);
}

.resume-modal__eyebrow {
  color: var(--muted);
}

.resume-modal__title {
  font-family: var(--serif);
  color: var(--text);
}

.resume-modal__close {
  border-color: var(--border);
}

.resume-modal__close:hover {
  background: var(--surface-2);
  border-color: rgba(22, 20, 15, 0.2);
}

.resume-modal__close span {
  background: var(--text);
}

.resume-modal__btn {
  color: var(--muted);
  border-color: var(--border);
  border-radius: 999px;
}

.resume-modal__btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: rgba(22, 20, 15, 0.2);
}

.resume-modal__btn--primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.resume-modal__btn--primary:hover {
  background: #2a261f;
  color: #fff;
}

.resume-modal__viewer,
.resume-modal__iframe {
  background: var(--surface-2);
}

.header__menu-btn span,
.mobile-nav__close span {
  background: var(--text);
}

.mobile-nav {
  background: var(--bg);
}

.mobile-nav a {
  font-family: var(--display);
  color: var(--muted);
}

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

.mobile-nav .nav__resume {
  color: var(--text);
  border-color: var(--border);
}

.mobile-nav .nav__resume:hover {
  color: var(--text);
  border-color: rgba(22, 20, 15, 0.28);
}

.mobile-nav__close:hover span {
  background: var(--text);
}

h1, h2, h3,
.cover__title,
.section__title,
.page-hero__title,
.page-hero__headline,
.cta__headline,
.say-hello__headline,
.contact-left__headline,
.brands__headline,
.heading-block__prefix,
.heading-cycler__word,
.about__intro,
.project-card__title,
.p-card__title {
  font-family: var(--serif);
  font-weight: 500;
}

.header__brand,
.header__nav a,
.header__cta,
.btn,
.footer__brand,
.footer__nav a,
.footer__social a,
.footer__copy,
.cards-section__label,
.cards-section__label__link,
.tagline-row__label,
.page-hero__label,
.section__label,
.label,
.pill,
.overview-item dt,
.stat-item__label,
.contact-link__label,
.resume-modal__btn,
.resume-modal__eyebrow {
  font-family: var(--display) !important;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none !important;
}

.btn,
.cta__headline,
.say-hello__headline,
.stat-item__label,
.label,
.prep-card__tag {
  text-transform: none !important;
}

.brand-logo img,
.brand-logo--invert img,
.brand-logo--screen-invert img {
  filter: none !important;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

.brand-cell:hover .brand-logo img {
  opacity: 1;
}

.hero,
.page-hero,
.cover,
.brands,
.cta,
.say-hello,
.contact-body,
.footer {
  background: transparent;
}

.cards-section,
.projects-grid,
.overview-bar,
.stats-bar,
#about,
.cover + .overview-bar {
  background: var(--surface);
}

#projects,
#contact,
#about {
  scroll-margin-top: 80px;
}

.brands {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--border);
}

.brands__header {
  margin-bottom: 3rem;
}

.brands__label {
  font-family: var(--display);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 0.75rem;
  display: block;
}

.brands__headline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.brand-logo--color img {
  mix-blend-mode: normal !important;
  opacity: 1;
}

.brands-glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
}

.brands-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  background: transparent;
}

.brand-cell {
  background: transparent;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.2s;
}

.brand-cell:nth-child(4n) {
  border-right: none;
}

.brand-cell:nth-last-child(-n + 4) {
  border-bottom: none;
}

.brand-cell:hover {
  background: rgba(255, 255, 255, 0.08);
}

.brand-cell > div:not(.brand-logo) {
  min-width: 0;
  flex: 1;
}

.brand-cell__name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.brand-cell__type {
  font-family: var(--display);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.brand-logo {
  flex-shrink: 0;
  width: 48px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.contact-body {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 28rem);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.contact-left {
  display: flex;
  flex-direction: column;
}

.contact-left__status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d9488;
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.45);
  flex-shrink: 0;
}

.status-text {
  font-family: var(--display);
  font-size: 0.875rem;
  color: var(--muted);
}

.contact-left__headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  max-width: 18ch;
}

.contact-left__body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 50ch;
  margin-bottom: 0;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: background 0.2s, border-color 0.2s;
}

.contact-link:hover {
  background: #fff;
  border-color: rgba(22, 20, 15, 0.22);
}

.contact-link__label {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.2rem;
}

.contact-link__value {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.contact-link__arrow {
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.contact-link:hover .contact-link__arrow {
  opacity: 1;
  transform: translate(3px, -3px);
}

@media (max-width: 1024px) {
  .brands-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-cell:nth-child(4n) {
    border-right: 1px solid rgba(22, 20, 15, 0.08);
  }

  .brand-cell:nth-child(2n) {
    border-right: none;
  }

  .brand-cell:nth-last-child(-n + 4) {
    border-bottom: 1px solid rgba(22, 20, 15, 0.08);
  }

  .brand-cell:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .brands-grid {
    grid-template-columns: 1fr;
  }

  .brand-cell,
  .brand-cell:nth-child(2n),
  .brand-cell:nth-child(4n),
  .brand-cell:nth-last-child(-n + 2),
  .brand-cell:nth-last-child(-n + 4) {
    border-right: none;
    border-bottom: 1px solid rgba(22, 20, 15, 0.08);
  }

  .brand-cell:last-child {
    border-bottom: none;
  }

  .brand-cell {
    padding: 1.15rem 1.25rem;
    gap: 0.85rem;
    align-items: flex-start;
  }

  .brand-logo {
    width: 40px;
    height: 28px;
    margin-top: 0.15rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
