/* ============================================================
   Akash Yadav — Portfolio
   Minimal, editorial, Framer-style
   ============================================================ */

:root {
  --bg: #f4f1ea;
  --bg-elev: #fbfaf6;
  --ink: #1a1917;
  --ink-soft: #605c54;
  --line: #dcd6ca;
  --accent: #c8532b;
  --card-1: #e7ddca;
  --card-2: #d6ddd2;
  --card-3: #dcd9e6;
  --card-4: #e3d5cf;
  --radius: 20px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  --bg: #141310;
  --bg-elev: #1d1b17;
  --ink: #f2efe8;
  --ink-soft: #a29c90;
  --line: #2e2b25;
  --accent: #e2703f;
  --card-1: #2a2620;
  --card-2: #22261f;
  --card-3: #242231;
  --card-4: #2b241f;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

em { font-style: italic; }

::selection { background: var(--accent); color: #fff; }

/* ===== Layout helpers ===== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 28px;
}
#work { padding-top: 24px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 28px;
  backdrop-filter: blur(12px);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  z-index: -1;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.is-scrolled::before { border-bottom-color: var(--line); }

.nav__brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.nav__brand-logo {
  height: 28px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav__links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 450;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink);
  color: var(--bg) !important;
}
.nav__cta:hover { opacity: 0.85; }

.nav__toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.nav__toggle-dot {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(-50%);
  transition: left 0.3s var(--ease);
  z-index: 1;
}
:root[data-theme="dark"] .nav__toggle-dot { left: 22px; }
.nav__toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  line-height: 1;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
  pointer-events: none;
}
.nav__toggle-icon--sun { left: 5px; color: var(--ink); }
.nav__toggle-icon--moon { right: 5px; }
:root[data-theme="dark"] .nav__toggle-icon--sun { color: var(--ink-soft); }
:root[data-theme="dark"] .nav__toggle-icon--moon { color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 28px 20px;
}
.hero__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 15ch;
  margin-bottom: 28px;
}
.hero__title em { color: var(--accent); }
.hero__brand-logo {
  height: 1.05em;
  width: auto;
  vertical-align: middle;
  margin: 0 0.05em 0 0.12em;
  display: inline-block;
  transform: translateY(-0.08em);
}
.hero__brand-logo--youtube { height: 0.75em; }

/* Inline hero logo links: hover/focus reveals a tooltip, click opens the target */
.hero__logo-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.hero__logo-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--bg);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 20;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.35);
}
.hero__logo-link:hover .hero__logo-tip,
.hero__logo-link:focus-visible .hero__logo-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.hero__brand-logo--mixers { height: 0.9em; }

/* Mixers hover card: scales up out of the logo, photos + caption */
.hero__mixers-card {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  width: 320px;
  max-width: 80vw;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.35);
  transform-origin: bottom center;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 25;
}
.hero__logo-link--mixers:hover .hero__mixers-card,
.hero__logo-link--mixers:focus-visible .hero__mixers-card,
.hero__logo-link--youtube:hover .hero__mixers-card,
.hero__logo-link--youtube:focus-visible .hero__mixers-card {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.hero__mixers-photos {
  margin: 6px 4px 14px;
}
.hero__mixers-photos img {
  display: block;
  width: 100%;
  height: auto;
}
.hero__mixers-caption {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
}
.hero__sub {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 19px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Hero floating photo collage ===== */
.hero__collage {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 400px;
  height: 460px;
  pointer-events: none;
}
.hero__collage-item {
  position: absolute;
  pointer-events: auto;
  cursor: default;
}
.hero__collage-tip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--ink);
  color: var(--bg);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 5;
}
.hero__collage-item:hover .hero__collage-tip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hero__collage-item img {
  display: block;
  width: 100%;
  height: auto;
}
.hero__collage-item--1 {
  top: 0;
  left: 70px;
  width: 150px;
  animation: heroFloat1 8s ease-in-out infinite;
}
.hero__collage-item--2 {
  top: 55px;
  right: 0;
  width: 165px;
  animation: heroFloat2 9.5s ease-in-out infinite;
}
.hero__collage-item--3 {
  top: 230px;
  left: 0;
  width: 150px;
  animation: heroFloat3 10.5s ease-in-out infinite;
}
.hero__collage-item--4 {
  top: 255px;
  right: 45px;
  width: 165px;
  animation: heroFloat4 8.8s ease-in-out infinite;
}
/* Very slow, gentle vertical drift — each item on its own timing/amplitude
   so the collage feels alive rather than mechanically synced. */
@keyframes heroFloat1 {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(-4deg); }
}
@keyframes heroFloat2 {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(12px) rotate(6deg); }
}
@keyframes heroFloat3 {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-11px) rotate(-6deg); }
}
@keyframes heroFloat4 {
  0%, 100% { transform: translateY(0) rotate(4deg); }
  50% { transform: translateY(13px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__collage-item { animation: none; }
}
@media (max-width: 980px) {
  .hero__collage { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--bg-elev); }

/* ===== Section head ===== */
.section__head {
  margin-bottom: 54px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.section__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ===== Work grid ===== */
.work {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 34px;
}
.card { display: flex; flex-direction: column; }
.card__media {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}
.card__thumb {
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__thumb { transform: scale(1.04); }
.card__thumb--1 {
  background: url("assets/covers/meta-cover.jpg") center / cover no-repeat;
}
.card__thumb--2 {
  background: url("assets/covers/fwd-cover.jpg") center / cover no-repeat;
}
.card__thumb--3 {
  background: url("assets/covers/glamstream-cover.jpg") center / cover no-repeat;
}

.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

.soon {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.lock {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 15px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
  transition: transform 0.3s var(--ease);
}
.card:hover .lock { transform: scale(1.08); }

.card__body { padding: 22px 4px 0; }
.card__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
}
.card__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.card__text { color: var(--ink-soft); font-size: 16px; margin-bottom: 16px; }
.card__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.25s var(--ease);
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.about__photo {
  aspect-ratio: 4 / 5;
  background: url("assets/covers/about-photo.png") center / contain no-repeat;
}
.about__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.about__content p { color: var(--ink-soft); margin-bottom: 16px; max-width: 52ch; }
.about__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease);
}
.about__content a:hover {
  color: color-mix(in srgb, var(--accent) 100%, black 25%);
}
.about__stats {
  display: flex;
  gap: 44px;
  list-style: none;
  margin-top: 34px;
  flex-wrap: wrap;
}
.about__stats strong {
  display: block;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
}
.about__stats span { font-size: 14px; color: var(--ink-soft); }

/* ===== Contact ===== */
.contact { text-align: center; padding-bottom: 120px; }
.contact__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 34px;
}
.contact__title em { color: var(--accent); }
.contact__sub {
  max-width: 46ch;
  margin: 0 auto 32px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.5;
}
.contact__cta { margin-bottom: 8px; }
.contact__socials {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.contact__socials a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.25s var(--ease);
}
.contact__socials a:hover { color: var(--ink); }

/* ===== Footer ===== */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ===== Password modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(6px);
  animation: fade 0.3s var(--ease);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 32px 30px;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
  animation: pop 0.35s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.modal__close:hover { color: var(--ink); background: var(--bg); }
.lock--big {
  position: static;
  width: 52px;
  height: 52px;
  font-size: 22px;
  margin: 0 auto 18px;
  background: var(--bg);
}
.modal__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 28px;
  margin-bottom: 8px;
}
.modal__text { color: var(--ink-soft); font-size: 15px; margin-bottom: 22px; }
.modal__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color 0.2s var(--ease);
}
.modal__input:focus { outline: none; border-color: var(--accent); }
.modal__input.is-error { border-color: #d9534f; animation: shake 0.35s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.modal__error { color: #d9534f; font-size: 14px; margin-bottom: 12px; }
.modal__submit { width: 100%; }
.modal__hint { font-size: 13px; color: var(--ink-soft); margin-top: 18px; }
.modal__hint a { color: var(--ink); }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .work { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; gap: 34px; }
  .about__media { max-width: 340px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .section { padding: 70px 22px; }
  .hero { padding: 60px 22px 40px; }
}
