@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;600;800&family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg: #faf9f5;
  --bg-soft: #f1efe8;
  --ink: #14161c;
  --muted: #5c6070;
  --line: #e3e0d6;
  --accent: #ff1654;
  --accent-2: #d6006f;
  --mark: #ffc2d4;
  --tech: #8b3dff;
  --radius: 16px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

.container { width: min(1120px, 92%); margin-inline: auto; }

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

/* ---------- Tech grid background ---------- */

.site-header, .hero, .section {
  background-image: radial-gradient(rgba(20, 22, 28, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.section-alt {
  background-image: radial-gradient(rgba(20, 22, 28, 0.07) 1px, transparent 1px);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--ink);
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }

.logo {
  font-family: var(--display); font-weight: 700; font-size: 1.4rem;
  letter-spacing: .02em; color: var(--ink); text-decoration: none;
  padding: .15rem .6rem; border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink); background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.logo:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.logo-dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  position: relative;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 3px; background: var(--accent); transition: right .25s ease;
}
.nav-links a:not(.btn):hover::after { right: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; padding: .85rem 1.7rem; border-radius: 12px;
  font-family: var(--display); font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 2px solid var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-small { padding: .5rem 1.1rem; font-size: .9rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-hard);
}
.btn-primary:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); background: var(--ink); }
.btn-ghost {
  color: var(--ink); background: #fff; box-shadow: var(--shadow-hard);
}
.btn-ghost:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); background: var(--mark); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 7.5rem 0 5rem; }

.hero-inner { position: relative; z-index: 2; text-align: center; }

.hero-portrait {
  width: 150px; height: 150px; object-fit: cover; object-position: center 20%;
  border-radius: 50%; border: 3px solid var(--ink); background: #fff;
  box-shadow: 6px 6px 0 var(--accent);
  transform: rotate(-4deg);
  margin-bottom: 1.6rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-portrait:hover { transform: rotate(4deg) scale(1.06); box-shadow: 8px 8px 0 var(--tech); }

.hero-kicker {
  display: inline-block; padding: .45rem 1.2rem; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff;
  font-family: var(--mono); font-weight: 700; font-size: .85rem; margin-bottom: 1.8rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.hero-kicker::before { content: ">> "; color: var(--accent-2); }

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -.03em;
  margin-bottom: 1.6rem;
}

.marker {
  background: linear-gradient(180deg, transparent 58%, var(--mark) 58%, var(--mark) 96%, transparent 96%);
  padding: 0 .1em; font-style: normal;
}

.hero-sub {
  max-width: 620px; margin: 0 auto 2.6rem; color: var(--muted);
  font-size: 1.13rem;
}

.hero-cta { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }

.sticker {
  position: absolute; right: 4%; top: 4.5rem; z-index: 3;
  width: 118px; height: 118px; border-radius: 50%;
  border: 2px dashed var(--ink); background: var(--accent-2); color: #fff;
  display: grid; place-items: center; text-align: center;
  font-family: var(--mono); font-weight: 700; font-size: .72rem; line-height: 1.35;
  transform: rotate(10deg);
  animation: wiggle 6s ease-in-out infinite;
}
.sticker::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--ink); opacity: .25;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-6deg) scale(1.05); }
}

.hero-stats {
  list-style: none; display: flex; justify-content: center; gap: 3.5rem;
  margin-top: 4.5rem; flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; text-align: left; position: relative; }
.hero-stats li::before {
  content: "+"; position: absolute; top: -1.4rem; left: -1.1rem;
  font-family: var(--mono); color: var(--tech); font-weight: 700;
}
.hero-stats strong { font-family: var(--display); font-size: 1.7rem; font-weight: 700; }
.hero-stats strong em { color: var(--accent-2); font-style: normal; }
.hero-stats span { font-family: var(--mono); color: var(--muted); font-size: .78rem; }

.hero-coords {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  letter-spacing: .08em; margin-top: 2.8rem;
}
.hero-coords b { color: var(--tech); }

/* ---------- Marquee ---------- */

.marquee {
  border-block: 2px solid var(--ink); background: var(--ink); color: var(--bg);
  overflow: hidden; padding: .8rem 0; margin: 3.5rem 0 0;
}
.marquee-track {
  display: flex; gap: 3rem; white-space: nowrap; width: max-content;
  font-family: var(--mono); font-weight: 700; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .08em;
  animation: scroll 22s linear infinite;
}
.marquee-track span::after { content: " ✳ "; color: var(--tech); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */

.section { padding: 6rem 0; }
.section-alt { background: var(--bg-soft); border-block: 2px solid var(--ink); }

.section-kicker {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .25em;
  font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .8rem;
}
.section-kicker::before { content: "// "; color: var(--tech); }

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 3.2rem; line-height: 1.1;
}

/* ---------- Cards ---------- */

.grid.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.8rem; }

.card {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 2.2rem;
  box-shadow: var(--shadow-hard);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.card:hover {
  transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink);
  background: var(--mark);
}

.card-icon { font-size: 2.4rem; margin-bottom: 1.1rem; }
.card h3 { font-family: var(--display); font-size: 1.3rem; margin-bottom: .8rem; }
.card p { color: var(--muted); margin-bottom: 1.2rem; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list li {
  font-size: .78rem; font-weight: 700; padding: .28rem .8rem;
  border-radius: 999px; background: var(--bg);
  color: var(--ink); border: 1.5px solid var(--ink);
}

/* ---------- Toolbox ---------- */

.toolbox-intro { max-width: 640px; color: var(--muted); font-size: 1.08rem; margin: -1.6rem 0 2.6rem; }

.toolbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.8rem; }

.tool-group {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-hard);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-group:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }

.tool-group-title {
  font-family: var(--display); font-size: 1.05rem; margin-bottom: 1rem;
  padding-bottom: .6rem; border-bottom: 2px dashed var(--line);
}

.tool-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.tool-chips li {
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 999px;
  background: var(--bg); border: 1.5px solid var(--ink);
  cursor: default; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tool-chips li:hover { background: var(--accent); color: #fff; transform: rotate(-2deg); }

.toolbox-outro {
  margin-top: 2.8rem; color: var(--muted); font-size: 1.05rem; text-align: center;
}
.toolbox-outro em {
  font-style: normal; background: var(--mark); padding: 0 .2em; font-weight: 700;
}

/* ---------- Timeline ---------- */

.timeline { position: relative; display: grid; gap: 1.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 46px; top: 8px; bottom: 8px;
  width: 3px; background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 16px);
}

.timeline-item { display: flex; gap: 1.6rem; position: relative; align-items: center; }

.timeline-badge {
  flex: 0 0 auto; min-width: 66px; height: 36px; border-radius: 999px;
  display: grid; place-items: center; font-family: var(--mono);
  font-weight: 700; font-size: .72rem; padding: 0 .8rem;
  background: var(--accent); color: #fff; z-index: 1;
  border: 2px solid var(--ink); box-shadow: 0 0 0 6px var(--bg-soft);
}
.timeline-item:nth-child(2n) .timeline-badge { background: var(--tech); }
.timeline-item:nth-child(3n) .timeline-badge { background: var(--accent-2); }

.timeline-body h3 a { color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--accent); }
.timeline-body h3 a:hover { background: var(--accent); color: #fff; }

.timeline-footer {
  margin-top: 3.5rem; display: flex; justify-content: space-between;
  align-items: center; gap: 2rem; flex-wrap: wrap;
}
.timeline-stats {
  list-style: none; display: flex; gap: 3rem; flex-wrap: wrap;
}
.timeline-stats li { display: flex; flex-direction: column; position: relative; }
.timeline-stats li::before {
  content: "+"; position: absolute; top: -1.3rem; left: -1rem;
  font-family: var(--mono); color: var(--tech); font-weight: 700;
}
.timeline-stats strong { font-family: var(--display); font-size: 1.7rem; font-weight: 700; }
.timeline-stats strong em { color: var(--accent-2); font-style: normal; }
.timeline-stats span { font-family: var(--mono); color: var(--muted); font-size: .78rem; }

.timeline-body {
  flex: 1; background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-hard);
  transition: transform .15s ease, box-shadow .15s ease;
}
.timeline-body:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.timeline-body h3 { font-family: var(--display); font-size: 1.1rem; margin-bottom: .5rem; }
.timeline-body p { color: var(--muted); font-size: .98rem; }

/* ---------- Projects ---------- */

.grid.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; }

.project {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 1.8rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.project:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--tech); }
.project h3 { font-family: var(--display); font-size: 1.15rem; margin-bottom: .5rem; }
.project p { color: var(--muted); font-size: .95rem; }

/* ---------- Work grid (portfolio) ---------- */

.hero-page { padding: 5.5rem 0 3.5rem; }

.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.8rem; }

.work {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 0;
  display: flex; flex-direction: column; gap: .7rem;
  box-shadow: var(--shadow-hard);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  overflow: hidden;
}
.work:hover {
  transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink);
  background: var(--bg-soft);
}

.work-img {
  width: 100%; height: 170px; object-fit: cover; display: block;
  border-bottom: 2px solid var(--ink);
  filter: saturate(.85);
  transition: filter .3s ease;
}
.work:hover .work-img { filter: saturate(1); }

.work-meta, .work h3, .work p { margin: 0 1.8rem; }
.work-meta { margin-top: 1.4rem; }
.work p { margin-bottom: 1.8rem; }

.work-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.work-type {
  color: var(--ink); background: var(--mark);
  border: 1.5px solid var(--ink); padding: .1rem .6rem; border-radius: 999px;
}
.work-year { color: var(--accent-2); }

.work h3 { font-family: var(--display); font-size: 1.45rem; font-weight: 700; line-height: 1.2; margin-bottom: .2rem; }
.work h3 a { color: var(--ink); text-decoration: none; border-bottom: 4px solid var(--accent); padding-bottom: .1rem; }
.work h3 a:hover { background: var(--accent); color: #fff; border-bottom-color: var(--tech); }
.work p { color: var(--muted); font-size: .95rem; }

.work-cta { text-align: center; margin-top: 4.5rem; }
.work-cta h2 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; margin-bottom: 1.6rem; line-height: 1.15; }

/* ---------- CTA ---------- */

.cta-section {
  background: var(--bg-soft); border-top: 2px solid var(--ink);
}
.cta-inner { text-align: center; }
.cta-title { font-family: var(--display); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.1; margin-bottom: 1.4rem; letter-spacing: -.02em; }
.cta-sub { max-width: 560px; margin: 0 auto 2.4rem; color: var(--muted); font-size: 1.1rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--bg); padding: 2.4rem 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; font-size: .9rem;
}
.footer-inner p { font-family: var(--mono); font-size: .8rem; }
.footer-inner p b { color: var(--tech); font-weight: 700; }
.footer-links { list-style: none; display: flex; gap: 1.6rem; }
.footer-links a { color: var(--bg); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent-2); }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 2px solid var(--ink);
    padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 340px; padding: .8rem 0 1.4rem; }
  .nav-links li { padding: 0 4%; }
  .nav-links a { display: block; padding: .75rem 0; font-size: 1.05rem; }
  .nav-links a::after { display: none; }
  .nav-links li:last-child a { margin-top: .6rem; }
  .timeline::before { left: 33px; }
  .timeline-item { flex-direction: column; gap: .8rem; align-items: flex-start; }
  .timeline-badge { box-shadow: 0 0 0 6px var(--bg-soft); }
  .hero { padding: 5rem 0 3.5rem; }
  .hero-stats { gap: 1.6rem; }
  .sticker { display: none; }
}
