/* ============================================================
   Ameya Phadke — Robotics Portfolio
   Ported from the Claude Design prototype "Ameya Phadke Portfolio.dc.html".
   Global tokens, keyframes, hover states and responsive rules live here;
   structural layout stays inline in index.html to preserve the design 1:1.
   ============================================================ */

:root {
  --bg: #e9e3d6;
  --ink: #1e1b16;
  --cream: #f1ece1;
  --panel: #f1ece1;
  --slot: #d8d1c1;
  --red: #cf4436;
  --blue: #2e5bd0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }

section { scroll-margin-top: 78px; }

::selection { background: var(--red); color: var(--cream); }

/* ---- keyframes ---- */
@keyframes ap-drift { to { background-position: 38px 38px; } }
@keyframes ap-marq  { to { transform: translateX(-50%); } }
@keyframes ap-bob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes ap-bob2  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }
@keyframes ap-spin  { to { transform: rotate(360deg); } }
@keyframes ap-pulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.4); opacity: 1; } }

/* ---- media fill: <image-slot> placeholders became real media ---- */
.slot-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  background: var(--slot);
}

/* ---- tool logos inside the skill pills (from ./Assets/) ---- */
.tool-logo {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
  flex: none;
}

/* ---- interactive elements (replace the prototype's style-hover) ---- */
.nav-link { color: rgba(30, 27, 22, .55); transition: color .25s; }

.nav-contact {
  color: var(--ink);
  padding: 7px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  transition: all .25s;
}
.nav-contact:hover { background: var(--ink); color: var(--cream); }

.btn-dark {
  padding: 13px 24px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 24px;
  font: 500 13px/1 "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  transition: transform .2s;
}
.btn-dark:hover { transform: translateY(-2px); color: var(--cream); }

.btn-ghost {
  padding: 13px 24px;
  border: 1.5px solid rgba(30, 27, 22, .25);
  color: var(--ink);
  border-radius: 24px;
  font: 500 13px/1 "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  border-top: 1px solid rgba(241, 236, 225, .18);
  color: var(--cream);
  font-size: 19px;
  font-weight: 500;
  transition: color .2s;
}
.contact-link:last-of-type { border-bottom: 1px solid rgba(241, 236, 225, .18); }
.contact-link .meta {
  font: 500 13px "IBM Plex Mono", monospace;
  color: rgba(241, 236, 225, .6);
  transition: color .2s;
}
.contact-link:hover,
.contact-link:hover .meta { color: #e7b0a8; }

/* ---- tabbed project viewer ---- */
.ap-tabs-hint {
  font: 600 11px/1 "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  color: rgba(30, 27, 22, .5);
  margin-bottom: 14px;
}
.ap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.ap-tab {
  appearance: none;
  cursor: pointer;
  font: 600 13px/1 "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  padding: 14px 22px;
  border-radius: 24px;
  border: 1.5px solid rgba(30, 27, 22, .5);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(30, 27, 22, .12);
  transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.ap-tab:hover {
  border-color: var(--ink);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px rgba(30, 27, 22, .45);
}
.ap-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ap-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
  box-shadow: 0 8px 20px -10px rgba(30, 27, 22, .6);
}
.ap-tab-num { color: var(--red); margin-right: 8px; }
.ap-tab.is-active .ap-tab-num { color: #e7b0a8; }

.ap-panel { display: none; }
.ap-panel.is-active { display: block; animation: ap-fadein .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes ap-fadein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- responsive: hero key art stacks under the name on narrow screens ---- */
@media (max-width: 880px) {
  #ap-keyart {
    position: relative !important;
    transform: none !important;
    width: 100% !important;
    order: 2;
    margin-top: 38px;
    box-shadow: 0 20px 44px -26px rgba(30, 27, 22, .4) !important;
  }
  #ap-herotext { order: 1; }
}

/* ---- respect reduced-motion: freeze the decorative loops, keep layout ---- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [style*="ap-bob"], [style*="ap-bob2"], [style*="ap-spin"], [style*="ap-pulse"] {
    animation: none !important;
  }
}
