/* ============================================================
   DEVLIKA PORTFOLIO — portfolio.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600&display=swap');

/* ─── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:            #17142c;
  --bg-elevated:   #1f1b3a;
  --bg-card:       #262048;
  --bg-card-hover: #2d2758;
  --text:          #f4f1ff;
  --text-dim:      #a9a2ce;
  --android:       #b4ff39;
  --android-soft:  #b4ff3922;
  --web:           #4ec9f5;
  --web-soft:      #4ec9f522;
  --game:          #ff4fa3;
  --game-soft:     #ff4fa322;
  --gold:          #ffc93c;
  --gold-soft:     #ffc93c22;
  --radius-lg:     28px;
  --radius-md:     18px;
  --radius-sm:     10px;
  --display:       'Baloo 2', system-ui, sans-serif;
  --mono:          'Space Mono', monospace;
  --body:          'Inter', system-ui, sans-serif;
  --shadow-card:   0 4px 24px rgba(0,0,0,.35);
  --transition:    .25s cubic-bezier(.4,0,.2,1);
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 10%, #ff4fa318, transparent 40%),
    radial-gradient(circle at 85% 0%,  #4ec9f518, transparent 40%),
    radial-gradient(circle at 50% 80%, #b4ff3914, transparent 45%);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ─── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb { background: #ffffff25; border-radius: 999px; }

/* ─── NAV ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23,20,44,.88);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid #ffffff14;
  transition: var(--transition);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1180px; margin: 0 auto;
  gap: 16px; flex-wrap: wrap;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; gap: 10px; letter-spacing: -.01em;
}
.logo-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--android), var(--web) 50%, var(--game));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .78rem; font-weight: 700; color: #17142c;
  flex-shrink: 0;
}
.world-tabs {
  display: flex; gap: 6px;
  background: var(--bg-elevated);
  padding: 5px; border-radius: 999px;
  border: 1px solid #ffffff14;
}
.world-tab {
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px; color: var(--text-dim);
  transition: var(--transition); cursor: pointer;
}
.world-tab:hover { color: var(--text); }
.world-tab.android.active, .world-tab.android:hover { background: var(--android-soft); color: var(--android); }
.world-tab.web.active,     .world-tab.web:hover     { background: var(--web-soft);     color: var(--web);     }
.world-tab.game.active,    .world-tab.game:hover     { background: var(--game-soft);    color: var(--game);    }
.nav-cta {
  font-family: var(--mono); font-weight: 700; font-size: .78rem;
  color: var(--gold); border: 1px solid #ffc93c55;
  padding: 9px 20px; border-radius: 999px; white-space: nowrap;
  transition: var(--transition);
}
.nav-cta:hover { background: var(--gold-soft); }

/* ─── HERO ────────────────────────────────────────────────── */
.hero { padding: 80px 24px 64px; position: relative; }
.hero-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 48px; align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: .74rem; color: var(--gold);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px;
  display: inline-block; border: 1px solid #ffc93c55;
  padding: 5px 13px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.7rem); line-height: 1.04; margin-bottom: 20px;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--android), var(--web), var(--game));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.tagline {
  color: var(--text-dim); font-size: 1.07rem; max-width: 46ch; margin-bottom: 32px;
  line-height: 1.7;
}

/* XP BAR */
.xp-block { margin-bottom: 28px; max-width: 420px; }
.xp-label {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: .74rem; color: var(--text-dim); margin-bottom: 9px;
}
.xp-bar {
  height: 13px; border-radius: 999px; background: var(--bg-elevated);
  overflow: hidden; border: 1px solid #ffffff14; position: relative;
}
.xp-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--android), var(--web), var(--game));
  position: relative; transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.xp-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,.3));
  border-radius: inherit;
}

/* STAT CHIPS */
.stat-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-chip {
  background: var(--bg-card); border: 1px solid #ffffff14;
  border-radius: var(--radius-sm); padding: 12px 20px;
  transition: var(--transition);
}
.stat-chip:hover { border-color: #ffffff28; transform: translateY(-2px); }
.stat-chip .num { font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.stat-chip .lbl { font-family: var(--mono); font-size: .66rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }

/* HERO VISUAL */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; padding: 32px; }
.avatar-frame {
  width: 290px; height: 290px; border-radius: 34px; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 5rem; font-weight: 800;
  color: var(--text-dim);
  z-index: 1;
  box-shadow: var(--shadow-card);
}
.avatar-frame::before {
  content: ''; position: absolute; inset: 0; border-radius: 34px; z-index: -1;
  background: conic-gradient(var(--android), var(--web), var(--game), var(--android));
  animation: spin 7s linear infinite;
}
.avatar-inner {
  position: absolute; inset: 4px; border-radius: 30px;
  background: var(--bg-card); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px #ffffff1a;
  z-index: 2;
}
.avatar-inner img {
  width: 100%; height: 100%; object-fit: cover;
}
@keyframes spin { to { transform: rotate(360deg); } }
.floaty {
  position: absolute; font-family: var(--mono); font-weight: 700; font-size: .68rem;
  background: var(--bg-card); border: 1px solid #ffffff20; border-radius: 999px;
  padding: 7px 14px; animation: float 4.5s ease-in-out infinite;
  backdrop-filter: blur(8px); z-index: 5;
}
.floaty.f1 { top: 12%; left: 8%; color: var(--android); animation-delay: 0s; }
.floaty.f2 { bottom: 25%; right: 4%; color: var(--web); animation-delay: 1.2s; }
.floaty.f3 { bottom: 15%; left: 10%; color: var(--game); animation-delay: 2.1s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }

/* ─── SECTION HEADERS ─────────────────────────────────────── */
section { padding: 64px 24px; }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}
.section-head p { color: var(--text-dim); margin-top: 10px; font-size: .97rem; }

/* ─── WORLD CARDS ─────────────────────────────────────────── */
.worlds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.world-card {
  border-radius: var(--radius-lg); padding: 32px 28px; position: relative;
  border: 1px solid #ffffff14; background: var(--bg-card); overflow: hidden;
  transition: var(--transition); cursor: pointer;
  box-shadow: var(--shadow-card);
}
.world-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  transition: var(--transition); border-radius: inherit;
}
.world-card:hover { transform: translateY(-8px); }
.world-card.android { box-shadow: 0 4px 24px #b4ff3910, inset 0 0 0 1px #b4ff3930; }
.world-card.android:hover { box-shadow: 0 12px 40px #b4ff3930, inset 0 0 0 1px #b4ff3960; }
.world-card.web  { box-shadow: 0 4px 24px #4ec9f510, inset 0 0 0 1px #4ec9f530; }
.world-card.web:hover  { box-shadow: 0 12px 40px #4ec9f530, inset 0 0 0 1px #4ec9f560; }
.world-card.game { box-shadow: 0 4px 24px #ff4fa310, inset 0 0 0 1px #ff4fa330; }
.world-card.game:hover { box-shadow: 0 12px 40px #ff4fa330, inset 0 0 0 1px #ff4fa360; }
.world-card .icon {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.world-card.android .icon { background: var(--android-soft); }
.world-card.web  .icon    { background: var(--web-soft);     }
.world-card.game .icon    { background: var(--game-soft);    }
.world-card h3 { font-family: var(--display); font-size: 1.4rem; margin-bottom: 10px; font-weight: 800; }
.world-card p  { color: var(--text-dim); font-size: .92rem; margin-bottom: 22px; line-height: 1.65; }
.world-card .enter { font-family: var(--mono); font-size: .74rem; font-weight: 700; }
.world-card.android .enter { color: var(--android); }
.world-card.web  .enter    { color: var(--web);     }
.world-card.game .enter    { color: var(--game);    }

/* ─── PROJECTS ────────────────────────────────────────────── */
.group-head {
  display: flex; align-items: center; gap: 14px;
  margin: 56px 0 24px;
}
.group-head .dot { width: 14px; height: 14px; border-radius: 5px; }
.group-head.android .dot { background: var(--android); box-shadow: 0 0 8px var(--android); }
.group-head.web  .dot    { background: var(--web);     box-shadow: 0 0 8px var(--web);     }
.group-head.game .dot    { background: var(--game);    box-shadow: 0 0 8px var(--game);    }
.group-head h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.group-head .rule { flex: 1; height: 1px; background: #ffffff17; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.quest-card {
  background: var(--bg-card); border: 1px solid #ffffff14;
  border-radius: var(--radius-md); padding: 26px;
  position: relative; transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.quest-card:hover {
  background: var(--bg-card-hover);
  border-color: #ffffff22;
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
}
.quest-tag {
  font-family: var(--mono); font-size: .61rem; font-weight: 700;
  text-transform: uppercase; padding: 4px 11px; border-radius: 999px;
  display: inline-block; margin-bottom: 14px; letter-spacing: .04em;
}
.quest-tag.featured { background: var(--gold); color: #17142c; }
.quest-card h4 { font-family: var(--display); font-size: 1.12rem; margin-bottom: 10px; font-weight: 700; }
.quest-card p  { color: var(--text-dim); font-size: .9rem; margin-bottom: 18px; line-height: 1.65; }
.tech-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.tech-chip {
  font-family: var(--mono); font-size: .67rem; background: #ffffff0f;
  color: var(--text-dim); padding: 4px 10px; border-radius: 6px;
  border: 1px solid #ffffff0a;
}
.quest-links { display: flex; gap: 16px; flex-wrap: wrap; }
.quest-links a {
  font-family: var(--mono); font-size: .75rem; font-weight: 700; color: var(--gold);
  padding: 6px 14px; border-radius: 999px; border: 1px solid #ffc93c40;
  transition: var(--transition);
}
.quest-links a:hover { background: var(--gold-soft); border-color: var(--gold); }

/* ─── CONTACT ─────────────────────────────────────────────── */
.contact-section {
  text-align: center; padding: 60px 24px 80px;
  border-top: 1px solid #ffffff14;
}
.contact-section h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px;
}
.contact-section .sub { color: var(--text-dim); margin-bottom: 32px; font-size: .97rem; }

/* CONTACT FORM */
.contact-form {
  max-width: 520px; margin: 0 auto 36px;
  display: flex; flex-direction: column; gap: 14px; text-align: left;
}
.form-group label {
  display: block; font-family: var(--mono); font-size: .72rem;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px;
}
.form-group input,
.form-group textarea {
  width: 100%; background: var(--bg-card); border: 1px solid #ffffff14;
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--body); font-size: .94rem; padding: 12px 16px;
  transition: var(--transition); resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.btn-submit {
  font-family: var(--mono); font-weight: 700; font-size: .85rem;
  background: var(--gold); color: #17142c;
  padding: 13px 28px; border-radius: 999px; border: none; cursor: pointer;
  transition: var(--transition); align-self: flex-start;
}
.btn-submit:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 8px 24px #ffc93c35; }

.press-start {
  font-family: var(--mono); font-weight: 700; font-size: .85rem;
  background: transparent; color: var(--gold);
  padding: 12px 26px; border-radius: 999px;
  display: inline-block; border: 1px solid #ffc93c55;
  transition: var(--transition); margin-bottom: 28px;
}
.press-start:hover { background: var(--gold-soft); }

.socials { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.social-btn {
  width: 46px; height: 46px; border-radius: 50%; background: var(--bg-card);
  border: 1px solid #ffffff1a; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .73rem; font-weight: 700;
  transition: var(--transition);
}
.social-btn:hover { background: var(--bg-card-hover); border-color: #ffffff30; transform: translateY(-3px); }

/* ─── ALERTS (Flash) ──────────────────────────────────────── */
.alert-bar {
  padding: 14px 24px; border-radius: var(--radius-sm); margin: 16px auto;
  max-width: 760px; font-family: var(--mono); font-size: .82rem;
  display: flex; align-items: center; gap: 12px;
}
.alert-bar.success { background: #b4ff3920; border: 1px solid #b4ff3940; color: var(--android); }
.alert-bar.error   { background: #ff4fa320; border: 1px solid #ff4fa340; color: var(--game);    }

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
  text-align: center; padding: 28px; color: var(--text-dim);
  font-family: var(--mono); font-size: .72rem;
  border-top: 1px solid #ffffff0a;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero-inner     { grid-template-columns: 1fr; }
  .worlds-grid    { grid-template-columns: 1fr; }
  .project-grid   { grid-template-columns: 1fr; }
  .world-tabs     { display: none; }
  .avatar-frame   { width: 220px; height: 220px; }
  .hero-visual    { order: -1; padding: 16px; }
}
@media (max-width: 560px) {
  .skills-grid { flex-direction: column; }
  .stat-chips  { justify-content: center; }
  .hero h1     { text-align: center; }
  .hero .tagline { text-align: center; margin: 0 auto 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-frame::before, .floaty { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
