@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@100..900&display=swap');

/* ==========================================
   Custom Properties (replaces Tailwind @theme)
   ========================================== */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Bebas Neue", cursive;

  --color-game-bg: #0a0d12;
  --color-game-panel: #11151c;
  --color-game-accent: #00a2ff;
  --color-game-blue: #00d4ff;
  --color-game-text: #e1e7ed;
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Hide default cursor on mouse devices */
@media (pointer: fine) {
  * { cursor: none !important; }
}

body {
  background-color: var(--color-game-bg);
  color: var(--color-game-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 0.5s, background-color 0.5s;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 50% -20%, #151b26, transparent 50%),
    linear-gradient(rgba(0, 162, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 80px 80px, 80px 80px;
}

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

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* Lucide icon base style */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================
   Game Panel Component
   ========================================== */
.game-panel {
  position: relative;
  border: none;
  backdrop-filter: blur(24px);
  background: transparent !important;
  box-shadow: none !important;
  clip-path: polygon(
    0 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% 100%,
    15px 100%,
    0 calc(100% - 15px)
  );
  z-index: 1;
}

.game-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  z-index: -2;
  transition: background 0.3s ease;
}

.game-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: rgba(17, 21, 28, 0.85);
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
  z-index: -1;
  pointer-events: none;
}

.game-panel-interactive {
  cursor: pointer;
}

.game-panel-interactive:hover::before {
  background: rgba(0, 162, 255, 0.4) !important;
}

.game-panel-interactive:active::before {
  background: rgba(0, 162, 255, 1) !important;
}

/* ==========================================
   App Container
   ========================================== */
.app-container {
  min-height: 100vh;
  color: var(--color-game-text);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  position: relative;
}

@media (min-width: 768px) {
  .app-container { padding: 2rem; }
}

/* ==========================================
   Custom Cursor
   ========================================== */
#custom-cursor {
  display: none;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-game-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  mix-blend-mode: screen;
  transition: width 0.15s ease-out, height 0.15s ease-out, background-color 0.15s ease-out;
}

@media (min-width: 768px) {
  #custom-cursor { display: block; }
}

#custom-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--color-game-accent);
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

#custom-cursor.cursor-hover {
  width: 36px;
  height: 36px;
  background-color: rgba(0, 162, 255, 0.15);
}

/* ==========================================
   Particle Canvas
   ========================================== */
#particle-canvas {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: screen;
}

/* ==========================================
   Mobile Navigation Overlay
   ========================================== */
#mobile-nav {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: rgba(10, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  z-index: 60;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  #mobile-nav { display: none !important; }
}

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.mobile-nav-close:hover {
  background-color: rgba(0, 162, 255, 0.2);
}

@media (min-width: 768px) {
  .mobile-nav-close { top: 2rem; right: 2rem; }
}

.mobile-nav-close-icon {
  width: 1rem;
  height: 1rem;
  opacity: 0.4;
}

.mobile-nav-close:hover .mobile-nav-close-icon {
  opacity: 1;
  color: var(--color-game-accent);
}

.mobile-nav-link {
  font-size: 2.25rem;
  font-family: var(--font-display);
  font-style: italic;
  opacity: 0.4;
  transition: all 0.15s;
}

.mobile-nav-link:hover {
  opacity: 1;
  color: var(--color-game-accent);
}

.mobile-nav-link.active {
  opacity: 1;
  color: var(--color-game-accent);
  text-decoration: underline;
  text-underline-offset: 12px;
}

.mobile-nav-link.external {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav-link.external:hover {
  color: var(--color-game-blue);
}

.mobile-nav-link .icon-sm {
  width: 1.5rem;
  height: 1.5rem;
}

/* ==========================================
   Top Navigation Bar
   ========================================== */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  z-index: 10;
  width: 100%;
  position: relative;
}

/* Logo */
.nav-logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--color-game-accent);
  border-radius: 0.125rem;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.5rem;
}

.nav-logo-icon [data-lucide] {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
  transform: rotate(-45deg);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.025em;
}

.nav-subtitle {
  font-size: 10px;
  color: var(--color-game-accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Desktop nav links */
.nav-links-desktop {
  display: none;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 2rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

@media (min-width: 1024px) {
  .nav-links-desktop { display: flex; }
}

.nav-desktop-link {
  opacity: 0.4;
  text-transform: uppercase;
  text-underline-offset: 8px;
  font-style: italic;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-desktop-link:hover {
  color: var(--color-game-accent);
  opacity: 1;
  text-decoration: underline;
}

.nav-desktop-link.active {
  color: var(--color-game-accent);
  opacity: 1;
  text-decoration: underline;
}

.nav-desktop-link.external {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-desktop-link.external:hover {
  color: var(--color-game-blue);
}

.nav-desktop-link.external [data-lucide] {
  width: 0.75rem;
  height: 0.75rem;
}

/* Nav actions (clock, buttons) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#sys-clock {
  font-size: 0.875rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--color-game-accent);
  opacity: 0.8;
  letter-spacing: 0.1em;
  margin-right: 1rem;
  display: none;
}

@media (min-width: 768px) {
  #sys-clock { display: block; }
}

.nav-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.nav-icon-btn:hover {
  background-color: rgba(0, 162, 255, 0.2);
}

.nav-icon-btn [data-lucide] {
  width: 1rem;
  height: 1rem;
  opacity: 0.4;
}

.nav-icon-btn:hover [data-lucide] {
  opacity: 1;
  color: white;
}

#mobile-menu-btn {
  display: flex;
}

@media (min-width: 1024px) {
  #mobile-menu-btn { display: none; }
}

.notification-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  background-color: var(--color-game-accent);
  border-radius: 9999px;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ==========================================
   Main Content Grid
   ========================================== */
.main-grid {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  z-index: 10;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* ==========================================
   Sidebar (Profile)
   ========================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
  min-height: 0;
}

@media (min-width: 1024px) {
  .sidebar { grid-column: span 4; }
}

/* Profile Card */
.profile-card { padding: 0.5rem; }

.profile-image-wrapper {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(to bottom, #1f2937, var(--color-game-bg));
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2rem;
  opacity: 0.8;
  transition: transform 1s, opacity 1s;
  filter: drop-shadow(0 0 15px rgba(0, 162, 255, 0.3));
}

.profile-image-wrapper:hover .profile-image {
  transform: scale(1.05);
  opacity: 1;
}

.profile-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-game-bg), transparent, transparent);
}

.profile-info {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.8;
  font-style: italic;
  text-transform: uppercase;
}

.profile-name {
  font-size: 3rem;
  font-family: var(--font-display);
  line-height: 0.8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: -0.05em;
}

.profile-name .accent { color: var(--color-game-accent); }

.profile-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.4;
  font-style: italic;
}

.profile-badge-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-badge-item [data-lucide] {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--color-game-accent);
}

/* Specialization Section */
.spec-section {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 900;
  opacity: 0.3;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-style: italic;
}

.section-label [data-lucide] {
  width: 1rem;
  height: 1rem;
}

.section-label-line {
  flex-grow: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spec-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.spec-dot {
  margin-top: 0.375rem;
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background-color: var(--color-game-accent);
  opacity: 0.4;
  transition: all 0.15s;
}

.spec-item:hover .spec-dot {
  opacity: 1;
  box-shadow: 0 0 8px rgba(0, 162, 255, 0.8);
}

.spec-text {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.spec-item:hover .spec-text { opacity: 1; }

/* ==========================================
   Content Column
   ========================================== */
.content-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
  position: relative;
}

@media (min-width: 1024px) {
  .content-column { grid-column: span 8; }
}

/* ==========================================
   Page Views
   ========================================== */
.page-view {
  display: none;
  opacity: 0;
  animation: fadeUp 0.3s ease forwards;
}

.page-view.active { display: flex; }

/* view-home is flex-col with gap */
#view-home { flex-direction: column; gap: 2rem; }

/* ==========================================
   Metrics
   ========================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.metric-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.metric-value {
  font-size: 1.875rem;
  font-family: var(--font-display);
  transition: all 0.3s;
}

.metric-card:hover .metric-value { transform: scale(1.1); }

.metric-value.accent { color: var(--color-game-accent); }
.metric-card:hover .metric-value.accent {
  filter: drop-shadow(0 0 8px rgba(0, 162, 255, 0.8));
}

.metric-value.blue { color: var(--color-game-blue); }
.metric-card:hover .metric-value.blue {
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8));
}

.metric-value.white { color: white; }
.metric-card:hover .metric-value.white {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.metric-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.3;
  font-style: italic;
  margin-top: 0.5rem;
  transition: all 0.15s;
}

.metric-card:hover .metric-label {
  opacity: 1;
  color: white;
}

/* ==========================================
   Feed Grid (Projects & Links columns)
   ========================================== */
.feed-grid {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  min-height: 0;
}

@media (min-width: 768px) {
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.feed-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
}

.feed-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-style: italic;
}

.feed-section-header [data-lucide] {
  width: 1rem;
  height: 1rem;
  opacity: 0.2;
}

/* ==========================================
   Item Card (shared by Project & Link cards)
   ========================================== */
.item-card {
  padding: 1rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  transition: color 0.15s, background-color 0.15s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .item-card { padding: 1.25rem; }
}

.item-card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .item-card-content { gap: 1.5rem; }
}

.item-card-icon {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}

.item-card:hover .item-card-icon {
  background: rgba(0, 162, 255, 0.1);
}

.item-card-icon [data-lucide] {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.2;
}

.item-card:hover .item-card-icon [data-lucide] {
  opacity: 1;
  color: var(--color-game-accent);
}

.item-card-icon .project-img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  opacity: 1;
  transform: scale(1.3);
  transition: transform 0.15s;
}

.item-card:hover .item-card-icon .project-img {
  transform: scale(1.45);
}

.item-card-info { min-width: 0; }

.item-card-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--color-game-accent);
  opacity: 0.4;
  margin-bottom: 0.25rem;
  font-style: italic;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-card-status {
  font-size: 10px;
  flex-shrink: 0;
  font-weight: 700;
  opacity: 0.2;
  font-style: italic;
  text-align: right;
  transition: opacity 0.15s;
}

.item-card:hover .item-card-status { opacity: 1; }

/* Link card specializations (sortable) */
.link-card {
  cursor: grab;
  user-select: none;
}

.link-card:active { cursor: grabbing; }

.link-card .item-card-content { pointer-events: none; }

.link-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  opacity: 0.2;
  transition: opacity 0.15s;
  pointer-events: none;
}

.item-card:hover .link-card-actions { opacity: 1; }

.link-card-label {
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  text-align: right;
  display: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 640px) {
  .link-card-label { display: block; }
}

.link-card-actions [data-lucide] {
  width: 1rem;
  height: 1rem;
  opacity: 0.5;
}

/* ==========================================
   About Page
   ========================================== */
#view-about { flex-direction: column; gap: 1.5rem; }

.about-panel {
  padding: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .about-panel { padding: 3rem; }
}

.about-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0.7;
  line-height: 1.625;
  font-weight: 500;
}

.about-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .about-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.about-info-card {
  padding: 1.5rem;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.about-info-card:hover { opacity: 1; }

.about-info-card h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-info-card p { font-size: 0.875rem; }

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 3rem;
  z-index: 10;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-email {
  text-align: right;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-game-accent);
  opacity: 0.7;
}

.footer-cta {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 162, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  cursor: pointer;
  transition: all 0.15s;
  animation: float 4s ease-in-out infinite;
}

.footer-cta:hover { border-color: var(--color-game-accent); }

.footer-cta-inner {
  width: 100%;
  height: 100%;
  background-color: var(--color-game-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.footer-cta-inner [data-lucide] {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
}

/* ==========================================
   Toast Notifications
   ========================================== */
#toast-container {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 21, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid var(--color-game-accent);
  color: var(--color-game-text);
  padding: 12px 24px;
  font-family: monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             toastOut 0.3s ease 2.7s forwards;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateY(15px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
