@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  a {
    @apply text-blue-500 underline
  }

  a:hover {
    @apply text-blue-700 underline
  }

  a:visited {
    @apply text-purple-500 underline
  }
}

@layer components {
  .custom-button {
    @apply p-4 text-white bg-indigo-500 shadow-lg rounded-full
  }
}


/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* Portfolio page. Layout and typography come from Tailwind and the résumé
   themes; this file only holds what utilities can't: the carousel, lightbox
   and code block. */

.portfolio {
  --pf-accent: #4f46e5;       /* indigo-600 */
  --pf-accent-soft: #a5b4fc;  /* indigo-300, same periwinkle as the rules */
  --pf-mat: #f1f3fa;
  --pf-mat-height: 22rem;
}

/* Mat: neutral cool gray so very different screenshots sit consistently. */
.pf-mat {
  background: var(--pf-mat);
  padding: 0.75rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.12);
}

.pf-track {
  position: relative;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pf-track::-webkit-scrollbar { display: none; }

.pf-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  min-width: 0;
}

.pf-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--pf-mat-height);
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 0.5rem;
}

.pf-zoom img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Opt-in crop: fill the mat height; the lightbox still shows the full image. */
.pf-slide--cover .pf-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Landscape shots: the phone-width mat is nearly square, so cover would crop
   them to a sliver. Show the whole image below the md breakpoint. */
@media (max-width: 767px) {
  .pf-slide--contain-mobile .pf-zoom img {
    object-fit: contain;
  }
}

.pf-caption {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
  color: #475569;
}

.pf-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.pf-controls[hidden] { display: none; }

.pf-arrow {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: var(--pf-accent);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.pf-arrow:disabled { opacity: 0.35; cursor: default; }

.pf-dots { display: flex; gap: 0.25rem; }

/* 24px hit area, 10px visible dot */
.pf-dot {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.pf-dot::before {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border-radius: 9999px;
  border: 2px solid var(--pf-accent);
  background: transparent;
}
.pf-dot[aria-current="true"]::before { background: var(--pf-accent); }

.pf-zoom:focus-visible,
.pf-arrow:focus-visible,
.pf-dot:focus-visible,
.pf-close:focus-visible,
.pf-details summary:focus-visible {
  outline: 3px solid var(--pf-accent);
  outline-offset: 2px;
}

/* Lightbox */
.pf-dialog {
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: var(--pf-mat);
  max-width: 94vw;
  max-height: 94vh;
  overflow: auto;
}
.pf-dialog::backdrop { background: rgba(15, 23, 42, 0.75); }
.pf-dialog img {
  display: block;
  /* Full width; a tall full-page capture scrolls inside the dialog. */
  max-width: min(92vw, 1600px);
  max-height: none;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.pf-dialog .pf-caption { padding: 0.5rem 1rem 0.75rem; }

.pf-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: var(--pf-accent);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* Code excerpt */
.pf-code {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: 0.5rem;
  background: #1e293b;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .pf-track { scroll-behavior: auto; }
}

@media print {
  .pf-controls { display: none; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
