:root {
  --bg: #fbfaf7;
  --fg: #1a1a1a;
  --muted: #8a8a85;
  --rule: #e5e3dd;
  --link: #1a1a1a;
  --link-hover: #b35a00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --fg: #ededeb;
    --muted: #6f6f6a;
    --rule: #28282633;
    --link: #ededeb;
    --link-hover: #ffb066;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

main {
  flex: 0 0 auto;
  max-width: 440px;
  width: 100%;
  padding: 5rem 2rem 5rem 4rem;
  background: var(--bg);
  box-shadow: none;
  position: relative;
  z-index: 2;
  min-height: 100vh;
  transition: box-shadow 0.3s ease;
}

body.has-content main {
  box-shadow: 16px 0 48px -8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 859px) {
  body { display: block; }
  main { padding: 4rem 1.5rem; max-width: 100%; }
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 2rem;
  filter: grayscale(20%);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.avatar:hover {
  filter: grayscale(0%);
}

.avatar:active {
  transform: scale(0.98);
}

h1 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.15rem;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}

body.has-content #reset-title {
  cursor: pointer;
}

body.has-content #reset-title:hover {
  color: var(--link-hover);
}

.role {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 2.5rem 0 0;
  color: var(--fg);
}

h2 + p, h2 + ul {
  margin-top: 0.25rem;
}

p {
  margin: 0 0 1rem;
  color: var(--fg);
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  color: var(--muted);
  margin: 0;
}

::selection {
  background: #ffe2bd;
  color: #1a1a1a;
}

/* ----- Projects list ----- */

.projects {
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects li { margin: 0; }

.project-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0 0.6rem 1.1rem;
  border: none;
  text-decoration: none;
  color: var(--fg);
  position: relative;
  transition: color 0.15s ease;
}

.project-favicon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.project-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Socials list */
.socials {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.socials li { margin: 0; }

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border: none;
  color: var(--fg);
  font-size: 0.95rem;
}

.socials a:hover {
  color: var(--link-hover);
}

.social-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s ease;
}

.socials a:hover .social-icon {
  color: var(--link-hover);
}

.project-btn::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.project-btn:hover::before { opacity: 1; transform: translateX(0); }
.project-btn:hover .project-name { color: var(--link-hover); }

.project-btn.active::before {
  opacity: 1;
  transform: translateX(0);
  color: var(--link-hover);
}

.project-btn.active .project-name { color: var(--link-hover); }

.project-name { transition: color 0.15s ease; }

/* ----- Right viewer pane ----- */

.viewer {
  flex: 1 1 auto;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  padding: 0;
  min-width: 0;
  z-index: 1;
}

.viewer-frame-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.viewer { background: var(--bg); }

#viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
  color-scheme: normal;
}

.viewer-empty {
  position: absolute;
  inset: 0;
}

.viewer-card-wrap {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 2.5rem;
}

@media (max-width: 859px) {
  .viewer { display: none; }
}

/* ----- Card content ----- */

.display-card {
  animation: fadeIn 0.35s ease;
  max-width: 420px;
}

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

.display-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.hero-frisson {
  background:
    radial-gradient(circle at 20% 20%, #ffb066 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, #b35a00 0%, transparent 60%),
    linear-gradient(135deg, #2a1a0d, #4a2410);
}

.hero-chilly {
  background:
    radial-gradient(circle at 70% 30%, #5a8aff 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, #1a3a7a 0%, transparent 60%),
    linear-gradient(135deg, #0f1828, #1a2440);
}

.hero-openempires {
  background:
    radial-gradient(circle at 25% 25%, #a8d97a 0%, transparent 55%),
    radial-gradient(circle at 75% 75%, #3a6b1f 0%, transparent 60%),
    linear-gradient(135deg, #1a2a10, #2a4015);
}

.hero-twitter {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f);
}

.hero-tiktok {
  background:
    radial-gradient(circle at 30% 30%, #ff0050 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, #00f2ea 0%, transparent 55%),
    linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

.hero-linkedin {
  background: linear-gradient(135deg, #0a3a6b, #0077b5);
}

.hero-blocked {
  background: linear-gradient(135deg, #3a3a36, #5a5a52);
}

.hero-mark {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.display-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
}

.display-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.display-card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.display-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.92rem;
}
