:root {
  --bg: #0c0c0c;
  --bg-2: #111111;
  --surface: #161616;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --muted-2: #6e6e6e;
  --line: #2a2a2a;
  --wa: #25d366;
  --wa-ink: #06210f;
  --radius: 6px;
  --header: 72px;
  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.container { max-width: 1180px; }

.row > * { min-width: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.navbar { padding: 14px 0; }

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.logo-mark {
  color: var(--muted-2);
  font-size: 0.85rem;
}

.navbar-nav .nav-link {
  color: var(--muted) !important;
  font-weight: 400;
  padding: 6px 12px !important;
  font-size: 0.85rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text) !important;
}

.navbar-toggler {
  border: 0;
  padding: 8px;
  box-shadow: none !important;
}

.toggler-lines,
.toggler-lines::before,
.toggler-lines::after {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text);
  position: relative;
}

.toggler-lines::before,
.toggler-lines::after { content: ""; position: absolute; left: 0; }
.toggler-lines::before { top: -6px; }
.toggler-lines::after { top: 6px; }

.offcanvas {
  background: var(--bg);
  color: var(--text);
  width: min(100%, 340px);
  border-left: 1px solid var(--line);
}

.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: 1.15rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a.active,
.mobile-nav a:hover { color: var(--text); }

/* Buttons */
.btn-whatsapp,
.btn-wa {
  background: var(--wa);
  border: 1px solid var(--wa);
  color: var(--wa-ink);
  font-weight: 500;
  font-size: 0.82rem;
  border-radius: 4px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-whatsapp:hover,
.btn-wa:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  color: var(--wa-ink);
}

.btn-solid {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  font-weight: 500;
  border-radius: 4px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-solid:hover { background: #fff; color: #000; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
  border-radius: 4px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  width: fit-content;
}

.text-link:hover { opacity: 0.7; }

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circle-btn:hover { border-color: var(--text); color: var(--text); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr minmax(240px, 380px) 0.95fr;
  gap: 28px 24px;
  align-items: end;
  min-height: 0;
  padding: 32px 0 48px;
}

.idx {
  color: var(--muted-2);
  font-size: 0.75rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  margin: 0 0 18px;
  max-width: 12ch;
  font-weight: 500;
}

.hero-lead {
  max-width: 38ch;
  margin-bottom: 28px;
  color: var(--muted);
}

.hero-photo {
  align-self: end;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.hero-photo img {
  width: 100%;
  height: min(62vh, 560px);
  object-fit: cover;
  object-position: center center;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.about-photo {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
}

.float-chip {
  position: absolute;
  z-index: 3;
  font-size: 0.72rem;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.78);
  padding: 6px 10px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.float-chip.c1 { top: 18%; left: 4%; }
.float-chip.c2 { top: 38%; right: 4%; }
.float-chip.c3 { top: 58%; left: 6%; }
.float-chip.c4 { top: 72%; right: 8%; }

.hero-block {
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
}

.hero-block:last-child { border-bottom: 0; padding-bottom: 0; }

.hero-kicker {
  color: var(--text);
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.hero-block p { margin-bottom: 12px; font-size: 0.9rem; }

.social-row { display: flex; flex-wrap: wrap; gap: 8px; }

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.social-row a:hover { background: var(--text); color: var(--bg); }

/* Sections */
.section {
  padding: 88px 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.section-tight { padding: 56px 0; }
.section-surface { background: var(--bg-2); }

.section-kicker {
  color: var(--muted-2);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-bottom: 16px;
  max-width: 18ch;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
}

.about-copy { max-width: 54ch; }

.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text);
  font-weight: 500;
  display: block;
  line-height: 1.1;
}

.stat-label { color: var(--text); margin-top: 6px; font-size: 0.9rem; }
.stat-text { margin-top: 6px; font-size: 0.85rem; }

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.stack-item {
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text);
  border-radius: 4px;
}

/* Skills */
.skill-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.skill-card {
  background: transparent;
  padding: 24px 20px;
  min-height: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skill-card h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.skill-card p { margin: 0; font-size: 0.85rem; }

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  height: auto;
}

.service-card h3 { font-size: 1.05rem; margin: 0 0 8px; }

.service-num {
  color: var(--muted-2);
  font-size: 0.75rem;
  display: block;
  margin-bottom: 10px;
}

/* Portfolio */
.project-card {
  display: block;
  color: inherit;
  height: 100%;
}

.project-media {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}

.project-media.is-logo {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.project-media.is-logo img {
  width: auto;
  height: 78%;
  max-height: 220px;
  object-fit: contain;
}

.project-card:hover .project-media img { transform: scale(1.03); }
.project-card:hover .project-media.is-logo img { transform: none; }

.project-meta { padding: 16px 2px 0; }

.project-tags {
  color: var(--muted-2);
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.project-card h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
  max-width: none;
}

.project-go {
  color: var(--text);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--text);
}

/* Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.form-control,
.form-select {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 4px;
  padding: 12px 14px;
  min-height: 48px;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text);
  box-shadow: none;
}

.form-control::placeholder { color: var(--muted-2); }
textarea.form-control { min-height: 120px; }
.form-label { color: var(--text); font-size: 0.8rem; }

.page-hero { padding: 64px 0 16px; }
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 14px;
}

.story-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.story-block h3 { font-size: 1.2rem; margin-bottom: 10px; }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  height: 100%;
}

.tool-card h3 { font-size: 0.95rem; margin-bottom: 6px; }

/* Footer */
.site-footer {
  padding: 16px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-cta {
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.footer-cta-link { display: block; color: var(--text); }
.footer-cta-link span { display: block; color: var(--muted); margin-bottom: 6px; font-size: 0.8rem; }
.footer-cta-link strong {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 500;
}
.footer-cta-link:hover strong { text-decoration: underline; }

.footer-kicker {
  color: var(--muted-2);
  font-size: 0.72rem;
  margin-bottom: 14px;
}

.footer-line {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.footer-line:hover { opacity: 0.7; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { display: block; padding: 5px 0; color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.75rem;
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  background: var(--wa);
  color: var(--wa-ink);
  border-radius: 4px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.8rem;
}

.whatsapp-float:hover { background: #1ebe5d; color: var(--wa-ink); }
.whatsapp-float i { font-size: 1.15rem; }

@media (max-width: 1199.98px) {
  .hero-grid {
    grid-template-columns: 1fr 0.9fr;
    min-height: 0;
    padding-bottom: 32px;
  }

  .hero-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
  .hero-block { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 991.98px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 20px;
  }

  .hero h1 { max-width: 14ch; font-size: clamp(1.7rem, 8vw, 2.4rem); }

  .hero-photo {
    order: -1;
    margin: 0 auto 8px;
    max-width: 260px;
  }

  .hero-photo img { height: 340px; }

  .hero-right {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .float-chip { display: none; }

  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }

  .skill-list { grid-template-columns: 1fr 1fr; }

  .whatsapp-float span { display: none; }
  .whatsapp-float {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .skill-list { grid-template-columns: 1fr; }
  .contact-card { padding: 20px 16px; }
  .hero-photo { max-width: 220px; }
  .hero-photo img { height: 280px; }
  .navbar-brand .logo-text { font-size: 0.82rem; }
  .project-card h3 { font-size: 1rem; }
  .page-hero { padding: 40px 0 8px; }
  .page-hero h1 { font-size: clamp(1.6rem, 9vw, 2.4rem); }
}
