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

:root {
  --bg: #ffffff;
  --text: #111111;
  --text-secondary: #555555;
  --link: #555555;
  --link-hover: #111111;
  --border: #e5e5e5;
  --dot-color: #e5e5e5;
  --active-color: #3b82f6;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(229, 229, 229, 0.3);
}

:root.dark {
  --bg: #111111;
  --text: #dedede;
  --text-secondary: #888888;
  --link: #888888;
  --link-hover: #dedede;
  --border: #333333;
  --dot-color: #222222;
  --glass-bg: rgba(17, 17, 17, 0.7);
  --glass-border: rgba(51, 51, 51, 0.3);
}

body {
  font-family: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23e5e5e5'/%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root.dark body {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23222222'/%3E%3C/svg%3E");
}

.container {
  max-width: 65ch;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

header {
  margin-bottom: 3rem;
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.1s forwards;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

nav a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

nav a:hover {
  color: var(--link-hover);
  transform: translateY(-1px);
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--link-hover);
}

p a:not(.badge) {
  border-bottom: 1px solid var(--active-color);
  color: var(--active-color);
  transition: all 0.3s ease;
}

p a:not(.badge):hover {
  border-bottom-color: var(--active-color);
  color: var(--active-color);
  opacity: 0.8;
  transform: translateY(-1px);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--link);
  transition: color 0.2s, transform 0.2s ease;
}

.theme-toggle:hover {
  color: var(--link-hover);
  transform: scale(1.1) rotate(10deg);
}

.theme-toggle svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

.intro {
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.2s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.see-more-link {
  color: var(--active-color);
  text-decoration: none;
  border-bottom: 1px solid var(--active-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.see-more-link:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  background: var(--border);
  border-radius: 16px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

:root.dark .badge:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge.company-secondary {
  opacity: 0.5;
  color: var(--text-secondary);
}

.section {
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:nth-child(1) {
  animation-delay: 0.1s;
}

.section:nth-child(2) {
  animation-delay: 0.2s;
}

.section:nth-child(3) {
  animation-delay: 0.3s;
}

.section:nth-child(4) {
  animation-delay: 0.4s;
}

.section:nth-child(5) {
  animation-delay: 0.5s;
}

.section:nth-child(6) {
  animation-delay: 0.6s;
}

.links {
  margin-top: 2rem;
}

.links a {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.links a:hover {
  transform: translateY(-2px);
}

.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
}

ul li::before {
  content: "·";
  margin-right: 0.5rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  line-height: inherit;
}

/* Pricing Styles */
.pricing-plan {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.pricing-plan:hover {
  transform: translateX(4px);
}

.pricing-plan:last-child {
  border-bottom: none;
}

.pricing-plan h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pricing-plan .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.popular-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--active-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
}

.plan-description {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pricing-plan ul {
  margin-bottom: 1rem;
}

.pricing-plan ul li {
  font-size: 0.9rem;
}

.pricing-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--link);
}

.pricing-link:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
  transform: translateX(4px);
}

.whatsapp-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

/* Reviews Gallery - Masonry Layout */
.reviews-gallery {
  column-count: 3;
  column-gap: 1rem;
  margin-top: 1rem;
}

.reviews-gallery img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  break-inside: avoid;
}

.reviews-gallery img:hover {
  transform: translateY(-4px) scale(1.02);
}

.reviews-gallery img.review-hidden {
  display: none;
}

/* Review Modal */
.review-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.review-modal.active {
  display: flex;
}

.review-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  pointer-events: none;
}

.review-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.review-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.review-toast {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

.review-toast.visible {
  opacity: 1;
}

/* Project UI Grid */
.projects-ui-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.projects-ui-grid img {
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.projects-ui-grid img:hover {
  transform: translateY(-4px);
}

/* Buy Me a Coffee Widget */
.coffee-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.coffee-toggle {
  width: 264px;
  height: 264px;
  border-radius: 50%;
  background: rgba(111, 78, 55, 0.1);
  border: 2px dashed #6F4E37;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.coffee-toggle:hover {
  transform: scale(1.08);
  background: rgba(111, 78, 55, 0.15);
  border-color: #8B4513;
}

.coffee-toggle img {
  width: 144px;
  height: 144px;
  animation: steam 2s ease-in-out infinite;
}

@keyframes steam {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.coffee-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  display: none;
  overflow: hidden;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: none;
}

.coffee-panel-overlay {
  display: none;
}

.coffee-panel-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: -0.5rem auto 1rem auto;
  cursor: grab;
  transition: all 0.3s ease;
}

.coffee-panel-handle:hover {
  width: 50px;
  background: var(--text-secondary);
}

.coffee-panel-handle:active {
  cursor: grabbing;
  background: var(--active-color);
}

/* Coffee Pouring Animation */
.coffee-toggle.pouring img {
  animation: tiltPour 3s ease-in-out infinite;
  transform-origin: 70% 80%;
}

@keyframes tiltPour {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 90% {
    transform: rotate(0deg);
  }
  40%, 60% {
    transform: rotate(-40deg);
  }
}

.coffee-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(111, 78, 55, 0.08) 0%, transparent 70%);
  animation: coffeeSpill 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes coffeeSpill {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10px, 10px) scale(1.1);
  }
}

.coffee-panel.active {
  display: block;
  transform: translateY(0);
}

.coffee-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--border);
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coffee-close:hover {
  color: var(--text);
  transform: rotate(90deg) scale(1.1);
}

.coffee-panel h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.3rem;
  color: var(--text);
  text-align: center;
}

.coffee-panel p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.coffee-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.coffee-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 0.75rem 0;
  min-height: 1.2em;
  transition: color 0.3s ease;
}

.amount-btn {
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  line-height: 1.2;
}

.amount-price {
  font-weight: 700;
  font-size: 1rem;
}

.amount-label {
  font-size: 0.65rem;
  opacity: 0.75;
  white-space: nowrap;
}

.amount-btn:hover {
  border-color: var(--active-color);
  color: var(--active-color);
  transform: translateY(-2px);
}

.amount-btn.selected {
  background: var(--active-color);
  color: white;
  border-color: var(--active-color);
  transform: scale(1.05);
}

#customAmount {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

#customAmount:focus {
  outline: none;
  border-color: var(--active-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.coffee-pay-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--active-color);
  color: white;
  border: none;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.coffee-pay-btn:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.coffee-pay-btn:active:not(.disabled) {
  transform: translateY(0);
}

.coffee-pay-btn.disabled {
  background: var(--border);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

.coffee-pay-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Thank You Toast */
.thank-you-toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6F4E37 0%, #8B4513 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
  animation: slideDown 0.3s ease;
  font-weight: 500;
}

.thank-you-toast svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

.thank-you-toast.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #f44336;
  animation: confetti-fall 3s linear forwards;
  z-index: 1000;
  pointer-events: none;
  will-change: transform, opacity;
}

.confetti:nth-child(2n) {
  background: #2196F3;
}

.confetti:nth-child(3n) {
  background: #FFEB3B;
}

.confetti:nth-child(4n) {
  background: #4CAF50;
}

.confetti:nth-child(5n) {
  background: #FF9800;
}

@keyframes confetti-fall {
  0% {
    top: -10%;
    transform: translateX(0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    top: 110%;
    transform: translateX(var(--x-offset)) rotateZ(360deg);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .reviews-gallery {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .reviews-gallery {
    column-count: 1;
  }

  /* Fullscreen Coffee Widget on Mobile */
  .coffee-toggle {
    width: 264px;
    height: 264px;
  }

  .coffee-toggle img {
    width: 144px;
    height: 144px;
  }

  .coffee-panel {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }

  .coffee-amounts {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .amount-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  #customAmount {
    padding: 1rem;
    font-size: 1rem;
  }

  .coffee-pay-btn {
    padding: 1rem;
    font-size: 1rem;
    margin-top: auto;
  }
}
