/* ===================================================================
   Frank Zito — Portfolio / Resume site
   Monochrome, dark-by-default, single-column "linktree" layout.
   Change the variables below to restyle the whole site from one place.
=================================================================== */

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.3);
  --ink: #f3f3f0;
  --ink-soft: #9a9aa1;
  --white: #ffffff;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --max-width: 620px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero / profile header ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  padding: 80px 24px 60px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.55), rgba(255,255,255,0) 70%);
  animation: float 16s ease-in-out infinite;
}

.blob-1 {
  width: 460px; height: 460px;
  top: -160px; left: -120px;
  animation-delay: 0s;
}

.blob-2 {
  width: 380px; height: 380px;
  bottom: -160px; right: -100px;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob { animation: none; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
}

.hero-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin-bottom: 24px;
  position: relative;
  border: 3px solid var(--border);
  overflow: hidden;
  background: linear-gradient(135deg, #3a3a3f, #17171a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  position: absolute;
  inset: 0;
}

.avatar-initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--white);
  display: none;
}

.hero-avatar.avatar-fallback .avatar-initials { display: block; }

.eyebrow {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-pitch {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: rgba(243, 243, 240, 0.75);
  max-width: 560px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 32px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-row a svg {
  width: 20px;
  height: 20px;
}

.social-row a:hover {
  opacity: 0.8;
  transform: translateY(-3px);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  opacity: 0.6;
  animation: bob 2.2s ease-in-out infinite;
  z-index: 1;
}

.scroll-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-arrow {
  font-size: 1.3rem;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Shared section styling ---------- */
.section {
  padding: 90px 0;
}

.section.projects { background: var(--surface); }

.projects .section-inner {
  max-width: 1040px;
}

.section-head {
  margin-bottom: 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.section-sub {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mini results strip (inside Rob Chevez's details) ---------- */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  max-width: 180px;
}

/* ---------- Work samples ---------- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.sample-card {
  display: flex;
  justify-content: center;
  transition: transform 0.25s ease;
}

.sample-card:hover { transform: translateY(-6px); }

.sample-video {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  background: #000;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Project list ---------- */
.project-list {
  display: flex;
  flex-direction: column;
}

.project {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.project:first-child { padding-top: 0; }
.project:last-child { border-bottom: none; padding-bottom: 0; }

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 24px;
}

.project-title {
  font-size: 1.4rem;
}

.project-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.project-media--split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Flex items default to min-width:auto, which stops a <video>/<img> from
   shrinking below its intrinsic size and pushes siblings out of the row. */
.project-media--split > * {
  min-width: 0;
}

@media (max-width: 700px) {
  .project-media--split { flex-direction: column; }
}

/* ---------- LoseMyGrip: video + playlist ---------- */
.project-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #000;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  flex: 1.6;
}

.playlist {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 280px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.playlist-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.track {
  display: flex;
  align-items: center;
  gap: 10px;
}

.track audio {
  display: none;
}

.track-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.track-play:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.track-play svg {
  width: 13px;
  height: 13px;
}

.track-play .icon-play { margin-left: 1px; }

/* State is driven by the .is-playing class (not the HTML `hidden` attribute,
   which some browsers don't apply reliably to inline <svg>). */
.track-play .icon-pause { display: none; }
.track-play.is-playing .icon-play { display: none; }
.track-play.is-playing .icon-pause { display: block; }

.track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.track-name {
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-bar {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.track-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--ink);
  border-radius: 999px;
}

.track-time {
  font-size: 0.72rem;
  color: var(--ink-soft);
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .playlist { max-width: none; }
}

/* ---------- TDL: screenshots + download ---------- */
.screens {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1.6;
  width: 100%;
}

.screen-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 260px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.download-icon svg {
  width: 28px;
  height: 28px;
  color: var(--ink-soft);
}

.download-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 4px 0 0;
}

.download-size {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

.btn-download {
  margin-top: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-download:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .download-card { max-width: none; }
}

/* ---------- Project details toggle ---------- */
.project-details {
  margin-top: 28px;
}

.project-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
  transition: color 0.2s ease;
}

.project-details summary::-webkit-details-marker { display: none; }

.project-details summary:hover { color: var(--ink); }

.project-details summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
  line-height: 1;
}

.project-details[open] summary::before { content: '\2212'; }

.details-content {
  margin-top: 20px;
}

.project-note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 32px 24px 40px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
