/* ===========================
   PORTFOLIO — style.css
   Prince — Product Designer
   =========================== */

/* --- Font Faces --- */
@font-face {
  font-family: 'Redaction 35';
  src: url('fonts/Redaction_35-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Redaction';
  src: url('fonts/Redaction-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-pixel: 'Redaction 35', 'Redaction', Georgia, serif;

  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-text-muted: #9b9b9b;
  --color-border: #e8e8e8;
  --color-link-underline: #d0d0d0;
  --color-link-underline-hover: #1a1a1a;

  --highlight-blue: #dbeafe;
  --highlight-green: #dcfce7;
  --highlight-purple: #f3e8ff;
  --highlight-orange: #ffedd5;

  --max-width: 680px;
  --font-size: 14px;

}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 120px;
  position: relative;
}

/* --- Avatar --- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  display: block;
}

/* --- Social Icons (header) --- */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.social-icons a {
  color: var(--color-text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.social-icons a:hover {
  color: var(--color-text);
}

/* --- Typography --- */
h1.hero-name {
  font-family: var(--font-pixel);
  font-size: var(--font-size);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 16px;
}

h1.hero-name a {
  color: inherit;
  text-decoration: none;
}

h1.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: char-in 0.8s cubic-bezier(0.2, 0.65, 0.3, 0.9) forwards;
}

@keyframes char-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subtitle {
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

.subtitle p {
  margin-bottom: 12px;
}

.subtitle p:last-child {
  margin-bottom: 0;
}

.section-label {
  display: block;
  font-size: var(--font-size);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

h2.project-name {
  font-size: var(--font-size);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.project-role {
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.project-date {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.project-description {
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* --- Links --- */
a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-link-underline);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  font-size: var(--font-size);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav a.cta {
  color: var(--color-text);
  font-weight: 500;
}

/* --- Mark / Highlights --- */
mark {
  background: var(--highlight-blue);
  color: inherit;
  padding: 1px 5px;
  border-radius: 3px;
}

mark.green { background: var(--highlight-green); }
mark.purple { background: var(--highlight-purple); }
mark.orange { background: var(--highlight-orange); }

/* --- Sections & Dividers --- */
section {
  margin-bottom: 64px;
  position: relative;
  z-index: 1;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 48px 0;
}

/* --- Project Cards --- */
.project {
  padding: 24px 0;
  margin-bottom: 32px;
  position: relative;
}

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

/* --- Project Hover Preview (floats on top) --- */
.project-preview {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 62%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover .project-preview {
  opacity: 1;
}

.project-preview img {
  width: 100%;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* --- Image Gallery --- */
.project-hero img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0s;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.project-gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0s;
}

.project-gallery img:hover,
.project-hero img:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* --- Placeholder Gallery --- */
.placeholder-card {
  aspect-ratio: 16/10;
  background: #f8f8f8;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

/* --- Elsewhere Links --- */
.elsewhere-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.elsewhere-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.elsewhere-links a:hover {
  color: var(--color-text-secondary);
}

.arrow {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.elsewhere-links a:hover .arrow {
  transform: translate(2px, -2px);
}

/* --- Side Projects --- */
.side-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-projects a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
}

.side-projects a:hover {
  color: var(--color-text-secondary);
}

.side-project-desc {
  color: var(--color-text-muted);
  margin-left: 4px;
}

/* --- Topship Link Card --- */
.link-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* --- Instagram Photo Grid (About page) --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0s;
}

.photo-grid img:hover {
  transform: scale(1.02);
}

/* --- Spotify Section --- */
.spotify-now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 24px;
}

.spotify-album-art {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.spotify-info {
  min-width: 0;
}

.spotify-track {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-artist {
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-status {
  color: #1DB954;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Equalizer bars animation */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bar {
  width: 3px;
  background: #1DB954;
  border-radius: 1px;
  animation: eq-bounce 0.8s ease infinite alternate;
}

.eq-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.eq-bar:nth-child(3) { height: 4px; animation-delay: 0.4s; }
.eq-bar:nth-child(4) { height: 8px; animation-delay: 0.1s; }

@keyframes eq-bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.spotify-playlists {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.spotify-playlists iframe {
  border-radius: 12px;
  width: 100%;
}

/* --- Scroll Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
  filter: blur(4px);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger gallery images */
.project-gallery .animate-in:nth-child(1) { transition-delay: 0s; }
.project-gallery .animate-in:nth-child(2) { transition-delay: 0.08s; }
.project-gallery .animate-in:nth-child(3) { transition-delay: 0.14s; }
.project-gallery .animate-in:nth-child(4) { transition-delay: 0.2s; }
.project-gallery .animate-in:nth-child(5) { transition-delay: 0.26s; }
.project-gallery .animate-in:nth-child(6) { transition-delay: 0.32s; }
.project-gallery .animate-in:nth-child(7) { transition-delay: 0.38s; }
.project-gallery .animate-in:nth-child(8) { transition-delay: 0.44s; }
.project-gallery .animate-in:nth-child(9) { transition-delay: 0.5s; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
  line-height: 1;
}

.lightbox-close:hover {
  color: white;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  transition: color 0.2s ease;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: white;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size);
  font-family: var(--font-sans);
}

/* --- Case Study --- */
.case-study-title {
  font-size: var(--font-size);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 16px;
}

.case-study-section {
  margin-bottom: 48px;
}

.case-study-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--font-size);
}

.meta-value {
  color: var(--color-text);
}

.case-study-contributions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contributions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contributions-list span {
  color: var(--color-text-secondary);
  background: #f5f5f5;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--font-size);
}

.case-study-heading {
  font-size: var(--font-size);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.case-study-feature {
  margin-bottom: 48px;
}

.case-study-feature:last-child {
  margin-bottom: 0;
}

.case-study-img {
  width: 100%;
  border-radius: 8px;
  margin-top: 20px;
  display: block;
}

.insights-list {
  list-style: none;
  counter-reset: insight;
  color: var(--color-text-secondary);
}

.insights-list li {
  counter-increment: insight;
  margin-bottom: 20px;
  padding-left: 28px;
  position: relative;
}

.insights-list li::before {
  content: counter(insight) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--color-text);
}

.insights-list li strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 4px;
}

.insights-list li p {
  margin: 0;
}

.results-list {
  list-style: none;
  color: var(--color-text-secondary);
}

.results-list li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.results-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

.results-list li strong {
  color: var(--color-text);
}

/* --- Footer --- */
footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  body {
    padding: 48px 20px 80px;
  }

  .nav {
    top: 20px;
    right: 20px;
  }

  .project-header {
    flex-direction: column;
    gap: 2px;
  }

  .project-preview {
    display: none;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 32px;
    padding: 12px;
  }

  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }

  .spotify-now-playing {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .case-study-meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
