:root {
  --bg: #111309;
  --olive: #8f9f3a;
  --olive-bright: #c6e84e;
  --paper-yellow: #f2d94e;
  --paper-blue: #6fb4e0;
  --paper-pink: #e888a3;
  --ink: #111309;
  --text: #f4f4ee;
  --muted: #9a9d8c;
  --line: rgba(244, 244, 238, 0.14);
  --line-bright: rgba(244, 244, 238, 0.3);
  --display: 'Archivo Black', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: var(--body);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--olive-bright);
  outline-offset: 3px;
}

.page {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--bg);
  border-radius: 0;
  overflow: hidden;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 60px;
}

section {
  padding: 120px 0;
  position: relative;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--olive-bright);
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  margin-bottom: 16px;
}

.section-sub {
  font-family: var(--body);
  color: var(--muted);
  font-size: 16px;
  max-width: 520px;
  margin-bottom: 64px;
}

/* ===== NAV ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 60px;
}

.logo {
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
}

.logo span {
  color: var(--olive-bright);
}

.nav-links {
  display: flex;
  gap: 42px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding-bottom: 5px;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--olive-bright);
}

.nav-links a.active {
  color: var(--olive-bright);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--olive-bright);
}

.btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 14.5px;
  padding: 14px 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all .2s;
  cursor: pointer;
  border: none;
}

.btn-solid {
  background: var(--olive-bright);
  color: var(--ink);
}

.btn-solid:hover {
  box-shadow: 0 0 0 3px rgba(198, 232, 78, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--line-bright);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--olive-bright);
  color: var(--olive-bright);
}

.btn-pill {
  background: var(--text);
  color: var(--ink);
  border-radius: 30px;
  font-weight: 700;
}

/* ===== HERO ===== */
.hero {
  padding: 0 60px 90px;
  position: relative;
  min-height: 900px;
}

.hero-inner {
  position: relative;
  min-height: 900px;
  padding-top: 20px;
}

.bg-text {
  font-family: var(--display);
  font-size: clamp(80px, 12vw, 200px);
  line-height: 0.95;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 238, 0.18);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
}

.photo-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(38vw, 440px);
  height: 450px;
  z-index: 2;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.35) brightness(1.15);
  mix-blend-mode: lighten;
  background: transparent;
}

.tag {
  position: absolute;
  z-index: 3;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  text-transform: uppercase;
  padding: 14px 16px;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}

.tag-single {
  background: var(--olive-bright);
  left: auto;
  right: 5%;
  top: 110px;
  width: 210px;
  transform: rotate(4deg);
  color: var(--ink);
}

.tag-n8n {
  background: var(--olive-bright);
  left: auto;
  right: 3%;
  top: 400px;
  width: 200px;
  transform: rotate(-3deg);
  color: var(--ink);
}

.tag-backend {
  background: var(--olive-bright);
  left: 3%;
  top: 130px;
  width: 190px;
  transform: rotate(-4deg);
  color: var(--ink);
}

.badge-circle {
  position: absolute;
  left: 2%;
  top: 340px;
  width: 190px;
  height: 190px;
  z-index: 3;
}

.badge-circle text {
  font-family: var(--mono);
  font-size: 10.4px;
  letter-spacing: 2.4px;
  fill: var(--text);
}

.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.hero-bio {
  max-width: 360px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.stats-row {
  display: flex;
  gap: 40px;
  position: relative;
  z-index: 3;
  margin-bottom: 36px;
}

.stat-num {
  font-family: var(--display);
  font-size: 26px;
  color: var(--olive-bright);
}

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ===== ABOUT ===== */
.about-grid {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 720px;
}

.about-text p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-text p strong {
  color: var(--text);
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-note {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 2px;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.skill-note:nth-child(6n+1) {
  background: var(--paper-yellow);
  transform: rotate(-3deg);
}

.skill-note:nth-child(6n+2) {
  background: var(--paper-blue);
  transform: rotate(2deg);
}

.skill-note:nth-child(6n+3) {
  background: var(--olive-bright);
  transform: rotate(-2deg);
}

.skill-note:nth-child(6n+4) {
  background: var(--paper-pink);
  transform: rotate(3deg);
}

.skill-note:nth-child(6n+5) {
  background: var(--paper-yellow);
  transform: rotate(1deg);
}

.skill-note:nth-child(6n+6) {
  background: var(--paper-blue);
  transform: rotate(-1deg);
}

.stack-group {
  margin-bottom: 38px;
}

.stack-group:last-child {
  margin-bottom: 0;
}

.stack-cat {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-bright);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stack-cat::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--olive-bright);
}

/* ===== EXPERIENCE ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-bright);
}

.tl-item {
  position: relative;
  padding-bottom: 56px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 6px;
  width: 13px;
  height: 13px;
  background: var(--bg);
  border: 2px solid var(--olive-bright);
  border-radius: 2px;
}

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

.tl-role {
  font-family: var(--display);
  font-size: 19px;
  text-transform: uppercase;
}

.tl-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--olive-bright);
  font-weight: 700;
}

.tl-org {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  font-family: var(--mono);
}

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

.tl-list li {
  color: var(--muted);
  font-size: 14.5px;
  padding-left: 20px;
  position: relative;
}

.tl-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--olive-bright);
}

/* ===== PROJECTS ===== */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.proj-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  transition: all .25s;
  position: relative;
}

.proj-card:hover {
  border-color: var(--olive-bright);
  transform: translateY(-3px);
}

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.proj-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--olive-bright);
  padding: 5px 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proj-link {
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
  transition: color .2s;
}

.proj-link:hover {
  color: var(--olive-bright);
}

.proj-card h3 {
  font-size: 21px;
  margin-bottom: 12px;
  text-transform: none;
  font-family: var(--display);
  letter-spacing: -0.005em;
}

.proj-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
  font-family: var(--body);
  text-transform: none;
}

.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stack-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 2px;
}

/* ===== TESTIMONIALS ===== */
.test-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 50px;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.test-card {
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
}

.test-card::before {
  content: "\201C";
  position: absolute;
  top: 10px;
  right: 20px;
  font-family: var(--display);
  font-size: 50px;
  color: var(--line-bright);
}

.stars {
  color: var(--olive-bright);
  font-size: 14px;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.test-quote {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.test-who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-avatar {
  width: 38px;
  height: 38px;
  background: var(--olive-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 12px;
  color: var(--ink);
}

.test-name {
  font-size: 13.5px;
  font-weight: 600;
}

.test-role {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 26px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left .2s;
}

.contact-row:hover {
  padding-left: 8px;
  border-color: var(--olive-bright);
}

.contact-row .k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.contact-row .v {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--body);
}

.contact-row .arrow {
  color: var(--olive-bright);
  opacity: 0;
  transition: opacity .2s;
}

.contact-row:hover .arrow {
  opacity: 1;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form input,
.form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--body);
  font-size: 14.5px;
  resize: none;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--olive-bright);
}

.form label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: -8px;
}

.form-status {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--olive-bright);
  min-height: 18px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 60px;
  text-align: center;
}

footer p {
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 880px) {
  .wrap,
  .hero,
  nav,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .nav-links {
    display: none;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .proj-grid,
  .test-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 70px 0;
  }

  .hero {
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-inner {
    min-height: auto;
  }

  .photo-wrap {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 420px;
    margin: 30px 0;
  }

  .tag,
  .badge-circle,
  .stats-row {
    display: none;
  }

  .hero-bottom {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .bg-text {
    font-size: 44px;
  }
}

/* ===== RAG CHAT WIDGET ===== */
#rag-chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--olive-bright);
  color: var(--ink);
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  font-family: var(--body);
}

#rag-chat-btn:hover {
  box-shadow: 0 0 0 4px rgba(198, 232, 78, 0.25);
}

#rag-chat-box {
  position: fixed;
  bottom: 98px;
  right: 28px;
  width: 340px;
  height: 460px;
  background: var(--bg);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: var(--body);
}

#rag-chat-header {
  background: #1a1c10;
  color: var(--olive-bright);
  padding: 14px 16px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}

#rag-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rag-msg {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 85%;
}

.rag-msg.user {
  background: var(--olive-bright);
  color: var(--ink);
  align-self: flex-end;
  font-weight: 500;
}

.rag-msg.bot {
  background: #1c1e12;
  color: var(--text);
  align-self: flex-start;
  border: 1px solid var(--line);
}

#rag-chat-input-row {
  display: flex;
  border-top: 1px solid var(--line);
}

#rag-chat-input {
  flex: 1;
  background: #1a1c10;
  border: none;
  color: var(--text);
  padding: 12px;
  font-size: 13.5px;
  font-family: var(--body);
  outline: none;
}

#rag-chat-input::placeholder {
  color: var(--muted);
}

#rag-chat-send {
  background: var(--olive-bright);
  color: var(--ink);
  border: none;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--body);
  font-size: 13px;
}
