:root {
  --ink: #11110f;
  --paper: #f2f0e9;
  --muted: #68675f;
  --line: #cbc8bc;
  --acid: #d8ff3e;
  --orange: #ff5c35;
  --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }
::selection { color: var(--ink); background: var(--acid); }

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid var(--ink);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.mark::before {
  width: 15px;
  height: 15px;
  content: "";
  background: var(--orange);
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.lang {
  padding: 5px 8px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 70px;
  min-height: calc(100vh - 82px);
  padding: clamp(70px, 11vw, 150px) 0 70px;
  align-items: end;
  isolation: isolate;
}

.canvas-stage {
  position: absolute;
  z-index: 0;
  inset: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: pan-y;
}

.hero-title,
.hero-side {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.canvas-hint {
  position: absolute;
  z-index: 1;
  top: 43%;
  left: 50%;
  display: grid;
  width: 88px;
  height: 88px;
  margin: 0;
  color: var(--ink);
  background: var(--acid);
  border-radius: 50%;
  place-items: center;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow,
.section-label,
.meta {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.eyebrow { margin: 0 0 22px; }
.eyebrow span { display: inline-block; padding: 6px 9px; background: var(--acid); }

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(64px, 11.6vw, 164px);
  font-weight: 800;
  letter-spacing: -.085em;
  line-height: .79;
}

h1 em {
  display: block;
  color: var(--paper);
  font-style: normal;
  -webkit-text-stroke: 2px var(--ink);
}

.hero-side {
  padding-bottom: 3px;
  border-top: 1px solid var(--ink);
}

.hero-side p {
  margin: 20px 0 34px;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.35;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.status::before {
  width: 9px;
  height: 9px;
  content: "";
  background: #28a745;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, .13);
}

.intro {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 70px;
  padding: 120px 0;
  border-top: 1px solid var(--ink);
}

.intro-copy {
  max-width: 900px;
  margin: 0;
  font-size: clamp(30px, 4.2vw, 60px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.07;
}

.intro-copy .accent {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: .13em;
  text-underline-offset: .08em;
}

.section {
  padding: 110px 0;
  border-top: 1px solid var(--ink);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 64px;
}

h2 {
  margin: 0;
  font-size: clamp(50px, 8vw, 104px);
  letter-spacing: -.07em;
  line-height: .85;
}

.project {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(240px, 390px);
  gap: 32px;
  padding: 31px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.project:last-child { border-bottom: 1px solid var(--line); }
.project-number { color: var(--muted); font-family: "Courier New", monospace; font-size: 13px; }
.project h3 {
  margin: -7px 0 7px;
  font-size: clamp(28px, 4vw, 50px);
  letter-spacing: -.045em;
  line-height: 1;
}

.project-tech {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  text-transform: uppercase;
}

.project p { max-width: 380px; margin: 0; font-size: 17px; }

.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}

.role {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  padding: 40px 36px 50px 0;
  border-bottom: 1px solid var(--line);
}

.role:nth-child(even) {
  padding-right: 0;
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.role time { font-family: "Courier New", monospace; font-size: 12px; }
.role h3 { margin: -6px 0 12px; font-size: 27px; letter-spacing: -.035em; line-height: 1.1; }
.role p { margin: 0; color: var(--muted); }

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.skill-group {
  min-height: 240px;
  padding: 30px;
  background: var(--paper);
}

.skill-group:nth-child(2),
.skill-group:nth-child(5) { background: var(--acid); }
.skill-group h3 { margin: 0 0 42px; font-family: "Courier New", monospace; font-size: 13px; text-transform: uppercase; }
.skill-group p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; }

.contact {
  color: var(--paper);
  background: var(--ink);
}

.contact-inner { padding: 100px 0 34px; }
.contact h2 { max-width: 900px; font-size: clamp(58px, 10vw, 140px); }
.contact h2 span { color: var(--acid); }
.contact-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 80px;
  padding: 28px 0;
  border-top: 1px solid #494942;
  border-bottom: 1px solid #494942;
}

.contact-row a {
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration-color: var(--orange);
  text-underline-offset: 7px;
}

.socials { display: flex; gap: 18px; }
.socials a { font-family: "Courier New", monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

footer {
  padding-top: 30px;
  color: #99988f;
  font-family: "Courier New", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.analytics-info {
  margin-top: 24px;
  border-top: 1px solid #494942;
}

.analytics-info summary {
  width: fit-content;
  padding: 20px 0 0;
  color: var(--paper);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .06em;
}

.analytics-copy {
  max-width: 760px;
  padding: 10px 0 20px;
  color: #b9b8af;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  text-transform: none;
}

.analytics-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.analytics-actions button {
  padding: 8px 11px;
  color: var(--paper);
  background: transparent;
  border: 1px solid #77766f;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.analytics-actions button:hover,
.analytics-actions button:focus-visible {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--acid);
}

.analytics-status { color: var(--acid); }

[data-en]::after { content: ""; }

@media (max-width: 850px) {
  .nav-links a { display: none; }
  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    min-height: auto;
    align-items: start;
  }
  .hero-title { grid-row: 1; }
  .canvas-stage {
    position: relative;
    grid-row: 2;
    width: 100%;
    height: clamp(230px, 55vw, 360px);
    inset: auto;
    border-top: 1px solid var(--line);
  }
  .hero-side { grid-row: 3; }
  .hero-side { width: min(100%, 430px); }
  .intro { grid-template-columns: 1fr; gap: 35px; padding: 85px 0; }
  .project { grid-template-columns: 45px 1fr; }
  .project p { grid-column: 2; }
  .experience-grid { grid-template-columns: 1fr; }
  .role:nth-child(even) { padding-left: 0; border-left: 0; }
  .skills { grid-template-columns: 1fr 1fr; }
  .contact-row { align-items: start; flex-direction: column; }
  .canvas-hint {
    top: 50%;
    width: 76px;
    height: 76px;
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 68px; }
  .hero {
    gap: 30px;
    padding-top: 56px;
  }
  .hero-canvas { opacity: .52; }
  h1 {
    font-size: clamp(52px, 17.5vw, 72px);
    letter-spacing: -.075em;
    line-height: .84;
  }
  h1 em {
    font-size: .96em;
    letter-spacing: -.07em;
    -webkit-text-stroke-width: 1px;
  }
  .section { padding: 80px 0; }
  .section-head { align-items: start; flex-direction: column; margin-bottom: 45px; }
  .project { grid-template-columns: 34px 1fr; gap: 14px; }
  .role { grid-template-columns: 1fr; gap: 12px; padding-right: 0; }
  .skills { grid-template-columns: 1fr; }
  .skill-group { min-height: 190px; }
  .contact-inner { padding-top: 75px; }
  .socials { flex-wrap: wrap; }
  .footer-meta,
  .analytics-actions { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Scroll reveals: enabled by JS only, so content stays visible without scripting. */
.has-scroll-effects .reveal {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
  transition:
    opacity .8s cubic-bezier(.22, 1, .36, 1),
    transform .8s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.has-scroll-effects .reveal.from-left {
  transform: translate3d(-42px, 0, 0);
}

.has-scroll-effects .reveal.from-right {
  transform: translate3d(42px, 0, 0);
}

.has-scroll-effects .reveal.scale-in {
  transform: translate3d(0, 24px, 0) scale(.94);
}

.has-scroll-effects .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.has-scroll-effects .section-head.reveal {
  overflow: hidden;
}

.has-scroll-effects .project.reveal::after,
.has-scroll-effects .role.reveal::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--reveal-delay, 0ms) + 180ms);
}

.has-scroll-effects .project.reveal,
.has-scroll-effects .role.reveal {
  position: relative;
}

.has-scroll-effects .project.reveal.is-visible::after,
.has-scroll-effects .role.reveal.is-visible::after {
  transform: scaleX(1);
}

.has-scroll-effects .skill-group.reveal {
  transform-origin: center bottom;
}

.parallax-item {
  --parallax-y: 0px;
  translate: 0 var(--parallax-y);
  will-change: translate;
}

@media (prefers-reduced-motion: reduce) {
  .has-scroll-effects .reveal,
  .has-scroll-effects .reveal.from-left,
  .has-scroll-effects .reveal.from-right,
  .has-scroll-effects .reveal.scale-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .has-scroll-effects .project.reveal::after,
  .has-scroll-effects .role.reveal::after {
    display: none;
  }

  .parallax-item {
    translate: none;
  }
}
