/* ============================================
   Danilo Borges — Portfolio
   Aesthetic: Soft & Organic, Warm tones, Serif display
   ============================================ */

:root {
  /* Warm cream palette */
  --bg: oklch(0.965 0.015 75);
  --bg-elevated: oklch(0.985 0.012 80);
  --bg-deep: oklch(0.92 0.02 70);
  --ink: oklch(0.22 0.018 50);
  --ink-soft: oklch(0.42 0.02 55);
  --ink-mute: oklch(0.62 0.025 60);
  --line: oklch(0.85 0.02 70);
  --line-soft: oklch(0.91 0.018 72);

  /* Accents — same chroma & lightness, varied hue */
  --accent: oklch(0.62 0.12 45);       /* terracota */
  --accent-2: oklch(0.62 0.08 110);    /* oliva */
  --accent-deep: oklch(0.42 0.10 45);

  /* Type */
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(80px, 12vw, 160px);
  --max: 1280px;

  /* Radius */
  --r-sm: 12px;
  --r-md: 24px;
  --r-lg: 40px;
  --r-xl: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.18 0.012 60);
    --bg-elevated: oklch(0.22 0.014 60);
    --bg-deep: oklch(0.14 0.01 55);
    --ink: oklch(0.95 0.012 80);
    --ink-soft: oklch(0.78 0.015 75);
    --ink-mute: oklch(0.58 0.02 70);
    --line: oklch(0.32 0.015 60);
    --line-soft: oklch(0.26 0.012 60);
    --accent: oklch(0.72 0.13 50);
    --accent-2: oklch(0.72 0.09 115);
    --accent-deep: oklch(0.55 0.11 45);
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
  transition: background-color 0.6s ease, color 0.6s ease;
}

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

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

img { max-width: 100%; display: block; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-mute);
  display: inline-block;
}

/* Display type */
.display {
  font-family: var(--serif);
  font-weight: 360;
  font-style: normal;
  letter-spacing: -0.025em;
  line-height: 0.94;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  color: var(--accent);
}

.h-section {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  text-wrap: balance;
}

/* ============== NAV ============== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: normal;
  transition: backdrop-filter 0.3s, background 0.3s;
}
.nav.scrolled {
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-mark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-mark .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  font-weight: 450;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.lang-switch button, .lang-switch a {
  background: none;
  border: 0;
  padding: 4px 6px;
  font: inherit;
  color: var(--ink-mute);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s;
}
.lang-switch button.on, .lang-switch a.on { color: var(--accent); font-weight: 600; }
.lang-switch button:hover, .lang-switch a:hover { color: var(--ink); }
.lang-switch span { color: var(--ink-mute); }
.nav-links a {
  position: relative;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-right { gap: 12px; }
}

/* ============== HERO ============== */
.hero {
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  font-size: 13px;
  color: var(--ink-mute);
  font-feature-settings: "tnum";
}

.hero-title {
  font-size: clamp(60px, 13vw, 220px);
  position: relative;
  z-index: 2;
  margin-block: auto;
  padding-block: 40px;
}
.hero-title .line { display: block; }
.hero-title .indent { padding-left: clamp(40px, 8vw, 160px); }

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  position: relative;
  z-index: 2;
}
.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 360;
  line-height: 1.4;
  max-width: 38ch;
  color: var(--ink-soft);
}
.hero-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
  font-size: 13px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: color-mix(in oklch, var(--bg-elevated) 60%, transparent);
}
.status-pill .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  position: relative;
}
.status-pill .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-2);
  opacity: 0.4;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 720px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 24px; }
  .hero-status { align-items: flex-start; text-align: left; }
}

/* ============== SECTIONS ============== */
section {
  padding-block: var(--section-y);
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 80px);
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}

/* ============== ABOUT ============== */
.about {
  background: var(--bg-deep);
  border-radius: var(--r-xl);
  margin: 0 var(--gutter);
  padding: clamp(60px, 9vw, 120px) clamp(32px, 6vw, 96px);
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .about { margin: 0; border-radius: 0; }
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-text {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.4;
  font-weight: 380;
  font-family: var(--serif);
  color: var(--ink);
  text-wrap: pretty;
}
.about-text p + p { margin-top: 1em; }
.about-text strong {
  font-weight: 500;
  background: linear-gradient(180deg, transparent 60%, color-mix(in oklch, var(--accent) 35%, transparent) 60%);
  padding: 0 2px;
}
.about-text em { color: var(--accent); font-style: italic; }

.about-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}
.stat {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 380;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.stat-num em { font-style: italic; color: var(--accent); }
.stat-label {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 6px;
  line-height: 1.4;
}

/* ============== CASES ============== */
.cases-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.case {
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 4vw, 56px) 0;
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr auto;
  gap: clamp(20px, 3vw, 56px);
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: padding 0.4s ease;
}
.case:hover {
  padding-inline: clamp(8px, 2vw, 24px);
}
.case-num {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-mute);
  font-feature-settings: "tnum";
}
.case-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
  font-weight: 380;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  text-wrap: balance;
  transition: color 0.4s;
}
.case:hover .case-title em { color: var(--accent); }
.case-title em { font-style: italic; transition: color 0.4s; }
.case-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  background: var(--bg-elevated);
}
/* Case metrics row */
.case-metrics {
  display: flex;
  gap: 20px;
}
.case-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.case-metric-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.case-metric-label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

/* ESG badge */
.case-badge {
  background: color-mix(in oklch, var(--accent-2) 18%, transparent);
  border-color: var(--accent-2);
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.case-arrow {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: all 0.4s ease;
  flex-shrink: 0;
}
.case:hover .case-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: rotate(-45deg);
}
.case-arrow svg { width: 18px; height: 18px; }

/* Hover image preview */
.case-preview {
  position: fixed;
  width: 320px;
  height: 220px;
  border-radius: var(--r-md);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 30;
  box-shadow: 0 30px 80px rgba(0,0,0,0.18);
}
.case-preview.show { opacity: 1; transform: scale(1); }

@media (max-width: 880px) {
  .case {
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
  }
  .case-meta {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .case-arrow { width: 44px; height: 44px; }
  .case-preview { display: none; }
}

/* ============== EXPERIENCE TIMELINE ============== */
.timeline {
  display: flex;
  flex-direction: column;
}
.tl-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(24px, 5vw, 80px);
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.tl-item:last-child { border-bottom: 1px solid var(--line-soft); }
.tl-when {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-mute);
  font-feature-settings: "tnum";
  padding-top: 6px;
}
.tl-role {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.tl-company {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-company .sep {
  width: 4px; height: 4px;
  background: var(--ink-mute);
  border-radius: 50%;
}
.tl-summary {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 60ch;
}
@media (max-width: 720px) {
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ============== SKILLS ============== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 880px) {
  .skills-grid { grid-template-columns: 1fr; }
}
.skill-group {
  background: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 32px;
  transition: transform 0.4s, border-color 0.4s;
}
.skill-group:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.skill-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.skill-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 16px;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.skill-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-list li::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============== CONTACT ============== */
.contact {
  text-align: center;
  padding-block: clamp(120px, 16vw, 200px);
  position: relative;
  overflow: hidden;
}
.contact-eyebrow {
  margin-bottom: 24px;
}
.contact-title {
  font-size: clamp(50px, 10vw, 140px);
  margin-bottom: 40px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  justify-content: center;
  align-items: baseline;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  font-style: italic;
  font-weight: 400;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.contact-link .arrow {
  display: inline-block;
  transition: transform 0.4s;
}
.contact-link:hover .arrow { transform: translate(4px, -4px); }

/* ============== FOOTER ============== */
.footer {
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-feature-settings: "tnum";
}
@media (max-width: 720px) {
  .footer { flex-direction: column; gap: 8px; }
}

/* ============== UTILITIES / SCROLL REVEAL ============== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Decorative blob */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

/* Marquee accent strip */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 380;
  white-space: nowrap;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.marquee-track {
  display: inline-flex;
  gap: 60px;
  animation: marquee 40s linear infinite;
  padding-left: 60px;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  color: var(--ink);
}
.marquee-track .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
