/* =============================================
   MY WORKSPACE PORTAL — portal.css
   ============================================= */

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

body {
  min-height: 100vh;
  background: #0f1a30;
  font-family: 'Barlow', sans-serif;
  color: #f0f4ff;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(58,107,196,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,177,64,0.1) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}

/* ── VIEWS ── */
#home-view, #peak-view { position: relative; z-index: 1; }

#arsenal-view {
  position: fixed; inset: 0; z-index: 999;
  display: none; flex-direction: column;
  background: #0d0f14;
}

/* ── HOME ── */
#home-view {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 60px 20px; gap: 32px;
}

.ws-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #f0f4ff;
  text-align: center; opacity: 0.92;
}

.tiles {
  display: flex; gap: 24px;
  flex-wrap: wrap; justify-content: center;
}

.tile {
  width: 260px; height: 200px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s, box-shadow 0.3s;
}

.tile::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.3s; border-radius: 16px;
}
.tile.peak::before   { background: radial-gradient(ellipse at center, rgba(58,107,196,0.2), transparent 70%); }
.tile.arsenal::before { background: radial-gradient(ellipse at center, rgba(0,177,64,0.15), transparent 70%); }
.tile.ascend::before  { background: radial-gradient(ellipse at center, rgba(0,177,64,0.15), transparent 70%); }

.tile:hover { transform: translateY(-6px) scale(1.02); }
.tile:hover::before { opacity: 1; }
.tile.peak:hover    { border-color: rgba(79,134,232,0.5); box-shadow: 0 20px 60px rgba(58,107,196,0.25); }
.tile.arsenal:hover,
.tile.ascend:hover  { border-color: rgba(0,177,64,0.4);   box-shadow: 0 20px 60px rgba(0,177,64,0.2); }

.tile img { position: relative; z-index: 1; object-fit: contain; transition: filter 0.3s; }
.tile.peak   img { width: 200px; filter: drop-shadow(0 4px 20px rgba(58,107,196,0.4)); }
.tile.peak:hover img { filter: drop-shadow(0 8px 30px rgba(79,134,232,0.6)); }
.tile.arsenal img { width: 210px; filter: drop-shadow(0 4px 20px rgba(0,177,64,0.3)); }
.tile.arsenal:hover img { filter: drop-shadow(0 8px 30px rgba(0,177,64,0.5)); }

.ascend-wrap { position: relative; z-index: 1; padding: 20px; }
.ascend-wrap svg { width: 200px; height: auto; filter: drop-shadow(0 4px 20px rgba(0,177,64,0.35)); transition: filter 0.3s; }
.tile.ascend:hover .ascend-wrap svg { filter: drop-shadow(0 8px 30px rgba(0,177,64,0.55)); }

/* ── PEAK VIEW ── */
#peak-view {
  display: none; padding: 40px;
  max-width: 1200px; margin: 0 auto;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; padding-top: 20px; }

.back-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #c8d0e0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.2s; flex-shrink: 0;
}
.back-btn:hover { background: rgba(255,255,255,0.1); color: #f0f4ff; }

.view-logo img { height: 56px; object-fit: contain; }

.links-section { margin-bottom: 36px; }

.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: #4f86e8; opacity: 0.7;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(79,134,232,0.15);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.link-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  text-decoration: none; color: #f0f4ff;
  transition: all 0.2s ease; position: relative; overflow: hidden;
}
.link-tile::after {
  content: ''; position: absolute; left: 0; top: 0;
  height: 100%; width: 3px; background: #4f86e8;
  opacity: 0; transition: opacity 0.2s;
}
.link-tile:hover { background: rgba(79,134,232,0.1); border-color: rgba(79,134,232,0.35); transform: translateX(3px); }
.link-tile:hover::after { opacity: 1; }

.link-icon { width: 34px; height: 34px; border-radius: 8px; background: rgba(79,134,232,0.15); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.link-name { font-size: 14px; font-weight: 600; }
.link-desc { font-size: 11px; color: #c8d0e0; opacity: 0.5; margin-top: 2px; }
.link-arrow { font-size: 12px; color: #4f86e8; opacity: 0; transition: opacity 0.2s, transform 0.2s; margin-left: auto; flex-shrink: 0; }
.link-tile:hover .link-arrow { opacity: 0.7; transform: translateX(3px); }

.quick-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  text-decoration: none; color: #f0f4ff;
  font-size: 13px; font-weight: 500; transition: all 0.2s;
}
.quick-link:hover { background: rgba(79,134,232,0.12); border-color: rgba(79,134,232,0.4); }

/* ── ARSENAL HEADER BAR ── */
.arsenal-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: #161a22;
  border-bottom: 1px solid #2a3040; flex-shrink: 0;
}
.arsenal-bar .back-btn {
  background: #1e2430; border-color: #2a3040; color: #7a8499;
}
.arsenal-bar .back-btn:hover { color: #e8ecf5; background: #2a3040; }
.arsenal-bar-title {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: #4f8ef7;
  letter-spacing: 2px; text-transform: uppercase;
}

#arsenal-content { flex: 1; overflow-y: auto; }


/* =============================================
   MOBILE RESPONSIVE — portal.css
   ============================================= */

/* Touch devices: show arrows always, remove hover-only transforms */
@media (hover: none) {
  .link-tile:hover { transform: none; }
  .link-arrow { opacity: 0.5; }
  .tile:hover { transform: none; }
  .tile:hover::before { opacity: 0; }
  .tile:active { transform: scale(0.97); }
  .tile:active::before { opacity: 1; }
  .link-tile:active { background: rgba(79,134,232,0.1); border-color: rgba(79,134,232,0.35); }
}

/* Tablets and small desktops */
@media (max-width: 768px) {
  #home-view { padding: 40px 16px; gap: 24px; }

  .ws-title { letter-spacing: 0.06em; }

  .tiles { gap: 16px; }

  .tile { width: 160px; height: 130px; border-radius: 14px; }
  .tile.peak img { width: 130px; }
  .tile.arsenal img { width: 140px; }
  .ascend-wrap svg { width: 130px; }
  .ascend-wrap { padding: 12px; }

  #peak-view { padding: 20px 16px; }
  .view-header { margin-bottom: 24px; padding-top: 12px; gap: 14px; }
  .view-logo img { height: 44px; }

  .links-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  .quick-row { gap: 8px; }
  .quick-link { padding: 9px 13px; font-size: 12px; }

  .link-tile { padding: 12px 12px; gap: 10px; }
  .link-icon { width: 30px; height: 30px; font-size: 14px; }
  .link-name { font-size: 13px; }
  .link-desc { font-size: 10px; }

  .links-section { margin-bottom: 28px; }

  .arsenal-bar { padding: 10px 14px; gap: 10px; }
  .arsenal-bar-title { font-size: 10px; letter-spacing: 1.5px; }
}

/* Mobile phones */
@media (max-width: 480px) {
  #home-view { padding: 32px 14px; gap: 20px; }

  .tiles { gap: 12px; }

  /* Stack tiles in a 1-column layout on very small screens */
  .tile {
    width: calc(50vw - 20px);
    height: 120px;
    min-width: 130px;
    max-width: 180px;
  }
  .tile.peak img { width: min(120px, 70%); }
  .tile.arsenal img { width: min(130px, 75%); }
  .ascend-wrap svg { width: min(120px, 70%); }

  #peak-view { padding: 16px 14px; }
  .view-header { gap: 12px; margin-bottom: 20px; }
  .view-logo img { height: 38px; }
  .back-btn { width: 36px; height: 36px; font-size: 16px; }

  .links-grid { grid-template-columns: 1fr; gap: 8px; }

  .quick-row { flex-direction: column; gap: 8px; }
  .quick-link { width: 100%; justify-content: flex-start; padding: 11px 14px; font-size: 13px; border-radius: 10px; }

  .link-tile { padding: 13px 14px; }
  .link-arrow { opacity: 0.5; }

  .section-label { font-size: 9px; letter-spacing: 0.25em; }

  .arsenal-bar-title { display: none; }
}

/* Very small phones */
@media (max-width: 360px) {
  .tile {
    width: calc(50vw - 16px);
    height: 110px;
  }
  .tiles { gap: 10px; }
  #home-view { padding: 24px 12px; }
}
