html {
  color-scheme: dark;
  scroll-behavior: smooth;
  --bg: #090b0f;
  --surface: #12151c;
  --surface-hover: #181c26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f5;
  --muted: #8a919c;
  --accent: #34d399;
  --accent-dim: rgba(52, 211, 153, 0.15);
  --radius: 12px;
  --max: 1080px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font-body);
  --header-bg: rgba(9, 11, 15, 0.78);
  --contact-grad-end: rgba(18, 21, 28, 0.6);
  --noise-opacity: 0.035;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #e8eef4;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #059669;
  --accent-dim: rgba(5, 150, 105, 0.14);
  --header-bg: rgba(255, 255, 255, 0.92);
  --contact-grad-end: rgba(226, 232, 240, 0.95);
  --noise-opacity: 0.018;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--noise-opacity);
  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)'/%3E%3C/svg%3E");
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 96px;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.theme-toggle {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.theme-toggle:hover {
  border-color: rgba(52, 211, 153, 0.35);
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(5, 150, 105, 0.35);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

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

.btn-primary {
  background: var(--accent);
  color: #042f2e;
}

.btn-primary:hover {
  background: #4ade80;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(15, 23, 42, 0.12);
}

.hero {
  padding: 72px 0 56px;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 36em;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 520px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stats div {
  font-size: 0.8125rem;
}

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 4px;
}

.hero-stats span {
  color: var(--muted);
}

@media (max-width: 520px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

section {
  margin-bottom: 88px;
}

.section-head {
  margin-bottom: 32px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--muted);
  max-width: 42em;
}

.about-text {
  color: var(--muted);
  max-width: 42em;
  font-size: 1.05rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.skill-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.skill-pill:hover {
  background: var(--surface-hover);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(52, 211, 153, 0.25);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.08);
}

html[data-theme="light"] .card:hover {
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.08);
}

html[data-theme="light"] .skill-pill {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="light"] .skill-pill:hover {
  background: var(--surface-hover);
}

html[data-theme="light"] .card-tags span {
  border-color: rgba(5, 150, 105, 0.22);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.card-code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 14px;
  opacity: 0.9;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card-tags span {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.card li {
  padding-left: 0;
  margin-bottom: 8px;
  padding-left: 1em;
  text-indent: -1em;
}

.card li::before {
  content: "— ";
  color: var(--accent);
  opacity: 0.6;
}

.edu-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
}

.edu-box strong {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  display: block;
  margin-bottom: 8px;
}

.edu-box p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.contact-section {
  background: linear-gradient(
    145deg,
    var(--surface) 0%,
    var(--contact-grad-end) 100%
  );
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 48px 40px;
  text-align: center;
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.contact-section > p {
  color: var(--muted);
  max-width: 28em;
  margin: 0 auto 28px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.contact-links a:not(.btn) {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.contact-links a:not(.btn):hover {
  text-decoration: underline;
}

.card-more {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-more a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.card-more a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding-top: 48px;
  color: var(--muted);
  font-size: 0.8125rem;
}
