/* Rusnak Studio — light minimalist, recruiter-focused. Primary accent: RGB blue. */

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --text: #0a0a0a;
  --text-muted: #525252;
  --text-subtle: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  /* Primary accent — clear RGB blue */
  --accent: rgb(0, 102, 255);
  --accent-hover: rgb(0, 82, 204);
  --accent-soft: rgba(0, 102, 255, 0.08);
  --accent-ring: rgba(0, 102, 255, 0.35);
  --grid-line: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1280px;
  --page-gutter: max(20px, 4vw);
  --header-h: 4rem;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

.reduce-motion .hero__parallax {
  transform: none !important;
}

body.page-studio {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

/* --- Scroll progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}

.scroll-progress__fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* --- Sticky header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.85;
}

.brand__mark {
  border-radius: 10px;
  border: 1px solid var(--border);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.15;
}

.brand__name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.brand__role {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-anchor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  flex: 1;
}

.nav-anchor a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 6px 0;
  transition: color 0.15s var(--ease);
}

.nav-anchor a:hover {
  color: var(--text);
}

.site-header__cta {
  flex-shrink: 0;
}

.nav-mobile {
  display: none;
}

@media (max-width: 860px) {
  .nav-anchor {
    display: none;
  }

  .nav-mobile {
    display: block;
    position: relative;
  }

  .nav-mobile__summary {
    list-style: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated);
  }

  .nav-mobile__summary::-webkit-details-marker {
    display: none;
  }

  .nav-mobile__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 120;
  }

  .nav-mobile__panel a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 4px;
  }

  .nav-mobile__panel a:hover {
    color: var(--accent);
  }
}

/* --- Section dots (desktop) --- */
.section-nav {
  position: fixed;
  right: max(12px, 2vw);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: none;
}

@media (min-width: 1100px) {
  .section-nav {
    display: block;
  }
}

.section-nav__dots {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.section-nav__dot {
  display: block;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--border-strong);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.section-nav__dot span {
  display: none;
}

.section-nav__dot:hover {
  border-color: var(--accent);
  transform: scale(1.15);
}

.section-nav__dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

/* --- Layout: one column width + gutters (matches hero & header) --- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

.container--narrow {
  max-width: var(--max);
}

.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section__header {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  max-width: none;
  width: 100%;
}

.section__header--tight {
  margin-bottom: 1.5rem;
}

.section__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 10px;
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text);
}

.section__deck {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Hero --- */
.section--hero {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(4rem, 10vw, 5rem);
  min-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.reduce-motion .hero-canvas {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-canvas {
    display: none;
  }
}

.hero__parallax {
  position: absolute;
  inset: -20% -10% 40% -10%;
  z-index: 1;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(0, 102, 255, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0, 0, 0, 0.03), transparent 50%);
  will-change: transform;
}

.hero__gridlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.45;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 85%);
}

.section--hero.has-hero-canvas .hero__gridlines {
  display: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
}

.hero__copy {
  max-width: 100%;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 16px;
}

.hero__title {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 20px;
  color: var(--text);
}

.hero__lead {
  font-size: clamp(16px, 2.1vw, 18px);
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.65;
}

.hero__sub {
  font-size: 15px;
  color: var(--text-subtle);
  margin: 0 0 28px;
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease),
    transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}

.btn--secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  border-color: var(--text-subtle);
  background: #f5f5f5;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn--ghost:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Scroll hint --- */
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-hint__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.6;
  animation: scroll-hint-pulse 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint__line {
    animation: none;
  }
}

@keyframes scroll-hint-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.9);
  }
  50% {
    opacity: 0.85;
    transform: scaleY(1);
  }
}

/* --- Skills grid --- */
.skills-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.skills-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.skills-card:hover {
  border-color: rgba(0, 102, 255, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.skills-card__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.skills-card__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* --- Work / impact --- */
.impact-strip {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 10px;
}

.impact-strip__item {
  position: relative;
  padding: 12px 16px 12px 20px;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-left-color: var(--accent);
}

.case-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.case-label__tag {
  color: var(--text);
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: clamp(20px, 4vw, 28px);
  box-shadow: var(--shadow-sm);
}

.project-card__head {
  margin-bottom: 20px;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.project-card__meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
}

.project-card__grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 768px) {
  .project-card__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.project-card__block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.metric-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(0, 102, 255, 0.15);
}

/* --- Tech --- */
.tech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-list__item {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.tech-list__item:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* --- About --- */
.about__lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: none;
  width: 100%;
}

.details-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 0;
}

.details-block summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.details-block summary::-webkit-details-marker {
  display: none;
}

.details-block summary::after {
  content: "+";
  float: right;
  font-weight: 700;
  color: var(--accent);
}

.details-block[open] summary::after {
  content: "−";
}

.details-block__body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.details-block__p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.55;
}

.details-block__p:last-child {
  margin-bottom: 0;
}

/* --- Compact --- */
.section--compact {
  padding: 2rem 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.02));
}

.compact-banner {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.compact-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.compact-list li {
  margin-bottom: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Contact CTA --- */
.section--contact {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

.cta-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: clamp(24px, 5vw, 44px);
  box-shadow: var(--shadow-md);
  text-align: left;
}

.cta-panel .section__header {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  max-width: none;
  width: 100%;
}

.cta-panel .section__deck {
  max-width: none;
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 24px;
}

.rates-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-subtle);
  text-align: left;
  max-width: none;
}

.rates-line__label {
  display: block;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.rates-line__val {
  font-weight: 700;
  color: var(--text);
}

/* --- Reveal: class kept for hooks; content visible without JS (no opacity:0 trap) --- */
.reveal {
  opacity: 1;
  transform: none;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  background: #f5f5f5;
}

.site-footer__inner {
  text-align: center;
}

.site-footer__note {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-subtle);
}

.site-footer__back a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__back a:hover {
  text-decoration: underline;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}