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

:root {
  --bg: #0a0a0a;
  --fg: #f0ede8;
  --muted: #555;
  --accent: #e8d5b0;
  --line: #1e1e1e;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Syne', sans-serif;
}

html {
  scroll-behavior: smooth;
  cursor: none;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

a, button, .tag, .contact-link-row, .email-protected-row {
  cursor: none !important;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── CUSTOM CURSOR ── */
#cursor-wrap {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  mix-blend-mode: screen;
}

#cursor-wrap.active { opacity: 1; }

#cursor-canvas {
  display: block;
  width: 140px;
  height: 140px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── SECTIONS SHARED ── */
section {
  padding: 8rem 2.25rem;
  width: min(1220px, calc(100% - 4.5rem));
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

section.visible { opacity: 1; transform: translateY(0); }

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 120px;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 10rem;
  padding-bottom: 6rem;
  position: relative;
  opacity: 1;
  transform: none;
}

.hero-index {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
}

.hero-name {
  font-family: var(--sans);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 2.75rem;
  max-width: 1100px;
}

.hero-name span {
  display: block;
  color: var(--accent);
}

.hero-meta {
  display: grid;
  grid-template-columns: minmax(320px, 420px) auto;
  gap: 4.5rem;
  align-items: start;
  max-width: 860px;
}

.hero-desc {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.85;
}

.hero-status {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.75rem;
  padding-top: 0.1rem;
}

.hero-status-item {
  display: flex;
  gap: 0.75rem;
  color: var(--muted);
}

.hero-status-item strong { color: var(--fg); }

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 2.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeUpDown 2s ease-in-out infinite;
}

.scroll-hint::before {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--muted);
}

@keyframes fadeUpDown {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(260px, 0.9fr);
  gap: 6rem;
  align-items: start;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #aaa;
}

.about-text strong { color: var(--fg); font-weight: 400; }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

.fact-label { color: var(--muted); }
.fact-value { color: var(--fg); text-align: right; }

/* ── SKILLS — CONVEYOR BELT ── */
.skills-conveyor {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.conveyor-row {
  overflow: hidden;
  position: relative;
  padding-top: 1.5rem;
}

.conveyor-row::before,
.conveyor-row::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.conveyor-row::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.conveyor-row::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.conveyor-label {
  position: relative;
  z-index: 3;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.conveyor-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  padding-left: 80px;
  padding-right: 80px;
}

.conveyor-track.paused { animation-play-state: paused !important; }

@keyframes scrollRight {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes scrollLeft {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.conveyor-track.dir-right {
  animation: scrollRight 18s linear infinite;
}

.conveyor-track.dir-left {
  animation: scrollLeft 18s linear infinite;
}

.tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  color: var(--fg);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── PROJECTS ── */
.projects-list { display: flex; flex-direction: column; }

.project-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.project-row:first-child { border-top: 1px solid var(--line); }

.project-num {
  font-size: 0.7rem;
  color: var(--muted);
  padding-top: 0.25rem;
}

.project-title {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: 1rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-pill {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232,213,176,0.06);
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(232,213,176,0.15);
}

.project-year {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.25rem;
}

/* ── EXPERIENCE ── */
.exp-list { display: flex; flex-direction: column; gap: 0; }

.exp-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.exp-row:first-child { border-top: 1px solid var(--line); }

.exp-meta { display: flex; flex-direction: column; gap: 0.3rem; }

.exp-date {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.exp-company {
  font-size: 0.8rem;
  color: var(--accent);
}

.exp-title {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.exp-bullets li {
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.7;
}

.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--line);
}

/* ── CONTACT ── */
.contact-inner { display: flex; flex-direction: column; gap: 1rem; }

.contact-heading {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 2rem;
}

.contact-heading em { font-style: normal; color: var(--accent); }

.contact-links { display: flex; flex-direction: column; gap: 0; }

.contact-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  transition: color 0.2s;
}

.contact-link-row:first-child { border-top: 1px solid var(--line); }
.contact-link-row:hover { color: var(--fg); }
.contact-link-row:hover .link-arrow { transform: translateX(4px); }

.email-protected-row {
  user-select: none;
}

.link-label {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.link-value { font-size: 0.85rem; }
.link-arrow { transition: transform 0.2s; }

/* ── FOOTER ── */
footer {
  width: min(1220px, calc(100% - 4.5rem));
  margin: 0 auto;
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
}

::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); }

@media (max-width: 900px) {
  .hero-meta {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 520px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .exp-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .project-row {
    grid-template-columns: 2rem 1fr;
  }

  .project-year { display: none; }
}

@media (max-width: 768px) {
  nav { padding: 1.25rem 1.25rem; }

  section {
    padding: 5rem 1.25rem;
    width: min(1220px, calc(100% - 2.5rem));
  }

  #hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
  }

  footer {
    flex-direction: column;
    gap: 0.5rem;
    width: min(1220px, calc(100% - 2.5rem));
    padding: 2rem 0;
  }

  .scroll-hint { display: none; }
  .nav-links { gap: 1.25rem; }
}
