/* ═══════════════════════════════════════════
   PROJECTS — Portfolio
   ═══════════════════════════════════════════ */

:root {
  --emerald: #34d399;
  --cyan: #00d4ff;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

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

/* ── header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(0,212,255,.15);
  background: rgba(8,6,13,.85);
}

.back-btn {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 50%;
  background: rgba(0,212,255,.05);
  transition: background .2s, border-color .2s, transform .15s;
}
.back-btn:hover {
  background: rgba(0,212,255,.12);
  border-color: var(--pink);
}
.back-btn:active { transform: scale(.92); }

.logo {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--gold);
  letter-spacing: .1em;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem clamp(.5rem, 1.5vh, 1rem);
}

.hero__title {
  font-family: 'Righteous', cursive;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--emerald);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 .3rem;
}

.hero__sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--dim);
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   PORTFOLIO — Featured Projects
   ═══════════════════════════════════════════ */
.portfolio {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

/* ── project card ── */
.project {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22,.8,.25,1);
}
.project:hover {
  transform: translateY(-4px);
}

.project__glow {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: conic-gradient(from 0deg, var(--emerald), var(--gold), var(--pink), var(--emerald));
  opacity: .4;
  z-index: 0;
  animation: glowSpin 8s linear infinite;
  filter: blur(1px);
}
.project__glow--cyan {
  background: conic-gradient(from 0deg, var(--cyan), var(--gold), var(--pink), var(--cyan));
}
@keyframes glowSpin {
  to { filter: blur(1px) hue-rotate(360deg); }
}

.project__inner {
  position: relative;
  z-index: 1;
  background: rgba(8,6,13,.92);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project__icon {
  font-size: 2.5rem;
  line-height: 1;
}

.project__tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-family: var(--font-mono);
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 12px;
  white-space: nowrap;
}

.tag--accent {
  color: var(--emerald);
  background: rgba(192,132,252,.08);
  border: 1px solid rgba(192,132,252,.2);
}

.tag--cyan {
  color: var(--cyan);
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,252,.2);
}

.project__name {
  font-family: 'Righteous', cursive;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--emerald);
  margin: 0;
  letter-spacing: .02em;
}

.project__name--cyan {
  color: var(--cyan);
}

.project__desc {
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  opacity: .85;
  line-height: 1.65;
  margin: 0;
}

.project__highlights {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.highlight {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  opacity: .9;
}

.project__links {
  display: flex;
  gap: .6rem;
  margin-top: .5rem;
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(192,132,252,.2);
  background: rgba(192,132,252,.06);
  color: var(--emerald);
  transition: all .25s;
}
.project__link:hover {
  background: var(--emerald);
  color: var(--bg);
  border-color: var(--emerald);
  box-shadow: 0 0 16px -4px rgba(192,132,252,.4);
}

.project__link--cyan {
  border-color: rgba(0,212,255,.2);
  background: rgba(0,212,255,.06);
  color: var(--cyan);
}
.project__link--cyan:hover {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  box-shadow: 0 0 16px -4px rgba(0,212,252,.4);
}

.project__link svg {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   ORB VISUAL — OrbSpoofer
   ═══════════════════════════════════════════ */
.project__orb-container {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 80px;
  height: 80px;
  z-index: 2;
  pointer-events: none;
  opacity: .7;
}

.project__orb {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--emerald), rgba(192,132,252,.3));
  box-shadow: 0 0 20px rgba(192,132,252,.5), inset 0 0 12px rgba(255,255,255,.15);
  animation: orbPulse 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.project__orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(192,132,252,.3);
  animation: orbRing 4s ease-in-out infinite;
}
.project__orb-ring--2 {
  inset: -8px;
  border-color: rgba(192,132,252,.15);
  animation-delay: 1s;
  animation-duration: 5s;
}
@keyframes orbRing {
  0%, 100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.15); opacity: .2; }
}

/* ═══════════════════════════════════════════
   WAVE VISUAL — ROCKSHOW
   ═══════════════════════════════════════════ */
.project__visual--waves {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 80px;
  height: 80px;
  z-index: 2;
  pointer-events: none;
  opacity: .6;
  overflow: hidden;
  border-radius: 12px;
}

.wave {
  position: absolute;
  bottom: 0;
  left: -20%;
  width: 140%;
  height: 30px;
  border-radius: 40%;
  animation: waveMove 4s ease-in-out infinite;
}

.wave--1 {
  background: rgba(0,212,255,.4);
  animation-duration: 3.5s;
  bottom: 10px;
}
.wave--2 {
  background: rgba(0,212,255,.25);
  animation-duration: 4.5s;
  animation-delay: .5s;
  bottom: 0;
}
.wave--3 {
  background: rgba(0,212,255,.15);
  animation-duration: 5.5s;
  animation-delay: 1s;
  bottom: -10px;
}

@keyframes waveMove {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(15px) rotate(2deg); }
}

/* ═══════════════════════════════════════════
   STEAM VISUAL — SteamManager
   ═══════════════════════════════════════════ */
.project__visual--steam {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 80px;
  height: 80px;
  z-index: 2;
  pointer-events: none;
  opacity: .7;
}

.steam-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--emerald), rgba(52,211,153,.2));
  animation: steamFloat 4s ease-in-out infinite;
}

.steam-dot--1 {
  width: 12px; height: 12px;
  bottom: 10px; left: 10px;
  animation-duration: 3s;
}

.steam-dot--2 {
  width: 8px; height: 8px;
  bottom: 35px; left: 30px;
  animation-duration: 4s;
  animation-delay: .5s;
}

.steam-dot--3 {
  width: 6px; height: 6px;
  bottom: 55px; left: 15px;
  animation-duration: 3.5s;
  animation-delay: 1s;
  opacity: .6;
}

.steam-dot--4 {
  width: 10px; height: 10px;
  bottom: 20px; left: 50px;
  animation-duration: 4.5s;
  animation-delay: .3s;
  opacity: .5;
}

@keyframes steamFloat {
  0% { transform: translateY(0) scale(1); opacity: .7; }
  50% { transform: translateY(-20px) scale(1.3); opacity: .3; }
  100% { transform: translateY(0) scale(1); opacity: .7; }
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: .6rem 1rem;
}
.footer__divider {
  width: 60px; height: 2px; margin: 0 auto .5rem;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 1px;
  opacity: .5;
}
.footer__text {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
  min-height: 1.2em;
}
.footer__credit {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: .3rem;
  opacity: .8;
}

/* ═══════════════════════════════════════════
   TABBAR
   ═══════════════════════════════════════════ */
.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: none;
  justify-content: space-around;
  background: rgba(4,14,26,.95);
  border-top: 1px solid rgba(0,212,255,.2);
  box-shadow: 0 -6px 24px -16px rgba(0,0,0,.8);
  z-index: 1000;
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
}
.tabbar__indicator {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px var(--glow-pink);
  transition: transform .4s cubic-bezier(.22,.8,.25,1), width .3s;
  pointer-events: none;
}
.tabbar__item {
  flex: 1; text-align: center;
  padding: .5rem .3rem .4rem;
  border-radius: 10px;
  transition: background .3s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: translateY(1px); }
.tabbar__ico { font-size: 1.15rem; display: block; }
.tabbar__label {
  font-family: var(--font-display);
  font-size: .6rem; letter-spacing: .08em;
  color: var(--dim);
  display: block; margin-top: 2px;
  transition: color .3s;
}
.tabbar__item.active {
  background: rgba(0,212,255,.1);
}
.tabbar__item.active .tabbar__label { color: var(--gold); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .tabbar { display: flex; }
  body { padding-bottom: 0; }
  .header { padding: .6rem 1rem; }
  .hero { padding: 1.2rem 1rem .5rem; }
  .project__inner { padding: 1.5rem; }
  .project__orb-container { width: 60px; height: 60px; top: 1.5rem; right: 1.5rem; }
  .project__visual--waves { width: 60px; height: 60px; top: 1rem; right: 1rem; }
  .project__visual--steam { width: 60px; height: 60px; top: 1rem; right: 1rem; }
  .project__links { flex-direction: column; }
  .project__link { justify-content: center; }
}
@media (min-width: 901px) {
  .tabbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
