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

:root {
  --cream: #faf7f4;
  --ink: #1c1917;
  --ink-muted: #6b6560;
  --ink-faint: #c4bfba;
  --accent: #c0624a;
  --accent-light: #faf0ed;
  --accent-mid: #e8957e;
  --border: rgba(28, 25, 23, 0.1);
  --display: "Archivo", sans-serif;
  --sans: "Archivo", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink) !important;
  text-decoration: none !important;
  position: relative;
  padding-bottom: 3px;
}

.nav-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='3'%3E%3Cpath d='M0 2 Q5 0 10 2 Q15 4 20 2' fill='none' stroke='%231C1917' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 20px 3px;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 2.5rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  padding: 0.875rem 1.75rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-ghost {
  display: inline-block;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 1px;
  transition:
    color 0.2s,
    border-color 0.2s;
}

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

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-badge {
  background: var(--accent-light);
  border: 1px solid rgba(192, 98, 74, 0.2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.7);
  }
}

.hero-badge p {
  font-size: 0.875rem;
  color: var(--accent);
  margin: 0;
  line-height: 1.5;
}

/* SKILLS PANEL */
.skills-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skills-group-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* SECTION SHARED */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: normal;
  color: var(--accent);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-body p {
  color: var(--ink-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.exp-item {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}

.exp-item:hover {
  transform: rotate(-0.75deg) translateY(-2px);
  border-color: var(--accent-mid);
}

.exp-company {
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

.exp-role {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* SERVICES */
.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.services-intro {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.75;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}

.service-card:hover {
  transform: rotate(-0.6deg) translateY(-3px);
  border-color: var(--accent-mid);
}

.service-card:nth-child(even):hover {
  transform: rotate(0.6deg) translateY(-3px);
}

/* Hand-drawn feel: outlined number, filled with accent-light */
.service-num {
  font-family: var(--display);
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--accent-light);
  -webkit-text-stroke: 1.5px var(--accent-mid);
  letter-spacing: -0.02em;
}

.service-title {
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.tag {
  font-size: 0.75rem;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.2rem 0.65rem;
}

/* WORK */
.work-section {
  background: white;
}

.work-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2.5rem;
}

.featured-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.7rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.project-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='3'%3E%3Cpath d='M0 2 Q5 0 10 2 Q15 4 20 2' fill='none' stroke='%23C0624A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 20px 3px;
}

.project-link:hover {
  color: var(--ink);
}

.project-visual {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-visual-inner {
  width: 85%;
  height: 85%;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--cream);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
  cursor: default;
}

.project-card:hover,
.build-item:hover {
  transform: rotate(-0.8deg) translateY(-3px);
  border-color: var(--accent-mid);
}

.project-card:nth-child(even):hover,
.build-item:nth-child(even):hover {
  transform: rotate(0.8deg) translateY(-3px);
}

.project-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.project-card-name {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.project-card-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-body p {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.contact-email-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 2rem;
}

.contact-email-label {
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}

.contact-email-val {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.75rem;
}

.form-group label {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--sans);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 130px;
}

.form-submit {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.form-submit:hover {
  background: var(--accent);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* typing animation */
#logo-text::after {
  content: "|";
  opacity: 1;
  animation: blink 0.7s step-end infinite;
}

#logo-text.done::after {
  display: none;
}
.build-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.build-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--border);
}

.build-arrow {
  font-size: 1.125rem;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}

.build-text {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.25rem;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 6rem 1.25rem 3rem;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  section {
    padding: 4rem 1.25rem;
  }
  .about-grid,
  .services-header,
  .services-grid,
  .featured-project,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .work-inner {
    padding: 4rem 1.25rem;
  }
  footer {
    padding: 1.5rem 1.25rem;
  }
}
