/* =====================
   Google Fonts - Syne + Inter
   ===================== */
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap");

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

/* =====================
   Variáveis — Light Mode
   ===================== */
:root {
  --primary: #6366f1;
  --accent: #f43f5e;
  --accent-hover: #06b6d4;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(180, 190, 220, 0.4);

  --fg: #0f172a;
  --fg-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;

  --shadow-neumorph:
    -6px -6px 14px rgba(255, 255, 255, 0.8),
     6px  6px 14px rgba(0, 0, 0, 0.07);
  --shadow-neumorph-hover:
    -4px -4px 10px rgba(255, 255, 255, 0.9),
     4px  4px 10px rgba(0, 0, 0, 0.12);

  --reveal-a: #00eaff;
  --reveal-b: #a259ff;

  --font-base: 'Syne', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
}

/* =====================
   Dark Mode
   ===================== */
[data-theme="dark"] {
  --glass-bg: rgba(40, 42, 54, 0.82);
  --glass-border: #44475a;

  --fg: #f8f8f2;          
  --fg-secondary: #b0b3c6; 
  --muted: #6272a4;        
  --muted-light: #44475a;  

  --shadow-neumorph:
    -4px -4px 14px rgba(0, 0, 0, 0.4),
     4px  4px 16px rgba(0, 0, 0, 0.55);
  --shadow-neumorph-hover:
    -3px -3px 10px rgba(0, 0, 0, 0.45),
     3px  3px 12px rgba(0, 0, 0, 0.65);

  --reveal-a: #8be9fd;
  --reveal-b: #ff79c6;

  --platform-color-dark: #50fa7b;
}

/* =====================
   Backgrounds
   ===================== */

body {
  background:
    radial-gradient(ellipse 65% 50% at 65% 25%, rgba(180, 195, 255, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 15% 80%, rgba(200, 175, 255, 0.35) 0%, transparent 50%),
    linear-gradient(155deg, #eaeff8 0%, #e2e8f6 40%, #ebe5f8 100%);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%,  rgba(80, 93, 140, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 85%,  rgba(160, 120, 220, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse 40% 35% at 60% 50%,  rgba(110, 200, 225, 0.05) 0%, transparent 50%),
    linear-gradient(170deg, #1b1d2b 0%, #242631 45%, #1e1e28 100%);
  background-attachment: fixed;
}

/* =====================
   GRID DE FUNDO 
   ===================== */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-image:
    linear-gradient(rgba(100, 116, 180, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 180, 0.02) 1px, transparent 1px);
  background-size: 52px 52px;
  transition: background-image 0.6s ease;
}

body:hover::before {
  background-image:
    linear-gradient(rgba(100, 116, 180, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 180, 0.07) 1px, transparent 1px);
  background-size: 52px 52px;
}

[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(98, 114, 164, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 114, 164, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
}

[data-theme="dark"] body:hover::before {
  background-image:
    linear-gradient(rgba(98, 114, 164, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 114, 164, 0.13) 1px, transparent 1px);
  background-size: 52px 52px;
}

.wrapper {
  position: relative;
  z-index: 1;
}

/* =====================
   Body base
   ===================== */
body {
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

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

/* =====================
   Wrapper
   ===================== */
.wrapper {
  width: 100%;
  max-width: 617px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =====================
   Main Block
   ===================== */
.main-block {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.75) 0%, rgba(235,240,255,0.6) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-neumorph);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

[data-theme="dark"] .main-block {
  background:
    linear-gradient(150deg, rgba(34, 36, 48, 0.95) 0%, rgba(27, 28, 38, 0.92) 100%);
  border-color: #3a3d50;
}

/* =====================
   Header
   ===================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-family: var(--font-display); 
  transition: color 0.3s ease;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

nav a:hover { color: var(--accent); }
nav a:hover::after { transform: scaleX(1); }

/* =====================
   Theme Toggle
   ===================== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.15);
}

.theme-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  transition: filter 0.3s ease, opacity 0.2s ease;
  opacity: 0.8;
 
  filter: invert(38%) sepia(90%) saturate(600%) hue-rotate(195deg) brightness(0.95) contrast(1.1);
}

[data-theme="dark"] .theme-icon {
 
  filter: invert(90%) sepia(50%) saturate(700%) hue-rotate(345deg) brightness(1.05);
  opacity: 0.9;
}

.theme-toggle:hover .theme-icon { opacity: 1; }

/* =====================
   Bio
   ===================== */
.bio-section {
  font-size: 0.875rem;
  color: var(--fg-secondary);
  line-height: 1.55;
  transition: color 0.3s ease;
}

/* =====================
   Links
   ===================== */
.links-section { width: 100%; }

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-neumorph);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Light card items */
.link-item {
  background: linear-gradient(120deg, rgba(255,255,255,0.7) 0%, rgba(230,235,255,0.55) 100%);
}

[data-theme="dark"] .link-item {
  background: linear-gradient(120deg, rgba(38,40,54,0.90) 0%, rgba(30,32,44,0.82) 100%);
  border-color: #3a3d50;
}

/* Shine */
.link-item::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.6s ease;
}
.link-item:hover::before { left: 100%; }

/* =====================
   Ícones
   ===================== */
.link-icon {
  width: 22px; height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  transition: width 0.2s, height 0.2s, transform 0.2s, filter 0.2s;
}

.link-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex: 1;
  text-transform: lowercase;
  color: var(--fg);
  transition: color 0.2s;
}

.link-arrow {
  color: var(--muted-light);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Hover Light */
.link-item:hover {
  border-color: var(--platform-color);
  box-shadow: var(--shadow-neumorph-hover);
}

.link-item:hover .link-icon {
  width: 26px; height: 26px;
  transform: scale(1.1) rotate(-3deg);
  filter: none; 
}

.link-item:hover .link-name  { color: var(--platform-color); }
.link-item:hover .link-arrow {
  color: var(--platform-color);
  opacity: 1;
  transform: translateX(0);
}

[data-theme="dark"] .link-item:hover {
  border-color: #50fa7b;
  box-shadow: var(--shadow-neumorph-hover), 0 0 16px rgba(80, 250, 123, 0.18);
}

[data-theme="dark"] .link-item:hover .link-icon {
  filter: drop-shadow(0 0 5px #50fa7b) brightness(1.1);
}

[data-theme="dark"] .link-item:hover .link-name  { color: #50fa7b; }
[data-theme="dark"] .link-item:hover .link-arrow { color: #50fa7b; }

.link-item[data-platform="behance"]   { --platform-color: #1769FF; }
.link-item[data-platform="instagram"] { --platform-color: #E1306C; }
.link-item[data-platform="bluesky"]   { --platform-color: #0085FF; }
.link-item[data-platform="spotify"]   { --platform-color: #1DB954; }
.link-item[data-platform="lastfm"]    { --platform-color: #D51007; }
.link-item[data-platform="github"]    { --platform-color: #24292F; }
[data-theme="dark"] .link-item[data-platform="github"] { --platform-color: #50fa7b; }
.link-item[data-platform="linkedin"]  { --platform-color: #0A66C2; }

/* =====================
   Footer
   ===================== */
footer {
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-family: var(--font-base);
}

footer a {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

footer a:hover { color: var(--accent); }
footer a:hover::after { transform: scaleX(1); }

/* =====================
   Responsividade
   ===================== */
@media (max-width: 640px) {
  body { padding: 0.5rem; }
  .main-block { padding: 1rem; }
  header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .brand h1 { font-size: 1.2rem; }
  .link-item { padding: 0.875rem 1rem; }
}

/* ======================================
   BLOCK REVEAL — pure CSS
   ====================================== */
.reveal-wrap {
  --td: 0.7s;
  --d:  0s;
  --bc: linear-gradient(90deg, var(--reveal-a), var(--reveal-b));
  --t:  calc(var(--td) + var(--d));

  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 2px 0;
  color: transparent;
  animation: revealBlock 0s var(--t) forwards;
}

.reveal-wrap::after {
  content: '';
  width: 0%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  background: var(--bc);
  animation:
    revealingIn  var(--td) var(--d) forwards,
    revealingOut var(--td) var(--t) forwards;
}

.reveal-wrap .reveal-text { display: inline; }

.brand .reveal-wrap       { --d: 0.2s;  --td: 0.8s;  }
.bio-section .reveal-wrap { --d: 1.15s; --td: 0.65s; }

@keyframes revealBlock {
  100% { color: inherit; }
}
@keyframes revealingIn {
  0%   { width: 0%; }
  100% { width: 100%; }
}
@keyframes revealingOut {
  0%   { transform: translateX(0); }
  100% { transform: translateX(101%); }
}