/* ============================================================
   dinidi.me — editorial portfolio
   Type: Fraunces (display) + Space Grotesk (body/mono)
   Palette: warm cream · ink plum · rose accent
   ============================================================ */

:root {
  --bg: #fdf8f3;
  --bg-soft: #f7ede4;
  --ink: #2b1b33;
  --ink-soft: #5c4a66;
  --accent: #c33d6e;
  --accent-deep: #5b2a86;
  --line: #e6d8cd;
  --card: #ffffff;
  --radius: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

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

.mono {
  font-family: "Space Grotesk", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 500;
}

em { font-style: italic; }

/* ---------- ambient blooms ---------- */
.bloom {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.bloom-a {
  width: 520px; height: 520px;
  top: -160px; right: -120px;
  background: radial-gradient(circle, #f2b8cc, transparent 65%);
}
.bloom-b {
  width: 460px; height: 460px;
  bottom: -180px; left: -140px;
  background: radial-gradient(circle, #d5c3ef, transparent 65%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f2;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  color: var(--ink) !important;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--bg) !important;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(20px, 8vw, 120px) 80px;
}

.kicker {
  color: var(--accent);
  margin-bottom: 20px;
}

.display {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.display em {
  color: transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  max-width: 34em;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
}

.hl {
  border-bottom: 2px solid var(--accent);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.btn-primary, .btn-outline {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(43, 27, 51, 0.25);
}

.btn-outline {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: clamp(20px, 8vw, 120px);
  color: var(--ink-soft);
  opacity: 0.6;
  animation: drift 2.4s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(70px, 10vw, 130px) clamp(20px, 8vw, 120px);
  border-top: 1px solid var(--line);
}

.sec-label {
  color: var(--accent);
  margin-bottom: 14px;
}

.section h2 {
  font-family: "Fraunces", serif;
  font-weight: 520;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  letter-spacing: -0.015em;
  margin-bottom: 34px;
}

.section h2 em { color: var(--accent-deep); }

/* about */
.about-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 4vw, 48px);
  max-width: 62em;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 70px);
  margin-top: 52px;
}

.fact { display: flex; flex-direction: column; gap: 6px; }

.fact-num {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 560;
  color: var(--accent-deep);
}

.fact-label { color: var(--ink-soft); }

/* skills */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.skill-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.skill-group h3 {
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 0.75rem;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink);
}

/* projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.project {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(91, 42, 134, 0.12);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.proj-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.proj-head h3 {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: 1.35rem;
}

.proj-arrow {
  color: var(--accent);
  transition: transform 0.25s;
}
.project:hover .proj-arrow { transform: translate(3px, -3px); }

.project p { color: var(--ink-soft); font-size: 0.95rem; }

.proj-tags {
  margin-top: 16px;
  color: var(--accent-deep);
  font-size: 0.7rem;
}

.more-link { margin-top: 36px; }
.more-link a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
  transition: color 0.2s;
}
.more-link a:hover { color: var(--accent); }

/* github live */
.sec-sub {
  color: var(--ink-soft);
  max-width: 40em;
  margin: -18px 0 34px;
}

.gh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.gh-stats .stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.gh-stats .n {
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 560;
  color: var(--accent-deep);
}

.gh-stats .l {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin-top: 4px;
}

.constellation-wrap, .activity-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 26px;
}

.c-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.c-head h3 { color: var(--accent); font-size: 0.75rem; }
.c-note { color: var(--ink-soft); font-size: 0.7rem; }

#constellation {
  display: block;
  width: 100%;
  height: 180px;
}

.activity {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  font-size: 0.92rem;
}
.activity li:first-child { border-top: 0; padding-top: 0; }

.a-icon { color: var(--accent); }
.a-text {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.a-text a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.a-text a:hover { color: var(--accent); }
.a-time { color: var(--ink-soft); opacity: 0.7; font-size: 0.7rem; }

.gh-langs {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.gh-lang-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 30px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.gh-lang-legend i {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.repo {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.repo:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(91, 42, 134, 0.12);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.r-name { font-weight: 600; margin-bottom: 6px; overflow-wrap: anywhere; }
.repo p { color: var(--ink-soft); font-size: 0.88rem; min-height: 2.6em; }

.r-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: var(--accent-deep);
  font-size: 0.72rem;
}

.gh-foot {
  margin-top: 22px;
  color: var(--ink-soft);
  opacity: 0.7;
  font-size: 0.7rem;
}

/* contact */
.contact { text-align: center; }
.contact .hero-cta { justify-content: center; }
.contact-sub {
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(20px, 8vw, 120px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  color: var(--ink-soft);
}

.footer-dim { opacity: 0.55; }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding-top: 96px; }
}
