/* =========================================================
   HUGO CARRARA — PORTFOLIO MMI
   ========================================================= */
html {color-scheme: light only !important;}
:root {
  --bg: #101010;
  --surface: #171717;
  --surface-2: #202020;
  --text: #f3f0e9;
  --muted: #aaa69d;
  --line: rgba(243,240,233,.15);
  --accent: #d9ff4f;
  --max: 1440px;
  --pad: clamp(22px, 5vw, 76px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

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

button { font: inherit; }

::selection { background: var(--accent); color: #111; }

.header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: .35s ease;
}

.header.scrolled {
  background: rgba(16,16,16,.86);
  backdrop-filter: blur(18px);
  border-color: var(--line);
}

.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -.08em; }
.logo span { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a, .header-cta { font-size: .78rem; font-weight: 700; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }

.header-cta {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.header-cta span { color: var(--accent); margin-left: 7px; }

.menu-toggle { display: none; border: 0; background: none; color: var(--text); font-size: 1.2rem; }

.hero {
  min-height: 100svh;
  padding: 145px var(--pad) 55px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .55;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero-grid::after {
  content: "";
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  right: -10%;
  top: 10%;
  background: var(--accent);
  filter: blur(120px);
  opacity: .08;
  border-radius: 50%;
}

.hero-content { width: 100%; max-width: var(--max); margin: auto; position: relative; z-index: 2; }

.eyebrow, .kicker, .section-label, .project-meta, .tags, .hero-tag {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.eyebrow { color: var(--muted); font-size: .72rem; margin-bottom: 30px; }

.hero h1 {
  font-size: clamp(5rem, 13vw, 12rem);
  line-height: .78;
  letter-spacing: -.095em;
  font-weight: 800;
}
.hero h1 em { color: transparent; -webkit-text-stroke: 1px var(--text); font-style: normal; }

.hero-bottom {
  margin-top: 70px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: 920px;
}
.hero-intro { max-width: 530px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.6; }
.hero-intro strong { color: var(--text); }

.circle-link {
  width: 72px; height: 72px; border: 1px solid var(--line);
  border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
  transition: .3s;
}
.circle-link:hover { background: var(--accent); color: #111; transform: rotate(45deg); }

.hero-tag {
  position: absolute; right: var(--pad); bottom: 55px;
  writing-mode: vertical-rl; color: var(--muted); font-size: .65rem;
}

.section { padding: 130px var(--pad); max-width: var(--max); margin: auto; }
.section-label { font-size: .65rem; color: var(--muted); padding-bottom: 30px; border-bottom: 1px solid var(--line); }

.statement { max-width: none; background: var(--accent); color: #111; }
.statement .section-label { color: #333; border-color: rgba(0,0,0,.18); }
.statement-copy { max-width: 1200px; margin: 80px auto 20px; }
.statement-copy p { font-size: clamp(2.5rem, 6vw, 6rem); line-height: .98; letter-spacing: -.065em; font-weight: 700; }
.statement-copy span { -webkit-text-stroke: 1px #111; color: transparent; }

.about-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10%; padding-top: 80px; }
.about-title h2, .projects-head h2, .method-intro h2, .contact-card h2 {
  font-size: clamp(3rem, 6vw, 6.2rem); line-height: .93; letter-spacing: -.07em;
}
.about-title h2 span, .projects-head h2 span, .method-intro h2 span, .contact-card h2 span { color: var(--accent); }
.kicker { color: var(--accent); font-size: .68rem; margin-bottom: 20px; }
.about-text { padding-top: 20px; max-width: 620px; }
.about-text p { color: var(--muted); font-size: 1.08rem; line-height: 1.85; margin-bottom: 24px; }
.about-text strong { color: var(--text); }

.skills { max-width: none; background: var(--surface); }
.skills-grid { max-width: var(--max); margin: 70px auto 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); }
.skill-card { background: var(--surface); min-height: 330px; padding: 30px; grid-column: span 2; position: relative; transition: .3s; }
.skill-card:nth-child(4), .skill-card:nth-child(5) { grid-column: span 3; }
.skill-card:hover { background: var(--surface-2); transform: translateY(-4px); }
.skill-card.featured { background: #1d2410; }
.skill-number { color: var(--muted); font-family: "DM Mono"; font-size: .65rem; }
.skill-card h3 { font-size: clamp(1.7rem, 3vw, 3rem); line-height: .95; letter-spacing: -.055em; margin: 75px 0 20px; }
.skill-card p { color: var(--muted); line-height: 1.6; max-width: 390px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 25px; }
.tags span { border: 1px solid var(--line); padding: 7px 9px; border-radius: 100px; font-size: .58rem; }

.projects-head { display: flex; justify-content: space-between; align-items: end; padding: 70px 0 55px; }
.projects-note { color: var(--muted); max-width: 360px; line-height: 1.6; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 35px; }
.filter { cursor: pointer; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; font-size: .72rem; }
.filter:hover, .filter.active { color: #111; background: var(--accent); border-color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px 25px; }
.project-card { transition: .35s; }
.project-card.large { grid-column: span 2; }
.project-card.hidden { display: none; }

.project-visual {
  min-height: 360px; display: grid; place-items: center; margin-bottom: 20px; overflow: hidden;
  position: relative; background: #202020;
}
.project-card.large .project-visual { min-height: 510px; }
.project-visual::before { content: ""; position: absolute; inset: 10%; border: 1px solid rgba(255,255,255,.18); }
.project-visual span { font-family: "DM Mono"; font-size: clamp(1.2rem, 3vw, 3rem); letter-spacing: .08em; position: relative; }
.visual-web { background: linear-gradient(135deg, #202020, #343434); }
.visual-web span { color: var(--accent); }
.visual-strategy { background: var(--accent); color: #111; }
.visual-strategy::before { border-color: rgba(0,0,0,.25); }
.visual-design { background: #7b7b72; color: #111; }
.visual-video { background: #282828; }
.visual-project { background: #151515; color: var(--accent); }

.project-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .6rem; margin-bottom: 12px; }
.project-card h3 { font-size: 1.7rem; letter-spacing: -.04em; margin-bottom: 8px; }
.project-card > p { color: var(--muted); line-height: 1.6; max-width: 650px; }
.project-link { display: inline-block; margin-top: 18px; font-family: "DM Mono"; font-size: .72rem; color: var(--accent); }

.method { background: var(--surface); max-width: none; }
.method-intro, .method-line { max-width: var(--max); margin-left: auto; margin-right: auto; }
.method-intro { padding-top: 75px; }
.method-line { margin-top: 90px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.method-step { padding: 24px 20px 0 0; border-right: 1px solid var(--line); min-height: 200px; }
.method-step + .method-step { padding-left: 20px; }
.method-step b { font-family: "DM Mono"; color: var(--accent); font-size: .7rem; }
.method-step span { display: block; font-size: 1.3rem; font-weight: 700; margin: 25px 0 12px; }
.method-step p { color: var(--muted); line-height: 1.5; font-size: .9rem; }

.timeline { max-width: 1000px; margin: 75px auto 0; }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 30px; padding: 35px 0; border-bottom: 1px solid var(--line); }
.timeline-item > span { font-family: "DM Mono"; color: var(--accent); font-size: .7rem; }
.timeline-item h3 { font-size: 1.5rem; margin-bottom: 10px; }
.timeline-item p { color: var(--muted); line-height: 1.6; max-width: 700px; }

.contact { max-width: none; padding-top: 150px; padding-bottom: 70px; }
.contact-card { max-width: var(--max); margin: auto; background: var(--accent); color: #111; padding: clamp(35px, 7vw, 90px); }
.contact-card .kicker { color: #333; }
.contact-card h2 span { color: transparent; -webkit-text-stroke: 1px #111; }
.contact-card > p:not(.kicker) { max-width: 550px; margin-top: 35px; line-height: 1.6; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 35px; }
.button { padding: 14px 18px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.button.primary { background: #111; color: var(--accent); }
.button.secondary { border: 1px solid rgba(0,0,0,.3); }
.button span { margin-left: 10px; }

.footer { max-width: var(--max); margin: auto; padding: 0 var(--pad) 30px; display: flex; justify-content: space-between; color: var(--muted); font-family: "DM Mono"; font-size: .62rem; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 78px; left: 0; right: 0; padding: 25px var(--pad); background: rgba(16,16,16,.97); flex-direction: column; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: clamp(4.4rem, 18vw, 8rem); }
  .hero-tag { display: none; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .skill-card, .skill-card:nth-child(4), .skill-card:nth-child(5) { grid-column: span 1; }
  .projects-head { display: block; }
  .projects-note { margin-top: 30px; }
  .method-line { grid-template-columns: 1fr 1fr; }
  .method-step:nth-child(odd) { padding-left: 0; }
}

@media (max-width: 620px) {
  .section { padding-top: 90px; padding-bottom: 90px; }
  .hero { min-height: 92svh; }
  .hero-bottom { margin-top: 50px; align-items: start; gap: 25px; }
  .circle-link { width: 55px; height: 55px; flex-shrink: 0; }
  .statement-copy { margin-top: 55px; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .project-card.large { grid-column: span 1; }
  .project-card.large .project-visual, .project-visual { min-height: 330px; }
  .method-line { grid-template-columns: 1fr; }
  .method-step, .method-step + .method-step { padding: 25px 0; border-right: 0; border-bottom: 1px solid var(--line); min-height: auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .footer { flex-direction: column; gap: 10px; }
}

.cursor-dot, .cursor-ring {
  position: fixed; pointer-events: none; z-index: 9999; border-radius: 50%;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring { width: 36px; height: 36px; border: 1px solid rgba(217,255,79,.45); transition: width .2s, height .2s, border-color .2s; }
.cursor-ring.hover { width: 52px; height: 52px; border-color: var(--accent); }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }


/* =========================
   PHP CONTACT FORM
   ========================= */

.contact-form {
  margin-top: 2.5rem;
  text-align: left;
}

.contact-form label {
  display: block;
  margin-bottom: 1.1rem;
}

.contact-form label > span {
  display: block;
  margin-bottom: .55rem;
  font-size: .72rem;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  color: inherit;
  border-radius: 0;
  padding: .95rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.07);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  opacity: .55;
}

.contact-form .button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.form-message {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.18);
  font-size: .9rem;
}

.form-message.success {
  background: rgba(255,255,255,.07);
}

.form-message.error {
  background: rgba(255,255,255,.04);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* =========================
   PROJECT IMAGES
   ========================= */

.project-image-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.project-image {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease, filter .5s ease;
}

.project-card.large .project-image {
  height: 460px;
}

.project-card:hover .project-image {
  transform: scale(1.025);
}

.project-detail {
  padding-top: 9rem;
}

.project-detail-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw 5rem;
}

.project-detail-hero h1 {
  max-width: 900px;
  margin: .5rem 0 1.5rem;
}

.project-detail-intro {
  max-width: 720px;
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: .78;
}

.project-detail-image {
  display: block;
  width: min(1200px, 90vw);
  max-height: 760px;
  object-fit: contain;
  margin: 0 auto 5rem;
  background: rgba(255,255,255,.03);
}

.project-detail-content {
  width: min(900px, 90vw);
  margin: 0 auto;
  padding-bottom: 8rem;
}

.project-detail-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.project-detail-content p {
  line-height: 1.8;
  opacity: .8;
}

.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 1.5rem;
}

.project-detail-meta span {
  border: 1px solid rgba(255,255,255,.18);
  padding: .5rem .7rem;
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .project-image,
  .project-card.large .project-image {
    height: 300px;
  }

  .project-detail {
    padding-top: 7rem;
  }

  .project-detail-image {
    max-height: 520px;
  }
}
