/* Import Satoshi Font from Fontshare */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap");

:root {
  --font-primary:
    "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-dark: #121212;
  --color-light-bg: #faf9f6;
  --color-border: #e2e2e2;
  --color-accent: #ff6b00;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-light-bg);
  color: var(--color-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  content: "";
  opacity: 0.055;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.work-showcase {
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 4% 74%,
      rgba(255, 174, 224, 0.72) 0,
      transparent 25%
    ),
    radial-gradient(
      circle at 22% 88%,
      rgba(255, 244, 154, 0.58) 0,
      transparent 25%
    ),
    radial-gradient(
      circle at 52% 31%,
      rgba(194, 252, 255, 0.62) 0,
      transparent 31%
    ),
    linear-gradient(90deg, #fff1fb 0%, #fffdf2 33%, #efffff 64%, #fff 100%);
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 460px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 88px 100px 64px 100px;
}

.hero-content {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Star Sparkle Icon */
.sparkle-icon-wrapper {
  position: absolute;
  top: 45px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: starSpin 8s linear infinite;
  transform-origin: center;
}

.sparkle-icon {
  width: 68px;
  height: 68px;
  color: var(--color-dark);
}

@keyframes starSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-title {
  font-size: 106px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--color-dark);
  text-align: center;
}

@media (max-width: 1200px) {
  .hero-section {
    min-height: 360px;
    padding: 72px 72px 56px 72px;
  }
  .sparkle-icon-wrapper {
    top: 28px;
  }
  .sparkle-icon {
    width: 56px;
    height: 56px;
  }
  .hero-title {
    font-size: 82px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 280px;
    padding: 52px 24px 44px 24px;
  }
  .sparkle-icon-wrapper {
    top: 14px;
    left: 0;
  }
  .sparkle-icon {
    width: 38px;
    height: 38px;
  }
  .hero-title {
    margin-top:30px;
    font-size: 46px;
  }
}

/* Portfolio Section */
.portfolio-section {
  width: 100%;
  padding: 0 100px 120px 100px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px 100px;
}

@media (max-width: 991px) {
  .portfolio-section {
    padding: 0 24px 80px 24px;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 60px 24px;
  }
}

/* Project Card */
.project-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  group: hover;
}

/* Image Container */
.project-image-link {
  display: block;
  width: 100%;
  padding-bottom: 66.67%; /* 1/1.5 ratio for square-ish cards */
  height: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background-color: #f0f0f0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

/* Taller cards: col2-row1 (2nd), col1-row2 (3rd), col2-row3 (6th) */
.project-card:nth-child(2) .project-image-link,
.project-card:nth-child(3) .project-image-link,
.project-card:nth-child(6) .project-image-link {
  padding-bottom: calc(66.67% + 100px);
}

.project-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-preview {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform-origin: center;
  transition:
    opacity 0.25s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-preview-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 107, 0, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(194, 252, 255, 0.22), transparent 45%),
    #f8f3ee;
}

.preview-loaded .pdf-preview {
  opacity: 1;
}

.preview-loaded .project-preview-fallback {
  opacity: 0;
}

.project-preview-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

.project-preview-link:focus-visible {
  outline: 3px solid var(--color-dark);
  outline-offset: -3px;
}

/* Hover effects for Image */
.project-image-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.project-image-link:hover .project-image {
  transform: scale(1.08) rotate(2.5deg);
}

/* Project Info Below Image */
.project-info {
  margin-top: 24px;
  width: 100%;
}

/* Tags Pills */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag-pill {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 18px;
  border: 1px solid var(--color-dark);
  border-radius: 100px;
  background: transparent;
  color: var(--color-dark);
  transition: var(--transition-fast);
  cursor: pointer;
}

.tag-pill:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  color: #fff;
}

/* Footer layout (Title + Arrow) */
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.project-title {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-dark);
  letter-spacing: -0.01em;
  margin: 0;
  transition:
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-title:hover {
  color: var(--color-accent);
}

.arrow-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.arrow-icon {
  width: 58px;
  height: 58px;
  color: var(--color-dark);
  transform: rotate(-45deg);
  transform-origin: center;
  transition:
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.arrow-icon-wrapper:hover .arrow-icon {
  color: var(--color-accent);
  transform: rotate(0deg);
}

@media (max-width: 768px) {
  .project-title {
    font-size: 26px;
  }
  .arrow-icon {
    width: 26px;
    height: 26px;
  }
}
