/* Sofia Grandoni Portfolio — Editorial: ivory, ink, bronze */

:root {
  --ivory: #F7F4EE;
  --paper: #FBF9F5;
  --stone: #EDE8DF;
  --ink: #1C1B19;
  --ink-soft: #46433E;
  --muted: #6E6960;
  --bronze: #8A6420;
  --bronze-soft: #B48C4A;
  --rule: #D9D2C5;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

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

a { color: inherit; }
::selection { background: var(--bronze); color: var(--paper); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 8px 14px; text-decoration: none;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

/* === TYPE HELPERS === */
.eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bronze);
}
.serif { font-family: var(--font-display); }

/* === NAV === */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.02em;
}
.logo em { font-style: italic; color: var(--bronze); }

.nav-links { list-style: none; display: flex; align-items: center; gap: 36px; }
.nav-links a {
  text-decoration: none; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--ink-soft); position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--bronze); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-switch { display: flex; gap: 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; }
.lang-switch .current { color: var(--bronze); }
.lang-switch a { color: var(--muted); }
.lang-switch .sep { color: var(--rule); }

.nav-toggle {
  display: none; width: 32px; height: 32px; background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* === HERO === */
.hero { padding: 168px 0 0; }
.hero-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-top .meta { font-size: 0.82rem; color: var(--muted); }

.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.4rem, 10.5vw, 9rem); line-height: 0.92; letter-spacing: -0.02em;
}
.hero-role {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem); line-height: 1.15; color: var(--bronze);
  margin-top: 20px;
}

.hero-bottom {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: end;
  margin-top: 56px; padding-bottom: 72px;
}
.hero-lead { font-size: 1.12rem; line-height: 1.75; color: var(--ink-soft); max-width: 560px; }
.hero-lead strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--ink); cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--bronze); border-color: var(--bronze); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Stats bar */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.stat { padding: 28px 24px 30px; border-right: 1px solid var(--rule); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat-number {
  display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1; font-weight: 500; letter-spacing: -0.01em;
}
.stat-label { display: block; margin-top: 10px; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

/* === SECTIONS === */
.section { padding: 128px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: end;
  margin-bottom: 72px;
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 1; letter-spacing: -0.01em;
  margin-top: 14px;
}
.section-head h2 em { font-style: italic; color: var(--bronze); }
.section-head p { color: var(--ink-soft); font-size: 1.02rem; max-width: 560px; }

/* === EXPERTISE === */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.pillar { padding: 32px 28px 8px 0; }
.pillar + .pillar { padding-left: 28px; border-left: 1px solid var(--rule); }
.pillar-num { font-family: var(--font-display); font-style: italic; color: var(--bronze); font-size: 1.1rem; }
.pillar h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.65rem; line-height: 1.15; margin: 10px 0 14px; }
.pillar p { font-size: 0.92rem; color: var(--ink-soft); }
.pillar .proof { display: block; margin-top: 16px; font-size: 0.78rem; color: var(--bronze); font-weight: 600; letter-spacing: 0.02em; }

/* === PROJECTS === */
.project {
  display: grid; grid-template-columns: 140px 1fr; gap: 40px;
  padding: 64px 0; border-top: 1px solid var(--rule);
}
.project:first-of-type { border-top-color: var(--ink); }
.project-num {
  font-family: var(--font-display); font-size: 4.6rem; line-height: 0.85; font-weight: 400;
  color: var(--bronze-soft);
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bronze); border: 1px solid var(--rule); padding: 5px 10px;
}
.project h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.05; letter-spacing: -0.01em;
}
.project-client { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }
.project-lead {
  font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.4;
  color: var(--ink-soft); margin: 26px 0 36px; max-width: 760px;
}
.project-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.project-cols h4 {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.project-cols p { font-size: 0.93rem; color: var(--ink-soft); }
.results { list-style: none; }
.results li { font-size: 0.93rem; color: var(--ink-soft); padding: 7px 0; border-bottom: 1px dotted var(--rule); }
.results li:last-child { border-bottom: 0; }
.results strong { color: var(--ink); font-weight: 600; }

.more-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 40px 0 0; padding-top: 40px; border-top: 1px solid var(--ink);
}
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 28px; }
.more-item h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; margin: 10px 0 10px; }
.more-item p { font-size: 0.92rem; color: var(--ink-soft); }
.more-item .proof { display: block; margin-top: 12px; font-size: 0.8rem; color: var(--bronze); font-weight: 600; }

/* === EXPERIENCE === */
.timeline { list-style: none; border-top: 1px solid var(--ink); }
.job {
  display: grid; grid-template-columns: 180px 1fr 1.5fr; gap: 40px;
  padding: 36px 0; border-bottom: 1px solid var(--rule);
}
.job-dates { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: var(--bronze); padding-top: 6px; }
.job h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; }
.job-company { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.job ul { list-style: none; }
.job li { font-size: 0.93rem; color: var(--ink-soft); padding-left: 18px; position: relative; margin-bottom: 8px; }
.job li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 8px; height: 1px; background: var(--bronze); }
.job li strong { color: var(--ink); font-weight: 600; }

/* === ABOUT === */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 88px; }
.about-lead {
  font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.35;
  font-weight: 400; margin-bottom: 28px;
}
.about-lead em { color: var(--bronze); }
.about-text p { color: var(--ink-soft); margin-bottom: 18px; }
.about-text .personal { font-style: italic; color: var(--muted); }

.facts { border-top: 1px solid var(--ink); }
.fact { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.fact h4 {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.fact p { font-size: 0.93rem; color: var(--ink-soft); }
.fact p + p { margin-top: 8px; }
.fact strong { color: var(--ink); font-weight: 600; }
.lang-row { display: flex; justify-content: space-between; font-size: 0.93rem; padding: 3px 0; }
.lang-row span:last-child { color: var(--muted); }

.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 96px; border-top: 1px solid var(--ink); }
.tool { padding: 24px 20px 0 0; }
.tool + .tool { padding-left: 20px; border-left: 1px solid var(--rule); }
.tool h4 {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bronze); margin-bottom: 10px;
}
.tool p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.8; }

/* === CONTACT === */
.contact { background: var(--ink); color: var(--paper); padding: 136px 0 96px; }
.contact .eyebrow { color: var(--bronze-soft); }
.contact h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6rem); line-height: 1; letter-spacing: -0.015em; margin: 18px 0 28px;
  max-width: 900px;
}
.contact h2 em { color: var(--bronze-soft); }
.contact-intro { color: #C9C3B8; font-size: 1.05rem; max-width: 620px; }

.contact-list { list-style: none; margin-top: 64px; border-top: 1px solid #3A3833; }
.contact-row {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid #3A3833;
}
.contact-row .label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #8F897E; }
.contact-row .value {
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 2rem); text-decoration: none;
  color: var(--paper); transition: color 0.3s var(--ease); word-break: break-word;
}
.contact-row a.value:hover { color: var(--bronze-soft); }
.contact-row .action {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); background: transparent; border: 1px solid #5A564E; padding: 10px 16px;
  cursor: pointer; text-decoration: none; font-family: var(--font-body);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.contact-row .action:hover { border-color: var(--bronze-soft); color: var(--bronze-soft); }

footer { background: var(--ink); color: #8F897E; font-size: 0.8rem; padding: 0 0 40px; }
footer .footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid #3A3833; }
footer a { color: #C9C3B8; text-decoration: none; }
footer a:hover { color: var(--bronze-soft); }

/* === REVEAL === */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* === RESPONSIVE === */
@media (max-width: 1000px) {
  .nav-links { gap: 24px; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(3) { padding-left: 0; border-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .tools { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .tool:nth-child(4) { padding-left: 0; border-left: 0; }
  .project-cols { grid-template-columns: 1fr 1fr; }
  .project-cols > div:last-child { grid-column: 1 / -1; }
  .job { grid-template-columns: 140px 1fr; }
  .job ul { grid-column: 2; }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--rule);
    padding: 8px 20px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--rule); }
  .nav-links a::after { display: none; }
  .lang-switch { padding-top: 16px; }
  .lang-switch a { border: 0; padding: 0; font-size: 0.8rem; }

  .hero { padding-top: 120px; }
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; padding-bottom: 56px; margin-top: 36px; }
  .hero-cta { justify-content: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 16px 24px; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }

  .section { padding: 88px 0; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 48px; }

  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 28px 0 20px; border-left: 0; }
  .pillar + .pillar { border-top: 1px solid var(--rule); }

  .project { grid-template-columns: 1fr; gap: 12px; padding: 48px 0; }
  .project-num { font-size: 3rem; }
  .project-lead { font-size: 1.25rem; margin: 20px 0 28px; }
  .project-cols { grid-template-columns: 1fr; gap: 28px; }
  .more-grid { grid-template-columns: 1fr; gap: 36px; }

  .job { grid-template-columns: 1fr; gap: 10px; }
  .job ul { grid-column: auto; margin-top: 8px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .tools { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .tool, .tool + .tool { padding: 20px 12px 0 0; border-left: 0; }

  .contact { padding: 96px 0 72px; }
  .contact-row { grid-template-columns: 1fr auto; grid-template-areas: "label action" "value value"; gap: 6px 16px; }
  .contact-row .label { grid-area: label; }
  .contact-row .action { grid-area: action; }
  .contact-row .value { grid-area: value; font-size: 1.3rem; }
}
