/* ═══════════════════════════════════════════════════════════
   ZERQINHO — CINEMATIC HORROR PORTFOLIO v4
   Font: Cormorant Garamond (display) + DM Mono (body code)
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Mono:ital,wght@0,300;0,400;1,300&display=swap');

/* ── RESET & ROOT ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --ink:     #0d0d0d;
  --ash:     #161616;
  --smoke:   #888;      /* was #1e1e1e — now readable */
  --fog:     #aaa;      /* was #2a2a2a — now readable */
  --mist:    #c8c8c8;   /* was #444    — now readable */
  --pale:    #d8d8d8;   /* was #888    — now readable */
  --ghost:   #eaeaea;   /* was #bbb    — now bright   */
  --white:   #f5f2ef;
  --red:     #c0392b;   /* slightly brighter red */
  --redGlow: #e05040;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --mono:    'DM Mono', 'Courier New', monospace;
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--ink);
  color: var(--mist);
  overflow-x: hidden;
  cursor: default;  /* show real OS cursor */
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 99997;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/feTurbulence%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  animation: grainDrift 0.5s steps(1) infinite;
}
@keyframes grainDrift {
  0%,100% { transform: translate(0,0); }
  25%      { transform: translate(-3px,2px); }
  50%      { transform: translate(2px,-2px); }
  75%      { transform: translate(-1px,3px); }
}

/* ── CANVAS ── */
#sketchCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  background: var(--ink);
}

/* ── SCROLL REVEAL ── */
.sr-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.sr-visible {
  opacity: 1;
  transform: none;
}

/* ── HEADER ── */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 68px;
  background: rgba(8,8,8,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(20px) saturate(0.5);
  transition: background 0.5s;
  position: fixed;
}

.logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.logo-m { color: var(--red); text-shadow: 0 0 12px rgba(192,57,43,0.6); }
.logo-rest { color: var(--ghost); }

.nav-pill {
  display: flex; gap: 1px;
  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50px; padding: 7px 11px;
  position: absolute; left: 50%; transform: translateX(-50%);
  box-shadow: 0 4px 24px rgba(0,0,0,0.7);
}
.nav-pill a {
  text-decoration: none;
  color: var(--smoke);
  font-weight: 300;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 8px 20px;
  border-radius: 50px;
  transition: all 0.4s var(--ease);
}
.nav-pill a:hover, .nav-pill a.active {
  background: rgba(255,255,255,0.05);
  color: var(--ghost);
}

.hdr-icons { display: flex; gap: 22px; align-items: center; }
.hdr-icons a {
  font-size: 16px; color: var(--ghost);
  text-decoration: none;
  transition: color 0.4s, opacity 0.4s;
  display: flex; align-items: center;
  opacity: 0.6;
}
.hdr-icons a:hover { color: var(--white); opacity: 1; }
.hdr-icons a svg { fill: currentColor; width: 16px; height: 16px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: none; }
.hamburger span { display: block; width: 22px; height: 1px; background: var(--ghost); }

.mob-menu {
  display: none; flex-direction: column;
  position: fixed; top: 68px; left: 0; right: 0;
  background: rgba(4,4,4,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  z-index: 999;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  padding: 18px 36px;
  color: var(--ghost); text-decoration: none;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.15em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: color 0.3s;
}
.mob-menu a:hover { color: var(--white); }

/* ── HERO ── */
#hero {
  position: relative; width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 68px 0 0; z-index: 1;
}

.hero-in {
  max-width: 760px; width: 100%;
  margin: 0 auto; padding: 0 50px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 0;
  transform-style: preserve-3d;
  will-change: transform;
  animation: heroFadeIn 2.5s var(--ease) both;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: perspective(900px) translateY(40px) rotateX(6deg); }
  to   { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0deg); }
}

.greeting {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0.8;
  animation: fadeUp 1.5s 0.3s var(--ease) both;
}

.hero-left h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline;
  gap: 14px; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 1.5s 0.5s var(--ease) both;
}
.hello-txt { color: var(--ghost); font-weight: 300; }
.zname {
  color: var(--white);
  font-style: italic;
  font-weight: 600;
  position: relative;
}
.zname::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: lineReveal 1.5s 1.5s var(--ease) both;
  transform-origin: center;
}
@keyframes lineReveal {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.z-letter { color: var(--red); }

.role {
  font-family: var(--mono);
  font-size: 13px; font-weight: 300;
  color: var(--ghost);
  letter-spacing: 0.08em;
  margin-top: 22px;
  animation: fadeUp 1.5s 0.7s var(--ease) both;
}

.desc {
  margin: 28px auto 0;
  font-family: var(--mono);
  font-size: 13px; line-height: 2.0;
  color: var(--mist); max-width: 520px;
  font-weight: 300;
  animation: fadeUp 1.5s 0.9s var(--ease) both;
}

.hero-btns {
  margin-top: 52px;
  display: flex; gap: 16px; justify-content: center;
  animation: fadeUp 1.5s 1.1s var(--ease) both;
}
.hero-btns a {
  text-decoration: none;
  padding: 14px 38px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  transition: all 0.5s var(--ease);
  border-radius: 999px;
  position: relative; overflow: hidden;
}
.btn-hire {
  background: transparent;
  color: var(--ghost);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-hire::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.04);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}
.btn-hire:hover::before { transform: translateX(0); }
.btn-hire:hover { border-color: rgba(255,255,255,0.4); color: var(--white); }

.btn-contact {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(139,0,0,0.4);
}
.btn-contact::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(139,0,0,0.08);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}
.btn-contact:hover::before { transform: translateX(0); }
.btn-contact:hover { border-color: var(--red); color: #e06060; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTIONS ── */
section { padding: 130px 0; position: relative; z-index: 1; }
.sec-in { max-width: 1200px; margin: 0 auto; padding: 0 60px; }

.sec-title {
  text-align: center; margin-bottom: 90px;
  position: relative;
}
.sec-title h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 300; font-style: italic;
  color: var(--ghost);
  letter-spacing: 0.1em;
}
.sec-title h2 span { color: var(--white); font-style: normal; }
.sec-title::after {
  content: '';
  display: block; width: 30px; height: 1px;
  background: var(--red);
  margin: 22px auto 0;
  opacity: 0.5;
}

/* ── ABOUT ── */
.about-lay {
  display: flex; align-items: center;
  gap: 80px; flex-wrap: wrap; justify-content: center;
}

.flip-card {
  width: 270px; height: 370px;
  perspective: 1200px; cursor: none; flex-shrink: 0;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.9s cubic-bezier(0.4,0.2,0.2,1);
  transform-style: preserve-3d;
}
.flip-inner.flipped { transform: rotateY(180deg); }
.flip-f, .flip-b {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 24px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 20px 60px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.02);
  background: var(--ash);
}
.flip-f img, .flip-b img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  filter: grayscale(0.4) contrast(1.1);
  transition: filter 0.5s;
}
.flip-card:hover .flip-f img,
.flip-card:hover .flip-b img { filter: grayscale(0) contrast(1.15); }
.flip-b { transform: rotateY(180deg); }
.flip-tip {
  text-align: center; margin-top: 14px;
  font-size: 9px; color: var(--pale);
  letter-spacing: 0.25em; text-transform: uppercase;
}

.about-txt p {
  font-family: var(--mono);
  font-size: 13px; line-height: 2.2;
  color: var(--ghost); max-width: 520px;
  font-weight: 300;
}

.skills-wrap {
  margin-top: 110px; overflow: hidden;
  opacity: 0.55; filter: grayscale(0.6);
  transition: opacity 0.6s, filter 0.6s;
}
.skills-wrap:hover { opacity: 0.9; filter: grayscale(0.1); }
.sk-track {
  display: flex; align-items: center;
  gap: 60px; font-size: 44px; color: var(--ghost);
  width: max-content;
  animation: skSlide 35s linear infinite;
}
.sk-track i { transition: color 0.4s; }
.sk-track i:hover { color: var(--white); }
@keyframes skSlide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── PROJECTS ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 20px;
}
.pc {
  background: rgba(12,12,12,0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 28px;
  transition: border-color 0.5s, transform 0.6s var(--ease), box-shadow 0.6s;
  box-shadow: 0 4px 30px rgba(0,0,0,0.6);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.pc:hover {
  border-color: rgba(139,0,0,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 20px rgba(100,0,0,0.1);
}
.pc img {
  width: 100%; height: 210px;
  object-fit: cover;
  filter: grayscale(0.7) brightness(0.75) contrast(1.05);
  transition: filter 0.7s var(--ease);
  display: block;
}
.pc:hover img { filter: grayscale(0.4) brightness(0.8) contrast(1.05); }
.pc-body {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.pc-body h3 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 400;
  color: var(--ghost); margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.pc-body p {
  font-family: var(--mono);
  font-size: 11px; color: var(--ghost);
  line-height: 1.8; font-weight: 300;
}
.pc-tags {
  display: flex; gap: 6px;
  margin-top: 16px; flex-wrap: wrap;
}
.pc-tags span {
  font-family: var(--mono);
  font-size: 9px; padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--mist); text-transform: uppercase;
  letter-spacing: 0.12em; border-radius: 999px;
}

/* ── SERVICES ── */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 20px;
}
.sv {
  padding: 50px 30px;
  border: 1px solid rgba(255,255,255,0.04);
  background: rgba(10,10,10,0.7);
  text-align: center;
  transition: border-color 0.5s, transform 0.5s var(--ease), box-shadow 0.5s;
  border-radius: 28px;
  backdrop-filter: blur(8px);
}
.sv:hover {
  border-color: rgba(139,0,0,0.25);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
}
.sv .ico {
  font-size: 34px; color: var(--mist);
  margin-bottom: 24px;
  transition: color 0.4s;
}
.sv:hover .ico { color: var(--red); }
.sv h3 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 400;
  color: var(--ghost); margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.sv p {
  font-family: var(--mono);
  font-size: 11px; color: var(--ghost);
  line-height: 1.9; font-weight: 300;
}

/* ── CONTACT ── */
.ct-lay {
  display: flex; gap: 90px;
  flex-wrap: wrap; justify-content: center;
}
.ct-info { max-width: 380px; }
.ct-info h3 {
  font-family: var(--serif);
  font-size: 30px; font-weight: 300; font-style: italic;
  color: var(--white); margin-bottom: 20px;
}
.ct-info p {
  font-family: var(--mono);
  font-size: 12px; color: var(--ghost);
  margin-bottom: 36px; line-height: 2; font-weight: 300;
}
.ct-row {
  display: flex; align-items: center;
  gap: 16px; margin-bottom: 18px;
  color: var(--mist);
  font-size: 11px; letter-spacing: 0.05em;
}
.ct-row i { font-size: 14px; width: 22px; color: var(--red); opacity: 0.7; }

.ct-socials {
  display: flex; gap: 22px;
  margin-top: 44px; align-items: center;
}
.ct-socials a {
  font-size: 18px; color: var(--mist);
  transition: color 0.4s; display: flex; align-items: center;
}
.ct-socials a:hover { color: var(--white); }
.ct-socials a svg { fill: currentColor; }

.ct-form {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 12px;
}
.ct-form input, .ct-form textarea {
  padding: 15px 22px;
  background: rgba(12,12,12,0.8);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--mono); font-size: 12px;
  outline: none;
  transition: border-color 0.4s, background 0.4s;
  backdrop-filter: blur(6px);
}
.ct-form input::placeholder, .ct-form textarea::placeholder {
  color: var(--mist); font-weight: 300;
}
.ct-form input:focus, .ct-form textarea:focus {
  border-color: rgba(139,0,0,0.4);
  background: rgba(16,16,16,0.9);
}
.ct-form textarea { resize: vertical; min-height: 130px; border-radius: 24px; }

.ct-form button {
  padding: 16px;
  background: transparent;
  color: var(--ghost);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.25em; text-transform: uppercase;
  cursor: none; transition: all 0.5s var(--ease);
  position: relative; overflow: hidden;
}
.ct-form button::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(139,0,0,0.08);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}
.ct-form button:hover::before { transform: translateX(0); }
.ct-form button:hover {
  border-color: rgba(139,0,0,0.4);
  color: var(--white);
}

/* ── FOOTER ── */
footer {
  padding: 48px 60px;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(4,4,4,0.9);
  position: relative; z-index: 1;
}
.ft-in {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
footer p {
  font-family: var(--mono);
  font-size: 10px; color: var(--mist);
  text-transform: uppercase; letter-spacing: 0.2em;
}
.soc a {
  color: var(--mist); margin-left: 22px;
  font-size: 16px; transition: color 0.4s;
}
.soc a:hover { color: var(--white); }

/* ── HORIZONTAL LINE DIVIDERS ── */
section::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hdr { padding: 0 24px; }
  .nav-pill { display: none; }
  .hamburger { display: flex; }
  .hdr-icons { display: none; }
  .sec-in { padding: 0 28px; }
  .hero-in { padding: 0 28px; }
  section { padding: 90px 0; }
  .ct-lay { gap: 50px; }
  footer { padding: 36px 28px; }
  .ft-in { flex-direction: column; gap: 20px; text-align: center; }
  .soc a { margin: 0 10px; }
}
@media (max-width: 480px) {
  .hero-btns { flex-direction: column; align-items: center; }
  .about-lay { gap: 40px; }
}
