/* ============================================
   GABRIEL HAYNES: PORTFOLIO
   Theme: Grand Piano
   Palette: ivory #F7F5F0, ebony #14110F, charcoal #2A2724,
            gold #C9A24B, warm grey #9C958A
   ============================================ */

:root {
  --ivory: #F7F5F0;
  --ivory-dim: #EAE6DC;
  --ebony: #14110F;
  --ebony-soft: #201C19;
  --charcoal: #2A2724;
  --gold: #C9A24B;
  --gold-bright: #E2C275;
  --warm-grey: #9C958A;
  --line: rgba(20, 17, 15, 0.12);
  --line-light: rgba(247, 245, 240, 0.14);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ebony);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ============================================
   BACKGROUND MUSIC NOTES (decorative, behind text)
   ============================================ */

.note-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.note-field svg {
  position: absolute;
  opacity: 0.05;
}

.note-field .note-dark { color: var(--ebony); }
.note-field .note-gold { color: var(--gold); opacity: 0.07; }

/* ============================================
   PIANO-KEY NAVIGATION
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: var(--ebony);
  border-bottom: 1px solid var(--line-light);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: stretch;
  padding: 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-right: 1.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.piano-nav {
  flex: 1;
  display: flex;
  list-style: none;
  height: 100%;
}

.piano-nav li {
  flex: 1;
  position: relative;
  display: flex;
}

.piano-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ebony);
  background: var(--ivory);
  border-left: 1px solid var(--line);
  transition: transform 0.08s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  cursor: pointer;
  padding: 0 0.5rem;
}

/* every other key is a "black key" */
.piano-nav li:nth-child(even) a {
  background: var(--ebony-soft);
  color: var(--ivory-dim);
  border-left: 1px solid var(--line-light);
  z-index: 2;
  margin: 0 -4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.piano-nav li:first-child a {
  border-left: none;
}

.piano-nav a:hover {
  background: var(--gold);
  color: var(--ebony);
}

.piano-nav li:nth-child(even) a:hover {
  background: var(--gold-bright);
  color: var(--ebony);
}

/* key press effect */
.piano-nav a:active,
.piano-nav a.key-pressed {
  transform: translateY(3px);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.piano-nav li:nth-child(even) a:active,
.piano-nav li:nth-child(even) a.key-pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.piano-nav a.current {
  background: var(--gold);
  color: var(--ebony);
}

.piano-nav li:nth-child(even) a.current {
  background: var(--gold-bright);
  color: var(--ebony);
}

/* ============================================
   MUSIC PLAYER DISC (top corner widget)
   ============================================ */

.disc-player {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

.disc-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--ivory) 0 6px, transparent 6.5px),
    repeating-radial-gradient(circle at center, var(--ebony-soft) 0px, var(--ebony-soft) 3px, #1a1612 3px, #1a1612 6px);
  border: 2px solid var(--gold);
  cursor: pointer;
  display: block;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.disc-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.disc-btn:hover {
  box-shadow: 0 0 0 4px rgba(201, 162, 75, 0.25);
}

.disc-btn.spinning {
  animation: spin-disc 2.4s linear infinite;
}

@keyframes spin-disc {
  to { transform: rotate(360deg); }
}

.disc-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--ebony-soft);
  color: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: var(--font-body);
}

.disc-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.disc-tooltip .now-playing-label {
  color: var(--gold-bright);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

/* ============================================
   MOBILE NAV
   ============================================ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ivory);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   LAYOUT / SECTIONS
   ============================================ */

.page-content {
  position: relative;
  z-index: 1;
  padding-top: var(--header-h);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ebony);
}

h1 .accent {
  color: var(--gold);
  font-style: italic;
}

.subtitle {
  margin-top: 1.1rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--charcoal);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

section.block {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--ebony);
}

h2 .num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ebony);
}

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

.lead {
  font-size: 1.1rem;
  color: var(--ebony);
}

ul.styled, ol.styled {
  margin: 1rem 0 1.5rem 1.2rem;
  color: var(--charcoal);
}

ul.styled li, ol.styled li {
  margin-bottom: 0.5rem;
}

/* ============================================
   PORTRAIT (About page)
   ============================================ */

.portrait-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.portrait-frame {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold);
  box-shadow: 0 12px 36px rgba(20, 17, 15, 0.18), 0 0 0 8px var(--ivory-dim);
  flex-shrink: 0;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* ============================================
   CARDS / GRIDS
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem;
  backdrop-filter: blur(2px);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card .role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.card img.hobby-photo {
  border-radius: 8px;
  margin-bottom: 0.8rem;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--ebony);
  color: var(--gold-bright);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ============================================
   STAT STRIP
   ============================================ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.stat {
  padding: 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
}

.stat .stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.stat .stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-top: 0.5rem;
}

/* ============================================
   PROJECT BLOCKS
   ============================================ */

.project {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.project:first-of-type {
  border-top: none;
  padding-top: 1rem;
}

.project-media {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ebony);
}

.project-media img,
.project-media video,
.project-media iframe {
  width: 100%;
  display: block;
}

.project-media iframe {
  height: 280px;
  border: none;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--ebony);
  color: var(--ebony);
  text-decoration: none;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  margin-top: 0.8rem;
}

.btn:hover {
  background: var(--ebony);
  color: var(--gold-bright);
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.8rem;
  background: rgba(255,255,255,0.55);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20,17,15,0.1);
}

.contact-card .clabel {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-card .cvalue {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ebony);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--warm-grey);
  position: relative;
  z-index: 1;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 860px) {
  .grid-2, .grid-3, .stat-strip, .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .hamburger {
    display: flex;
  }

  .piano-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--ebony);
    height: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--line-light);
  }

  .piano-nav.open {
    max-height: 70vh;
    overflow-y: auto;
  }

  .piano-nav li {
    height: 56px;
  }

  .piano-nav li:nth-child(even) a {
    margin: 0;
    border-left: none;
    border-top: 1px solid var(--line-light);
  }

  .piano-nav li:nth-child(odd) a {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .piano-nav a {
    font-size: 1.05rem;
  }

  .disc-player {
    padding-left: 0.6rem;
  }

  .disc-tooltip {
    right: -10px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 1.05rem;
    padding-right: 0.6rem;
  }
}

@media (max-width: 400px) {
  .brand span.brand-text {
    display: none;
  }
}
