/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Reset headings to normal weight (like Tailwind preflight) */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', serif;
  color: #e5e7eb;
  min-height: 100vh;
}

/* Background */
.background-image {
  background-color: #221F18;
  background-position: center var(--bg-offset-y, 0px), center var(--bg-offset-y, 0px);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
}

/* Hide scrollbar */
::-webkit-scrollbar {
  display: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Typography */
.font-crimson {
  font-family: 'Crimson Pro', serif;
}

/* Hero Section */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  width: 100%;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 0;
    margin-left: 10%;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    margin-left: 20%;
  }
}

.hero-title {
  font-family: 'Crimson Pro', serif;
  font-size: 2.25rem;
  line-height: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
    line-height: 1;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.75rem;
    line-height: 1;
  }
}

.hero-description {
  font-family: 'Crimson Pro', serif;
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin-bottom: 2rem;
  color: #d6d3d1;
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
    line-height: 1.75rem;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
}

.recently-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
  margin-bottom: 0.75rem;
  color: #e7e5e4;
  text-align: center;
}

@media (min-width: 768px) {
  .recently-title {
    font-size: 1.5rem;
    line-height: 2rem;
    text-align: left;
  }
}

/* Work Cards */
.work-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  font-family: 'Lora', serif;
}

@media (min-width: 768px) {
  .work-cards {
    max-width: 400px;
    margin: 0;
  }
}

@media (min-width: 1024px) {
  .work-cards {
    max-width: 500px;
  }
}

.work-card {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  backdrop-filter: blur(1px);
  transition: border-color 0.2s, transform 0.2s;
}

@media (min-width: 768px) {
  .work-card {
    padding: 0.75rem;
  }
}

.work-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

.work-card-left {
  display: flex;
  align-items: center;
}

.work-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .work-logo {
    width: 3rem;
    height: 3rem;
    margin-right: 0.75rem;
  }
}

.work-logo.white-bg {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

@media (min-width: 768px) {
  .work-logo.white-bg {
    padding: 0.625rem;
  }
}

.work-logo img {
  width: 100%;
  height: 100%;
}

.logo-cover {
  object-fit: cover;
}

.logo-contain {
  object-fit: contain;
}

.work-info h3 {
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #e7e5e4;
}

@media (min-width: 768px) {
  .work-info h3 {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

.work-role {
  color: #a8a29e;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

@media (min-width: 768px) {
  .work-role {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

.work-dates {
  display: none;
  color: #a8a29e;
  font-size: 0.875rem;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .work-dates {
    display: block;
    font-size: 1rem;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  text-decoration: none;
  display: block;
}

.scroll-indicator:hover .scroll-text,
.scroll-indicator:hover .scroll-arrow {
  color: #e7e5e4;
}

.scroll-text {
  color: #a8a29e;
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
  display: block;
  text-align: center;
}

.mobile-only {
  display: inline;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  .desktop-only {
    display: inline;
  }
}

.scroll-arrow {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto;
  color: #a8a29e;
  transition: color 0.2s;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Social Section */
.social-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.social-content {
  text-align: center;
}

.social-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.875rem;
  line-height: 2.25rem;
  color: #e7e5e4;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .social-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: 'Lora', serif;
}

.social-link {
  display: block;
  color: #a8a29e;
  font-size: 1.125rem;
  line-height: 1.75rem;
  text-decoration: none;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .social-link {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

.social-link:hover {
  color: #e7e5e4;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 32rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(28, 25, 23, 0.8);
  backdrop-filter: blur(24px);
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: #e7e5e4;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s, opacity 0.2s;
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  border-radius: 0.375rem;
  padding: 0.375rem;
  color: #a8a29e;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.modal-close:hover {
  color: #e7e5e4;
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modal-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.modal-logo.white-bg {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.modal-logo img {
  width: 100%;
  height: 100%;
}

.modal-info h3 {
  font-size: 1.125rem;
  font-weight: 500;
}

.modal-info p {
  font-size: 0.875rem;
  color: #a8a29e;
}

#modal-description {
  color: #d6d3d1;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  #modal-description {
    font-size: 1rem;
  }
}

.webring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.webring a {
  color: #a8a29e;
  text-decoration: none;
  transition: color 0.2s;
}

.webring a:hover {
  color: #e7e5e4;
}

.webring img {
  opacity: 0.8;
}

/* Animations */
.animate-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll indicator needs combined transforms to stay centered */
.scroll-indicator.animate-item {
  transform: translateX(-50%) translateY(16px);
}

.scroll-indicator.animate-item.visible {
  transform: translateX(-50%) translateY(0);
}

/* Staggered animation delays */
.hero-section .animate-item:nth-child(1) { transition-delay: 0.12s; }
.hero-section .animate-item:nth-child(2) { transition-delay: 0.24s; }
.hero-section .animate-item:nth-child(3) { transition-delay: 0.36s; }
.work-cards .animate-item:nth-child(1) { transition-delay: 0.56s; }
.work-cards .animate-item:nth-child(2) { transition-delay: 0.64s; }
.work-cards .animate-item:nth-child(3) { transition-delay: 0.72s; }
.scroll-indicator.animate-item { transition-delay: 0.84s; }

.social-section .animate-item:nth-child(1) { transition-delay: 0.12s; }
.social-links .animate-item:nth-child(1) { transition-delay: 0.20s; }
.social-links .animate-item:nth-child(2) { transition-delay: 0.28s; }
.social-links .animate-item:nth-child(3) { transition-delay: 0.36s; }
.social-links .animate-item:nth-child(4) { transition-delay: 0.44s; }
.social-links .animate-item:nth-child(5) { transition-delay: 0.52s; }
.social-links .animate-item:nth-child(6) { transition-delay: 0.60s; }

