/* Palette and proportions follow Zerply's "dark night" profile theme. */
:root {
  --bg: #222;
  --bg-deep: #111;
  --text: #fff;
  --text-soft: #eee;
  --muted: #999;
  --dim: #555;
  --line: rgba(255, 255, 255, .15);
  --green: #7bbb6e;
  --yellow: #ffff80;
  --black: #14171b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-size: 16px; font-weight: normal; line-height: normal; }
h5 { font-size: 24px; font-weight: 500; }
a { color: inherit; }
img { display: block; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

main, .person { padding: 0 32px; }
section { margin-bottom: 85px; }

/* ---------- introduction ---------- */
.person { border-bottom: 1px solid #333; margin-bottom: 85px; }

#introduction {
  max-width: 1170px;
  margin: 0 auto;
  padding: 95px 0 85px;
  text-align: center;
}

.avatar-wrap { position: relative; display: inline-block; }
.avatar { width: 132px; height: 132px; border-radius: 100%; object-fit: cover; background: var(--bg-deep); }

.remote {
  position: absolute; right: 7px; bottom: 7px;
  width: 28px; height: 28px; border-radius: 100%;
  display: grid; place-items: center;
  background: var(--green); color: #fff; font-size: 14px;
  box-shadow: 0 0 0 3px var(--bg);
}

#introduction h1 { margin-top: 18px; font-size: 3.4em; font-weight: bold; }
#introduction h2 { margin: 6px 0; font-size: 17px; }
#introduction .location {
  margin: 0; font-size: 18px; color: var(--muted);
  display: flex; gap: 4px; justify-content: center; align-items: center;
}
#introduction .location .icon { font-size: 15px; opacity: .4; }

.social { margin: 18px auto 0; display: flex; gap: 12px; justify-content: center; }
.social a { color: var(--dim); font-size: 20px; transition: color .15s; }
.social a:hover { color: var(--green); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 0 22px; line-height: 40px;
  border-radius: 30px; background: var(--black); color: #fff;
  font-size: 14px; font-weight: 500; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.btn:hover { opacity: .8; }

/* ---------- credits (horizontal poster strip) ---------- */
#credits { position: relative; max-width: 1170px; margin-left: auto; margin-right: auto; }

.credit-list {
  display: flex; gap: 24px;
  overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none;
}
.credit-list::-webkit-scrollbar { display: none; }

.credit { flex: none; }
.credit .poster { height: 180px; width: auto; border-radius: 10px; background: var(--bg-deep); }
.credit .meta { max-width: 135px; margin-top: 10px; }
.credit .type { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit .role { font-weight: 500; }

.scroll-btn {
  position: absolute; top: 66px; z-index: 2;
  width: 48px; height: 48px; border-radius: 100%;
  display: grid; place-items: center; font-size: 26px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: var(--bg); color: rgba(255, 255, 255, .25);
  transition: color .15s, border-color .15s, opacity .15s;
}
#credits:hover .scroll-btn { border-color: var(--green); color: var(--green); }
.scroll-btn.left { left: -24px; }
.scroll-btn.right { right: -24px; }
.scroll-btn[disabled] { opacity: 0; pointer-events: none; }

/* ---------- portfolio (shot grid) ---------- */
#portfolio { max-width: 1570px; margin-left: auto; margin-right: auto; }

.shot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.shot { text-decoration: none; display: block; }
.cover {
  position: relative; display: block; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; background: #000;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease-in-out; }
.shot:hover .cover img { transform: scale(1.05); }

.play {
  position: absolute; inset: 0; margin: auto;
  width: 56px; height: 56px; border-radius: 100%;
  display: grid; place-items: center; font-size: 30px;
  background: rgba(0, 0, 0, .55); color: #fff;
  opacity: 0; transition: opacity .2s;
}
.shot:hover .play, .clip:hover .play { opacity: 1; }

.badge {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: rgba(0, 0, 0, .7); color: #fff;
}

.shot-title { display: block; margin-top: 12px; font-weight: 500; }
.shot-caption { display: block; font-size: 14px; color: var(--muted); }

/* ---------- work history & education ---------- */
#footer-layout {
  display: grid; grid-template-columns: 7fr 3fr; gap: 64px;
  max-width: 1570px; margin: 0 auto;
}
#footer-layout section { margin-bottom: 48px; }

.list { list-style: none; margin: 32px 0 0; padding: 0; }
.list > li { position: relative; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }
.list > li:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.list.minimized > li:nth-child(n+6) { display: none; }

#experience .meta { padding-left: 66px; line-height: 1.55; }
#experience .logo { position: absolute; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--bg-deep); }
#experience .logo-blank { display: grid; place-items: center; font-weight: bold; color: var(--dim); }
#experience h3 { font-size: 1.1em; font-weight: 500; line-height: inherit; }
#experience h4, #education h4 { margin: 1px 0 12px; color: var(--muted); }
#experience .description { margin-top: 18px; color: var(--text-soft); }
#experience .description p { margin: 0 0 1em; }
#experience .description p:last-child { margin-bottom: 0; }

.job-credits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.job-credits img { height: 90px; width: auto; border-radius: 5px; background: var(--bg-deep); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 12px; line-height: 28px; border-radius: 30px;
  font-size: 15px; white-space: nowrap;
  background: var(--black); color: #fff; font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
/* Hooks to recolor the date pill by tense later. On Zerply these were
   yellow (#ffff80) for present roles vs cyan for past roles; kept uniform
   for now — fill these in to restore the present-vs-past distinction. */
.pill-present {}
.pill-past {}
.pill .icon { font-size: 13px; }

.show-more {
  display: block; width: 100%; margin-top: 48px; padding: 12px;
  border: 0; border-radius: 5px; cursor: pointer;
  background: #eee; color: var(--black); font: inherit; font-weight: 500;
}
.show-more:hover { background: #ddd; }

/* ---------- floating contact card ---------- */
#fixed-contact {
  position: fixed; right: 32px; bottom: 32px; z-index: 50; width: 200px;
  padding: 14px; border-radius: 5px 30px 30px 30px;
  background: #fff; color: var(--black);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, .05);
  display: grid; grid-template-columns: 46px 1fr; gap: 0 10px; align-items: center;
}
#fixed-contact[hidden] { display: none; }
#fixed-contact .avatar { width: 46px; height: 46px; }
#fixed-contact .meta { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; min-width: 0; }
#fixed-contact .meta span { color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fixed-contact .btn { grid-column: 1 / -1; justify-content: center; margin-top: 12px; line-height: 32px; font-size: 13px; }

/* ---------- video player dialog ---------- */
#player {
  width: min(1100px, 94vw); max-height: 92vh; padding: 0;
  border: 0; border-radius: 10px; background: #000; color: #fff;
}
#player::backdrop { background: rgba(0, 0, 0, .85); }
.player-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg-deep); }
.player-title { font-weight: 500; }
.player-close { border: 0; background: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.player-body iframe, .player-body video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

.clip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px;
  padding: 8px; max-height: 80vh; overflow-y: auto;
}
.clip { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #111; }
.clip img { width: 100%; height: 100%; object-fit: cover; }
.player-back { border: 0; background: none; color: var(--green); font: inherit; cursor: pointer; padding: 0 12px 0 0; }

footer { padding: 32px; text-align: center; font-size: 14px; color: var(--dim); border-top: 1px solid #333; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  #footer-layout { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 680px) {
  main, .person { padding: 0 16px; }
  #introduction { padding-top: 56px; }
  #introduction h1 { font-size: 2.4em; }
  .shot-list { grid-template-columns: 1fr; }
  .scroll-btn, #fixed-contact { display: none !important; }
  #experience .meta { padding-left: 58px; }
}
