:root {
  color-scheme: light only;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f1f0ed;
  --border: #e4e2dd;
  --text-primary: #111110;
  --text-secondary: #63615c;
  --text-muted: #9c9a94;
  --accent-green: #2e9e5b;
  --radius: 10px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  cursor:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><path d='M2 2 L2 17 L6 14 L9 20 L11.5 19 L8.5 13 L14 13 Z' fill='black' stroke='white' stroke-width='1.2'/></svg>")
      2 2,
    auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- NAV / BREADCRUMB ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(250, 250, 248, 0.85);
  border-bottom: 0.5px solid var(--border);
}
.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: none;
}
.breadcrumb .icon {
  width: 14px;
  height: 14px;
}
.breadcrumb span.current {
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

/* ---------- HERO ---------- */
.hero {
  padding: 70px 0 60px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
h1.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 620px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 32px;
  min-height: 24px;
}
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--text-primary);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cta-wrap {
  position: relative;
  display: inline-block;
}
.btn-primary {
  background: var(--text-primary);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}
.cursor-hint {
  position: absolute;
  right: -16px;
  bottom: -16px;
  font-size: 20px;
  transform: rotate(-6deg);
  opacity: 0;
  transition: none;
}
.cursor-hint.play {
  animation: hintClick 1.4s ease 0.6s 1 forwards;
}
@keyframes hintClick {
  0% {
    opacity: 0;
    transform: translate(30px, -20px) rotate(-6deg);
  }
  60% {
    opacity: 1;
    transform: translate(0, 0) rotate(-6deg);
  }
  75% {
    transform: translate(0, 0) rotate(-6deg) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(-6deg) scale(1);
  }
}

/* ---------- SECTION SHARED ---------- */
section {
  padding: 46px 0;
  border-top: 0.5px solid var(--border);
}
.section-path {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 28px;
  max-width: 480px;
}

.sobre-content {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 20px;
}
.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .sobre-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- SKILLS ---------- */
.skill-group {
  margin-bottom: 30px;
}
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  row-gap: 34px;
}
.skill-card {
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}
.skill-card.tapped {
  z-index: 5;
}
.skill-card svg {
  width: 26px;
  height: 26px;
  color: #fff;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
}
.skill-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.skill-card:hover .skill-label,
.skill-card.tapped .skill-label {
  opacity: 1;
}

/* ---------- PROJECTS ---------- */
.project-card {
  border: 0.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 22px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
}
.project-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.status-tag {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
}
.tab-btn {
  background: none;
  border: none;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--text-muted);
}
.tab-btn.active {
  background: var(--surface-2);
  color: var(--text-primary);
}
.media-viewer {
  margin: 14px 20px;
}
.media-frame {
  position: relative;
  height: 220px;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: none;
  cursor: zoom-in;
}
.media-img.is-mobile {
  object-fit: contain;
  background: var(--surface-2);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open {
  display: flex;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.media-video-state {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 0.5px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}
.media-nav.prev {
  left: 10px;
}
.media-nav.next {
  right: 10px;
}
.media-counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: none;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 999px;
}
.project-body {
  padding: 0 20px 22px;
}
.project-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
}
.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.tech-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.tech-row svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}
.btn-row {
  display: flex;
  gap: 8px;
}
.btn-ghost {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  background: none;
  color: var(--text-primary);
}

/* ---------- CONTACT ---------- */
.contact-box {
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 44px 30px;
  text-align: center;
  background: var(--surface);
}
.availability {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(46, 158, 91, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 158, 91, 0);
  }
}
.contact-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 26px;
}
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 8px 18px;
  background: var(--surface-2);
}
.email-pill span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}
.copy-btn {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  background: var(--text-primary);
  color: #fff;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}
.socials svg {
  width: 19px;
  height: 19px;
  color: var(--text-secondary);
}
.socials a {
  display: inline-flex;
}
.socials a:hover svg {
  color: var(--text-primary);
}

footer {
  padding: 30px 70px 50px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.6;
}

/* ---------- COFFEE SCROLL PROGRESS ---------- */
.coffee-progress {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 60;
  width: 40px;
  height: 46px;
  opacity: 0.92;
}
.coffee-progress svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.steam-path {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.coffee-progress.full .steam-path {
  opacity: 1;
}
.coffee-progress.full .steam-path:nth-child(1) {
  animation: steamRise 2.4s ease-in-out infinite;
}
.coffee-progress.full .steam-path:nth-child(2) {
  animation: steamRise 2.4s ease-in-out infinite 0.5s;
}
@keyframes steamRise {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  35% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-9px);
  }
}
@media (max-width: 640px) {
  .coffee-progress {
    width: 32px;
    height: 37px;
    right: 14px;
    bottom: 16px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 44px 0 36px;
  }
  section {
    padding: 32px 0;
  }
  .media-frame {
    height: 160px;
  }
  .section-desc {
    margin-bottom: 24px;
  }
  .sobre-content {
    margin-top: 14px;
  }
  .hero-sub {
    margin-bottom: 22px;
  }
  footer {
    padding: 24px 60px 40px 16px;
  }
}
