/* ═══════════════════════════════════════════════
   Hermes Dashboard Style — ØYNN Personal Space
   ═══════════════════════════════════════════════ */

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

/* ── Font Faces (Nous DS) ── */
@font-face {
  font-family: 'RulesExpanded';
  src: url('./fonts/RulesExpanded-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RulesExpanded';
  src: url('./fonts/RulesExpanded-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RulesCompressed';
  src: url('./fonts/RulesCompressed-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RulesCompressed';
  src: url('./fonts/RulesCompressed-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mondwest';
  src: url('./fonts/Mondwest-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neuebit';
  src: url('./fonts/Neuebit-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}



:root {
  --background-base: #041c1c;
  --midground-base: #ffe6cb;
  --midground: color-mix(in srgb, #ffe6cb 100%, transparent);
  --warm-glow: rgba(255, 189, 56, 0.35);

  --color-foreground: var(--midground);
  --color-card: color-mix(in srgb, var(--midground-base) 4%, var(--background-base));
  --color-card-foreground: var(--midground);
  --color-secondary: color-mix(in srgb, var(--midground-base) 6%, var(--background-base));
  --color-muted-foreground: color-mix(in srgb, var(--midground-base) 55%, transparent);
  --color-accent: color-mix(in srgb, var(--midground-base) 10%, var(--background-base));
  --color-border: color-mix(in srgb, var(--midground-base) 15%, transparent);
  --color-success: #4ade80;
  --color-warning: #ffbd38;
  --color-destructive: #fb2c36;
  --color-ring: var(--midground);

  --radius: 0.5rem;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --font-expanded: 'RulesExpanded', var(--font-sans);
  --font-compressed: 'RulesCompressed', var(--font-sans);
  --font-mondwest: 'Mondwest', var(--font-sans);
  --font-neuebit: 'Neuebit', var(--font-sans);
  --font-courier: 'Courier New', var(--font-mono), monospace;
}

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  height: 100dvh;
  overflow: hidden;
}

body {
  background: var(--background-base);
  color: var(--color-foreground);
  height: 100%;
  overflow: hidden;
}


/* ── Theme: Midnight ── */
[data-theme="midnight"] {
  --background-base: #0a0a1f;
  --midground-base: #d4c8ff;
  --warm-glow: rgba(139, 92, 246, 0.5);
}

/* ── Theme: Ember ── */
[data-theme="ember"] {
  --background-base: #1a0a06;
  --midground-base: #ffd8b0;
  --warm-glow: rgba(234, 88, 12, 0.55);
}

/* ── Theme: Mono ── */
[data-theme="mono"] {
  --background-base: #0e0e0e;
  --midground-base: #eaeaea;
  --warm-glow: rgba(200, 200, 200, 0.2);
  --radius: 0;
}

/* ── Theme: Cyberpunk ── */
[data-theme="cyberpunk"] {
  --background-base: #040608;
  --midground-base: #9bffcf;
  --warm-glow: rgba(0, 255, 136, 0.4);
  --radius: 0;
}

/* ── Theme: Rosé ── */
[data-theme="rose"] {
  --background-base: #1a0f15;
  --midground-base: #ffd4e1;
  --warm-glow: rgba(236, 72, 153, 0.45);
  --radius: 1rem;
}

/* ── Backdrop ── */
.backdrop-base {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-color: var(--background-base);
  mix-blend-mode: difference;
}

.backdrop-filler {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0.033;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' seed='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23f)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.backdrop-glow {
  position: fixed; inset: 0; z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 0% 0%, transparent 60%, var(--warm-glow) 100%);
  opacity: 0.22;
  mix-blend-mode: lighten;
}

.backdrop-noise {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: color-dodge;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

::selection {
  background: color-mix(in srgb, var(--midground-base) 30%, transparent);
  color: var(--background-base);
}

/* ── Shell ── */
.shell {
  position: relative; z-index: 3;
  display: flex; flex-direction: column;
  height: 100dvh;
}

/* ── Header ── */
.header {
  height: 56px; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--background-base) 80%, transparent);
  backdrop-filter: blur(12px);
}

.header-brand {
  font-family: var(--font-expanded);
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-muted-foreground);
}

.header-brand strong { color: var(--color-foreground); }

.header-version {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-muted-foreground);
  letter-spacing: 0.08em;
}

/* ── Page ── */
.page {
  flex: 1; padding: 40px 32px;
  overflow-y: auto; min-width: 0;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) { .page { padding: 48px 40px; } }

/* ── Profile ── */
.profile { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }

.profile-head { display: flex; align-items: flex-start; gap: 20px; }

.profile-avatar {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
  color: var(--color-foreground);
  flex-shrink: 0;
}

.profile-info { display: flex; flex-direction: column; gap: 4px; }

.profile-name {
  font-family: var(--font-expanded);
  font-size: 1.3rem; font-weight: 700;
  color: var(--color-foreground);
}

.profile-bio {
  font-family: var(--font-mondwest);
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
  line-height: 1.55;
  margin: 0;
}

/* ── Profile Inline Elements ── */
.profile-username {
  font-family: var(--font-mondwest);
  font-weight: 400;
  font-size: 0.7em;
  color: var(--color-muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}

.profile-username:hover { color: var(--color-foreground); }


/* ── Skills ── */
/* ── Section Label ── */
.section-label {
  font-family: var(--font-expanded);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-muted-foreground);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}

.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--color-border);
}

/* ── Projects ── */
.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

.card {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--midground-base) 25%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--midground-base) 8%, transparent),
              0 4px 24px -8px rgba(0, 0, 0, 0.3);
}

.card:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.card-recommended {
  border-color: color-mix(in srgb, #ffd700 55%, var(--color-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffd700 35%, transparent),
              0 0 14px color-mix(in srgb, #ffd700 28%, transparent);
}

.card-recommended .card-title {
  color: color-mix(in srgb, #ffd700 78%, var(--color-foreground));
  text-shadow: 0 0 8px color-mix(in srgb, #ffd700 45%, transparent);
}

.card-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.card-title {
  font-family: var(--font-expanded);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-foreground);
  display: flex; align-items: center; gap: 8px;
}

.card-stars {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-warning);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.card-body { padding: 14px 18px 18px; }

.card-desc {
  font-family: var(--font-mondwest);
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
  line-height: 1.55;
  margin-bottom: 12px;
}

/* ── Card Warning ── */
.card-warning {
  margin-top: 10px;
  font-family: var(--font-mondwest);
  font-size: 0.65rem;
  color: var(--color-destructive);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

/* ── Tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-family: var(--font-mondwest);
  font-size: 0.55rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--color-muted-foreground);
  background: var(--color-secondary);
}

.tag-platform {
  color: var(--color-foreground);
  border-color: color-mix(in srgb, var(--midground-base) 20%, transparent);
}

.tag-green {
  color: var(--color-success);
  border-color: color-mix(in srgb, #4ade80 25%, transparent);
}

.tag-license {
  color: var(--color-warning);
  border-color: color-mix(in srgb, #ffbd38 25%, transparent);
}

/* ── Theme Switcher ── */
.header-right {
  display: flex; align-items: center; gap: 12px;
}

.theme-switcher { position: relative; }

.theme-btn {
  background: none; border: none; cursor: pointer;
  color: var(--color-muted-foreground);
  padding: 4px; line-height: 1;
  display: flex; align-items: center;
  transition: color 0.15s;
}

.theme-btn:hover { color: var(--color-foreground); }

.theme-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.4);
  padding: 4px;
  z-index: 100;
  animation: dialog-in 120ms ease-out;
}

.theme-dropdown.open { display: block; }

.theme-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: none; border: none; cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--color-muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.12s, color 0.12s;
}

.theme-option:hover {
  background: var(--color-accent);
  color: var(--color-foreground);
}

.theme-option.active {
  background: var(--color-secondary);
  color: var(--color-foreground);
}

.theme-swatch:nth-child(2) {
  display: none;
}

.theme-swatch {
  width: 12px; height: 12px;
  border-radius: 2px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  height: 44px; min-height: 44px;
  padding: 0 32px;
  border-top: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mondwest);
  font-size: 0.65rem;
  color: var(--color-muted-foreground);
  opacity: 0.7;
}

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fade-in 150ms ease-out;
}

.modal-box {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-width: 420px; width: 90%;
  box-shadow: 0 8px 40px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: dialog-in 180ms ease-out;
}

.modal-box-inner { padding: 24px; }

.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  color: var(--color-muted-foreground);
  font-size: 1.1rem; cursor: pointer;
  padding: 4px; line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--color-destructive); }

.modal-title {
  font-family: var(--font-expanded);
  font-size: 0.85rem; font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.modal-link-list { display: flex; flex-direction: column; gap: 8px; }

.modal-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--color-muted-foreground);
  text-decoration: none; font-family: var(--font-mondwest); font-size: 0.8rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: color-mix(in srgb, var(--midground-base) 2%, var(--background-base));
}

.modal-link:hover {
  background: var(--color-accent);
  border-color: color-mix(in srgb, var(--midground-base) 25%, transparent);
  color: var(--color-foreground);
}

.modal-link .link-icon {
  display: flex; align-items: center; flex-shrink: 0;
  width: 16px; height: 16px; margin-right: 8px;
  opacity: 0.6; transition: opacity 0.15s;
}
.modal-link:hover .link-icon { opacity: 1; }
.modal-link .link-arrow { opacity: 0.5; transition: opacity 0.15s; }
.modal-link:hover .link-arrow { opacity: 1; }

/* ── Animations ── */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .page > * {
    animation: rise-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  .page > *:nth-child(1) { animation-delay: 0.04s; }
  .page > *:nth-child(2) { animation-delay: 0.08s; }
  .page > *:nth-child(3) { animation-delay: 0.12s; }
  .page > *:nth-child(4) { animation-delay: 0.16s; }
  .page > *:nth-child(5) { animation-delay: 0.20s; }
}

@media (prefers-reduced-motion: reduce) {
  .page > * { animation: none !important; }
  .modal-box { animation: none !important; }
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .page { padding: 24px 20px; }
  .header { padding: 0 20px; }
  .footer { padding: 0 20px; }
  .profile-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
  .profile-name { font-size: 1.1rem; }
}
