/* Martina Yacobone — portfolio */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #a6a6a6;
  --line: #f2f2f2;
  --field: #f2f2f2;
  --dark: #1a1a1a;
  --gutter: 40px;
  --font: "Inter", "Inter Placeholder", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
.muted { color: var(--muted); }

/* ---------- Header + menu ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter) 20px 72px;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { font-size: 18px; }
.menu-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--dark); border: 0; cursor: pointer;
  display: grid; place-items: center; position: relative; z-index: 60;
  transition: transform .3s ease, background .3s ease;
}
.menu-btn:hover { transform: scale(1.06); }
.menu-btn span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: #c2c2c2;
  transition: transform .35s ease, top .35s ease;
}
.menu-btn span:nth-child(1) { top: 20px; }
.menu-btn span:nth-child(2) { top: 26px; }
body.menu-open .menu-btn { background: #fff; }
body.menu-open .menu-btn span { background: #000; top: 23px; }
body.menu-open .menu-btn span:nth-child(1) { transform: rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { transform: rotate(-45deg); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
}
.menu-panel {
  position: fixed; z-index: 45; top: 12px; right: 12px; bottom: 12px;
  width: min(440px, calc(100vw - 24px));
  background: #000; color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
  padding: 48px 56px; gap: 4px;
  transform: translateX(calc(100% + 24px));
  transition: transform .55s cubic-bezier(.7,0,.2,1);
}
.menu-panel a {
  font-size: 40px; line-height: 1.2; letter-spacing: -0.05em;
  opacity: .9; transition: opacity .2s;
}
.menu-panel a:hover, .menu-panel a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.menu-open .menu-panel { transform: none; }
body.menu-open { overflow: hidden; }

/* ---------- Layout ---------- */
main { padding-top: 140px; }
.container { width: min(1080px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.container-wide { width: calc(100% - 2 * var(--gutter)); margin: 0 auto; }

/* ---------- Home hero ---------- */
.hero { padding: 60px 0 140px; }
.hero h1, .hero .typed-line {
  font-size: clamp(40px, 5.2vw, 72px); line-height: 1; letter-spacing: -0.06em;
}
.hero h1 { font-weight: 500; }
.hero .typed-line { font-weight: 400; margin-top: .1em; min-height: 1em; }
.caret {
  display: inline-block; width: 2px; height: .95em; background: currentColor;
  vertical-align: -0.1em; margin-left: 2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .intro { max-width: 340px; margin-top: 48px; }

/* ---------- Project list ---------- */
.page-title { font-size: clamp(40px, 5.2vw, 72px); line-height: 1; letter-spacing: -0.06em; padding: 60px 0 100px; }
.projects { display: flex; flex-direction: column; gap: 96px; padding-bottom: 140px; }
.project { display: block; cursor: none; }
.project .thumb { overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 3; background: var(--line); }
@media (min-width: 900px) { .project .thumb { aspect-ratio: 16 / 9; } }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project:hover .thumb img { transform: scale(1.03); }
.project .meta { margin-top: 16px; }
.project .tags { color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }

/* Custom "View" cursor */
.cursor-view {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 88px; height: 88px; border-radius: 50%;
  background: #fff; color: #000; display: grid; place-items: center; font-size: 18px;
  transform: translate(-50%, -50%) scale(0); transition: transform .25s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.cursor-view.on { transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .project { cursor: pointer; } .cursor-view { display: none; } }

/* ---------- Case study ---------- */
.case-head { padding: 60px 0 100px; }
.case-head h1 { font-size: clamp(48px, 5vw, 72px); line-height: 1; letter-spacing: -0.06em; margin-bottom: 72px; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.case-meta dt { color: var(--muted); margin-bottom: 12px; }
.case-meta dd { margin: 0; }
.case-hero img { width: 100%; border-radius: 4px; aspect-ratio: 3 / 2; object-fit: cover; }
.case-details {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 40px;
  padding: 80px 80px 160px;
}
.case-details h2 { font-size: clamp(30px, 3.3vw, 48px); line-height: 1.05; letter-spacing: -0.06em; max-width: 720px; }
.case-video { margin-bottom: 0; }
.case-video video { width: 100%; border-radius: 4px; }
.gallery img { width: 100%; height: auto; background: var(--line); }
.gallery img:first-child { border-radius: 4px 4px 0 0; }
.gallery img:last-child { border-radius: 0 0 4px 4px; }

.next-case {
  margin-top: 160px; background: #000; color: #fff;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
}
.next-case .label { opacity: .9; }
.next-case .title { font-size: clamp(48px, 5vw, 72px); line-height: 1; letter-spacing: -0.06em; font-weight: 500; margin-top: 12px; position: relative; z-index: 2; }
.next-case .peek {
  position: absolute; left: 50%; bottom: -260px; width: 378px; max-width: 70vw; aspect-ratio: 3 / 2;
  transform: translateX(-50%); object-fit: cover; border-radius: 4px;
  transition: bottom .6s cubic-bezier(.2,.7,.2,1);
}
.next-case:hover .peek { bottom: 72px; }

/* ---------- About ---------- */
.about-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) minmax(0,1fr); gap: 40px; align-items: start; padding: 60px 0 160px; }
.about-intro h1 { font-size: clamp(40px, 4.5vw, 56px); line-height: 1; letter-spacing: -0.06em; text-align: right; }
.about-intro .copy p + p { margin-top: 16px; }
.about-intro .copy { text-align: justify; hyphens: auto; }
.about-intro img { width: 100%; border-radius: 8px; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1); }
.quote { padding: 120px 0 200px; text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 900px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.06em; font-weight: 500; }
.quote cite { display: block; margin-top: 24px; font-style: normal; color: var(--muted); }
.about-block { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 40px; padding-bottom: 120px; }
.about-block h2 { font-size: 32px; line-height: 1.2; letter-spacing: -0.05em; font-weight: 400; }
.about-block .items { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.about-block .item .k { display: block; }
.about-block .item .sub { color: var(--muted); display: block; }

/* ---------- Contact ---------- */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; padding-bottom: 160px; }
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 16px; letter-spacing: -0.02em; color: var(--fg);
  background: var(--field); border: 1px solid transparent; border-radius: 4px; padding: 12px 14px;
  outline: none; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: #000; }
.contact-form textarea { grid-column: 1 / -1; min-height: 180px; resize: vertical; }
.contact-form button {
  grid-column: 1 / -1; font: inherit; font-size: 16px; color: #fff; background: #000;
  border: 0; border-radius: 4px; padding: 12px; cursor: pointer; transition: opacity .2s;
}
.contact-form button:hover { opacity: .85; }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 14px; letter-spacing: -0.02em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.site-footer .cta { font-size: 32px; line-height: 1.4; letter-spacing: -0.04em; display: inline-block; margin-bottom: 36px; }
.site-footer .cta:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h3 { font-size: inherit; font-weight: 400; color: var(--muted); margin-bottom: 8px; }
.footer-cols a { display: block; line-height: 1.6; width: fit-content; }
.footer-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  :root { --gutter: 20px; }
  .site-header { padding: 16px var(--gutter); }
  main { padding-top: 100px; }
  .hero { padding: 40px 0 96px; }
  .projects { gap: 64px; }
  .case-meta { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .case-head h1 { margin-bottom: 48px; }
  .case-details { grid-template-columns: 1fr; gap: 16px; padding: 56px 0 96px; }
  .about-intro { grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
  .about-intro h1 { text-align: left; }
  .about-intro .copy { text-align: left; }
  .about-intro img { max-width: 420px; }
  .about-block { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 80px; }
  .footer-cols { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .menu-panel { align-items: flex-start; padding: 40px 32px; }
  .menu-panel a { font-size: 36px; }
  .next-case { min-height: 70vh; margin-top: 96px; }
}
@media (max-width: 520px) {
  .contact-form { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
}
