/* ============================================================
   SSKA.SK — Portfolio of Simon Soka
   Design: Dark hero + warm light body, bold geometric type
   Typography: Outfit (display) + Sora (body)
   Accent: Orange #ff6b35
   Palette: Warm stone neutrals — no purple
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Dark surfaces (hero, footer) */
  --bg-dark: #1c1917;
  --bg-dark-surface: #292524;

  /* Light surfaces (body sections) */
  --bg-light: #fafaf9;
  --bg-light-alt: #f5f5f4;
  --bg-white: #ffffff;

  /* Text on dark */
  --text-on-dark: #fafaf9;
  --text-on-dark-muted: #a8a29e;

  /* Text on light */
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-tertiary: #a8a29e;

  /* Accent — vivid orange */
  --accent: #ff6b35;
  --accent-light: #ff8a50;
  --accent-dark: #e55a2b;

  /* Feedback */
  --error: #dc2626;

  /* Borders */
  --border-dark: #3a3633;
  --border-light: #e7e5e4;
  --border-light-strong: #d6d3d1;

  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Sora', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs: clamp(0.7rem, 0.66rem + 0.2vw, 0.78rem);
  --text-sm: clamp(0.8rem, 0.76rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  --text-xl: clamp(1.15rem, 1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --text-hero: clamp(3.5rem, 2.5rem + 6vw, 8rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-entrance: 700ms;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-light);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background-color: var(--accent);
  z-index: 200;
  width: 0%;
  will-change: width;
}

/* --- Selection --- */
::selection {
  background-color: var(--accent);
  color: var(--bg-white);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--space-4);
  transition: background-color var(--duration-base) var(--ease-out-quart),
              padding var(--duration-base) var(--ease-out-quart);
}

.site-header.scrolled {
  background-color: rgba(28, 25, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-block: var(--space-3);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast) var(--ease-out-quart);
}

.logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-on-dark-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  transition: color var(--duration-fast) var(--ease-out-quart);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-on-dark);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-3);
  right: var(--space-3);
  height: 2px;
  background-color: var(--accent);
  border-radius: 1px;
}

/* Header over light sections */
.site-header.over-light .logo {
  color: var(--text-primary);
}

.site-header.over-light .nav-links a {
  color: var(--text-tertiary);
}

.site-header.over-light .nav-links a:hover,
.site-header.over-light .nav-links a.active {
  color: var(--text-primary);
}

.site-header.over-light.scrolled {
  background-color: rgba(250, 250, 249, 0.95);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg-dark);
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 0.9;
  color: var(--text-on-dark);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.hero-name .accent {
  color: var(--accent);
}

.hero-tagline {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}


/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background-color: var(--accent);
  color: var(--bg-white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-quart),
              background-color var(--duration-fast) var(--ease-out-quart);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-on-dark-muted);
  padding: var(--space-3) var(--space-2);
  transition: color var(--duration-fast) var(--ease-out-quart);
}

.btn-ghost:hover {
  color: var(--text-on-dark);
}

.btn-ghost .arrow {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out-quart);
}

.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* On light backgrounds */
.btn-primary--light {
  background-color: var(--accent);
  color: var(--bg-white);
}

.btn-ghost--light {
  color: var(--text-secondary);
}

.btn-ghost--light:hover {
  color: var(--text-primary);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-12);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s var(--ease-in-out) infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  padding-block: var(--space-24);
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background-color: var(--bg-light);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-light);
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

.about-text {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 60ch;
}

.about-text + .about-text {
  margin-top: var(--space-4);
}

.skills-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.skill-category-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-1) var(--space-3);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

.skill-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ============================================================
   FORM TOAST
   ============================================================ */

.form-message {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 10000;
  max-width: 22rem;
  padding: var(--space-4) var(--space-6);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.5;
  box-shadow: 0 12px 32px rgb(28 25 23 / 0.24);
  animation: toast-in var(--duration-fast) var(--ease-out-quart);
}

.form-message--error {
  border-left-color: var(--error);
}

.form-message.is-leaving {
  animation: toast-out var(--duration-fast) var(--ease-out-quart) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(1rem); }
}

@keyframes toast-in-up {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out-down {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(1rem); }
}

/* On phones the fixed header owns the top-right corner, so the toast sits at
   the bottom and spans the width instead of covering the logo. */
@media (max-width: 767px) {
  .form-message {
    top: auto;
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
    text-align: center;
    animation-name: toast-in-up;
  }

  .form-message.is-leaving {
    animation-name: toast-out-down;
  }
}

/* ============================================================
   BOOKING MODAL
   ============================================================ */

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.booking-modal[hidden] {
  display: none;
}

.booking-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(28 25 23 / 0.72);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out-quart);
}

.booking-modal.is-open .booking-modal-backdrop {
  opacity: 1;
}

.booking-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Wide enough that Cal renders its month grid and slot column side by side
     instead of stacking them into a stretched single column. */
  width: min(64rem, 100%);
  height: min(40rem, 88vh);
  border-radius: 10px;
  background-color: var(--bg-white);
  box-shadow: 0 24px 64px rgb(28 25 23 / 0.32);
  opacity: 0;
  transform: translateY(0.75rem) scale(0.99);
  transition: opacity var(--duration-base) var(--ease-out-quart),
              transform var(--duration-base) var(--ease-out-quart);
  overflow: hidden;
}

.booking-modal.is-open .booking-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.booking-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.booking-modal-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}

.booking-modal-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 4px;
  background-color: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out-quart),
              color var(--duration-fast) var(--ease-out-quart);
}

.booking-modal-close:hover {
  background-color: var(--bg-light-alt);
  color: var(--text-primary);
}

.booking-modal-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.booking-modal-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.booking-modal-body.is-ready .booking-modal-loading {
  display: none;
}

.booking-modal-frame {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out-quart);
}

.booking-modal-body.is-ready .booking-modal-frame {
  opacity: 1;
}

body.has-modal-open {
  overflow: hidden;
}

.resume-cta {
  margin-top: var(--space-8);
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.experience {
  background-color: var(--bg-light-alt);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--border-light-strong);
}

.timeline-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-8);
  padding-block: var(--space-8);
  position: relative;
}

.timeline-item + .timeline-item {
  border-top: none;
}

.timeline-date {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  padding-top: var(--space-1);
  text-align: right;
  padding-right: var(--space-8);
  position: relative;
}

.timeline-date::after {
  content: '';
  position: absolute;
  right: calc(var(--space-8) * -1 - 3.5px);
  top: 0.6rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--border-light-strong);
  border: 2px solid var(--bg-light-alt);
  transition: background-color var(--duration-base) var(--ease-out-quart);
}

.timeline-item:hover .timeline-date::after {
  background-color: var(--accent);
}

.timeline-content {
  padding-bottom: var(--space-4);
}

.timeline-company {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.timeline-role {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.timeline-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.timeline-details li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: var(--space-4);
  position: relative;
}

.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 1px;
  background-color: var(--text-tertiary);
}

.timeline-achievements {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.timeline-achievements li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 500;
  padding-left: var(--space-4);
  position: relative;
}

.timeline-achievements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
  background-color: var(--bg-light);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.project-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart);
  will-change: transform;
}

.project-card:hover {
  border-color: var(--border-light-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.project-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-light-alt);
}

.project-card-image img {
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 3s var(--ease-out-quart);
}

.project-card:hover .project-card-image img {
  transform: translateY(-15%);
}

.project-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card-type {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.project-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.project-card-description {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  flex: 1;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.project-card-tech span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 2px var(--space-2);
  background-color: var(--bg-light-alt);
  border-radius: 3px;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--duration-fast) var(--ease-out-quart);
}

.project-card-link:hover {
  gap: var(--space-3);
}

.project-card-link .arrow {
  transition: transform var(--duration-fast) var(--ease-out-quart);
}

@media (max-width: 767px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background-color: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-intro {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 40ch;
}

.contact-links {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out-quart);
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-tertiary);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  align-self: flex-start;
  margin-top: var(--space-2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--bg-dark);
  padding-block: var(--space-16);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast) var(--ease-out-quart);
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  color: var(--accent-light);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-entrance) var(--ease-out-expo),
              transform var(--duration-entrance) var(--ease-out-expo);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade"] {
  transform: none;
}

[data-animate="fade"].is-visible {
  opacity: 1;
}

/* Scale animation */
[data-animate="scale"] {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--duration-entrance) var(--ease-out-expo),
              transform var(--duration-entrance) var(--ease-out-expo);
}

[data-animate="scale"].is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Slide from left */
[data-animate="slide-left"] {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-entrance) var(--ease-out-expo),
              transform var(--duration-entrance) var(--ease-out-expo);
}

[data-animate="slide-left"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
[data-animate="slide-right"] {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--duration-entrance) var(--ease-out-expo),
              transform var(--duration-entrance) var(--ease-out-expo);
}

[data-animate="slide-right"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
[data-stagger] > [data-animate] {
  transition-delay: calc(var(--i, 0) * 80ms);
}

[data-stagger] > [data-animate="scale"] {
  transition-delay: calc(var(--i, 0) * 100ms);
}

/* Hero-specific entrance */
.hero [data-animate] {
  opacity: 0;
  transform: translateY(32px);
}

.hero [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Character reveal — for hero name (needs .hero prefix to beat .hero [data-animate]) */
.hero [data-animate="chars"] {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-name-line {
  display: block;
}

.hero-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.2em);
  filter: blur(6px);
  transition: opacity 0.4s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo),
              filter 0.4s var(--ease-out-expo),
              text-shadow 0.8s ease-out;
  will-change: transform;
}

.hero-char.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  text-shadow: 0 0 40px var(--accent), 0 0 80px rgba(255, 107, 53, 0.3);
}

/* Glow fades out after appearing */
.hero-char.glow-fade {
  text-shadow: 0 0 0 transparent;
}

/* Geometric accent rings behind hero name */
.hero-name {
  position: relative;
}

.hero-name::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255, 107, 53, 0.07);
  border-radius: 50%;
  pointer-events: none;
  animation: ring-spin 30s linear infinite;
}

.hero-name::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 85%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 107, 53, 0.05);
  border-radius: 50%;
  pointer-events: none;
  animation: ring-spin 25s linear infinite reverse;
}

@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Subtle grid background */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 70%);
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
}

.hero.hero--loaded::after {
  opacity: 1;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-animate],
  [data-animate="scale"],
  [data-animate="slide-left"],
  [data-animate="slide-right"] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-char {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
    text-shadow: none;
  }

  .hero-name::before,
  .hero-name::after {
    animation: none;
  }

  .scroll-indicator span {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .skills-group {
    gap: var(--space-6);
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 100svh;
    padding-top: 4rem;
  }

  .hero-name {
    font-size: clamp(2.5rem, 2rem + 8vw, 5rem);
  }

  .hero-tagline {
    font-size: var(--text-base);
  }


  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-12);
  }

  .section {
    padding-block: var(--space-16);
  }

  /* Timeline: collapse to single column */
  .timeline::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding-block: var(--space-6);
    border-top: 1px solid var(--border-light);
  }

  .timeline-item:first-child {
    border-top: none;
  }

  .timeline-date {
    text-align: left;
    padding-right: 0;
  }

  .timeline-date::after {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding: var(--space-2);
    font-size: var(--text-xs);
  }
}

/* ============================================================
   PRINT — renders the site as a clean CV/resume
   ============================================================ */
@media print {
  @page {
    size: A4;
    margin: 12mm 14mm;
  }

  /* --- Nuclear reset: kill dark backgrounds, motion, transforms --- */
  *,
  *::before,
  *::after {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  /* --- Base --- */
  html {
    background: #fff !important;
  }

  body {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 8.5pt;
    line-height: 1.5;
    color: #292524;
    background: #fff !important;
    margin: 0;
    /* Keeps breathing room even when the print dialog is set to Margins: None */
    padding: 4mm 5mm;
    orphans: 3;
    widows: 3;
  }

  .container {
    max-width: 100%;
    padding-inline: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  /* --- Hide non-CV elements --- */
  .site-header,
  .site-footer,
  .scroll-indicator,
  .scroll-progress,
  .contact-form,
  .hero-actions,
  .project-card-image,
  .resume-cta,
  .project-card-link,
  .project-card-description,
  .about-text,
  .hero::after,
  .hero-name::before,
  .hero-name::after,
  .contact-intro {
    display: none !important;
  }

  /* --- Hero → CV letterhead --- */
  .hero {
    min-height: auto !important;
    padding: 0 0 10pt 0 !important;
    display: block !important;
    border-bottom: 2pt solid #ff6b35;
    margin-bottom: 12pt;
    overflow: visible !important;
  }

  .hero-inner {
    display: block !important;
    text-align: left !important;
  }

  .hero-eyebrow {
    font-size: 8pt;
    font-weight: 600;
    color: #ff6b35 !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 3pt;
  }

  .hero-name {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 28pt;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4pt;
    line-height: 1;
  }

  .hero-name-line {
    display: inline !important;
  }

  .hero-name,
  .hero-char {
    color: #1c1917 !important;
  }

  .hero-name .accent,
  .hero-name .accent .hero-char {
    color: #ff6b35 !important;
  }

  .hero-tagline {
    font-size: 9.5pt;
    color: #57534e !important;
    max-width: 150mm;
    margin: 0;
    line-height: 1.5;
  }

  /* --- Sections --- */
  .section {
    padding-block: 0 !important;
    margin-bottom: 10pt;
  }

  /* Hide website-style display titles; labels become CV headings */
  .section-title {
    display: none !important;
  }

  .section-label {
    display: block !important;
    font-size: 8.5pt;
    font-weight: 700;
    color: #ff6b35 !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 6pt;
    padding-bottom: 3pt;
    border-bottom: 0.75pt solid #e7e5e4;
    break-after: avoid;
    page-break-after: avoid;
  }

  /* --- Stats row (JS counter may still read 0 — print the data attrs) --- */
  .stats-row {
    display: flex !important;
    gap: 24pt;
    margin: 0 0 8pt 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .stat {
    display: block !important;
    text-align: left !important;
  }

  .stat-number {
    font-size: 0 !important;
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .stat-number::after {
    content: attr(data-count) attr(data-suffix);
    font-size: 15pt;
    font-weight: 800;
    color: #1c1917 !important;
    letter-spacing: -0.01em;
  }

  .stat-suffix {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 12pt;
    font-weight: 700;
    color: #ff6b35 !important;
  }

  .stat-label {
    display: block;
    font-size: 6.5pt;
    font-weight: 600;
    color: #78716c !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 1pt;
  }

  /* --- About → Skills --- */
  .about {
    margin-bottom: 10pt !important;
  }

  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .skills-group {
    display: flex !important;
    flex-direction: column;
    gap: 3pt;
  }

  .skill-category {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline;
    gap: 8pt;
  }

  .skill-category-label {
    font-size: 6.5pt;
    font-weight: 700;
    color: #a8a29e !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    min-width: 64pt;
    flex-shrink: 0;
  }

  .skill-tags {
    gap: 0;
  }

  .skill-tag {
    font-size: 8pt;
    padding: 0;
    border: none;
    color: #44403c !important;
  }

  .skill-tag::after {
    content: '\00b7';
    margin-inline: 4pt;
    color: #d6d3d1;
  }

  .skill-tag:last-child::after {
    content: none;
  }

  .skill-note {
    font-size: 6.5pt;
    color: #a8a29e !important;
    white-space: nowrap;
  }

  /* --- Experience timeline --- */
  .experience {
    margin-bottom: 10pt !important;
  }

  .timeline {
    gap: 0 !important;
  }

  .timeline::before {
    display: none !important;
  }

  .timeline-item {
    grid-template-columns: 68pt 1fr;
    gap: 10pt;
    padding-block: 5pt;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .timeline-item + .timeline-item {
    border-top: 0.5pt solid #e7e5e4;
  }

  .timeline-date {
    font-size: 7pt;
    font-weight: 600;
    text-align: right;
    padding-right: 0;
    padding-top: 2pt;
    color: #a8a29e !important;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  .timeline-date::after {
    display: none !important;
  }

  .timeline-company {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 10.5pt;
    font-weight: 700;
    color: #1c1917 !important;
    margin-bottom: 0;
    line-height: 1.25;
  }

  .timeline-role {
    font-size: 8pt;
    color: #78716c !important;
    margin-bottom: 3pt;
  }

  .timeline-details {
    gap: 1.5pt;
  }

  .timeline-details li {
    font-size: 8pt;
    line-height: 1.45;
    color: #44403c !important;
    padding-left: 8pt;
  }

  .timeline-details li::before {
    top: 0.6em;
    width: 3.5pt;
    height: 0.75pt;
    background: #d6d3d1 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .timeline-achievements {
    margin-top: 3pt;
  }

  .timeline-achievements li {
    font-size: 8pt;
    line-height: 1.45;
    font-weight: 600;
    color: #1c1917 !important;
    padding-left: 8pt;
  }

  .timeline-achievements li::before {
    width: 3.5pt;
    height: 3.5pt;
    top: 0.4em;
    border-radius: 50%;
    background: #ff6b35 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* --- Projects (compact rows) --- */
  .projects {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .project-grid {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }

  .project-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline;
    border: none !important;
    border-radius: 0 !important;
    padding: 3pt 0;
    overflow: visible !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .project-card + .project-card {
    border-top: 0.5pt solid #e7e5e4 !important;
  }

  .project-card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline;
    gap: 8pt;
    padding: 0 !important;
    flex: 1;
  }

  .project-card-type {
    font-size: 6.5pt;
    font-weight: 600;
    color: #a8a29e !important;
    margin-bottom: 0 !important;
    min-width: 64pt;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .project-card-title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 9pt;
    font-weight: 700;
    color: #1c1917 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
  }

  .project-card-tech {
    display: flex !important;
    gap: 0;
    margin: 0 !important;
  }

  .project-card-tech span {
    font-size: 7pt;
    color: #78716c !important;
    padding: 0;
    border: none !important;
    background: transparent !important;
  }

  .project-card-tech span::after {
    content: '\00b7';
    margin-inline: 3pt;
    color: #d6d3d1;
  }

  .project-card-tech span:last-child::after {
    content: none;
  }

  .project-card::after {
    content: attr(href);
    font-size: 7pt;
    color: #ff6b35 !important;
    margin-left: auto;
    padding-left: 8pt;
    white-space: nowrap;
  }

  /* --- Contact → footer strip --- */
  .contact,
  #contact {
    padding-block: 6pt 0 !important;
    margin-bottom: 0 !important;
    border-top: 2pt solid #ff6b35;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .contact .section-label,
  .contact .section-title {
    display: none !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 14pt;
    margin-top: 0;
  }

  .contact-link {
    font-size: 8pt;
    font-weight: 500;
    color: #44403c !important;
    gap: 3pt;
    align-items: center;
  }

  .contact-link svg {
    width: 8px;
    height: 8px;
    color: #ff6b35 !important;
  }

  /* Print the actual URLs for external profiles */
  .contact-link[target="_blank"]::after {
    content: attr(href);
    font-size: 7pt;
    font-weight: 400;
    color: #a8a29e !important;
    margin-left: 2pt;
  }
}
