/* ============================================
   JURE MARINOV — PORTFOLIO
   Signal Orange Design System
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:    #0a0a0a;
  --white:    #ffffff;
  --orange:   #FF4D00;
  --gray-50:  #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #999999;
  --gray-600: #555555;
  --gray-800: #222222;
  --border:   #e2e2e2;
  --font:     "Inter", -apple-system, sans-serif;
  --mono:     "JetBrains Mono", "Fira Code", monospace;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --radius:   4px;
  --transition: 0.2s ease;
  --max-width: 1100px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

section {
  padding: 80px 0;
}

/* ============================================
   SPLASH
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: opacity;
  perspective: 1000px;
  transition: opacity 0.3s ease;
}

.splash.gone {
  opacity: 0;
  pointer-events: none;
}

.spiro-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: spiroFadeIn 1s ease 0.2s forwards;
}

@keyframes spiroFadeIn {
  to { opacity: 1; }
}

.spiro-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  opacity: 0;
  animation: spiroFadeIn 0.7s ease 0.6s forwards;
  mix-blend-mode: screen;
}

.spiro-logo-img {
  width: 220px;
  height: 220px;
  display: block;
  filter: invert(1);
  clip-path: inset(8%);
}

.scroll-hint {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: spiroFadeIn 0.6s ease 1.4s forwards;
  color: rgba(255,255,255,0.35);
}

.scroll-hint span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(255,77,0,0.45);
  border-radius: 12px;
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--orange);
  border-radius: 2px;
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 1; }
  75%       { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  transition: color 0.35s;
}

.nav.scrolled .nav-logo {
  color: var(--black);
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo-img,
.nav-logo img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
  filter: invert(1);
  transition: filter 0.35s;
}

.nav.scrolled .nav-logo-img,
.nav.scrolled .nav-logo img {
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  font-weight: 450;
  letter-spacing: 0.01em;
  transition: color 0.3s;
  text-decoration: none;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-links a.active {
  color: #fff;
}

.nav.scrolled .nav-links a {
  color: var(--gray-600);
}

.nav.scrolled .nav-links a:hover,
.nav.scrolled .nav-links a.active {
  color: var(--black);
}

.nav-cta {
  background: var(--orange) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 20px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: #e04200 !important;
  color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: background 0.35s, transform var(--transition);
}

.nav.scrolled .nav-toggle span {
  background: var(--black);
}

/* ============================================
   PAGE HEADER (shared — other pages)
   ============================================ */

.page-header {
  padding: 110px 0 72px;
  border-bottom: 1px solid var(--border);
}

.page-header .section-eyebrow {
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin-bottom: 24px;
}

.page-header h1 em {
  font-style: normal;
  color: var(--orange);
}

.page-header p {
  font-size: 1rem;
  color: var(--gray-600);
  max-width: 560px;
  line-height: 1.7;
  margin-top: 20px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 8px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  transition: all 0.18s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-primary:hover {
  background: var(--gray-800);
  text-decoration: none;
  opacity: 0.85;
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--black);
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ============================================
   HERO (DARK)
   ============================================ */

.hero {
  background: #0a0a0a;
  padding: 148px 0 108px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,77,0,0.09) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
}

.hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.92;
  color: #ffffff;
  margin-bottom: 36px;
}

.hero-title-line {
  display: block;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.52);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 44px;
}

.hero-subtitle .hl {
  color: var(--orange);
  font-weight: 500;
}

.hero .btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.hero .btn-primary:hover {
  background: #e04200;
  opacity: 1;
}

.hero .btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
}

.hero .btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-meta-item .label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.hero-meta-item .value {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
}

/* ============================================
   STATS BAND — SKEWED
   ============================================ */

.stats-wrap {
  background: var(--black);
  padding-bottom: 48px;
}

.stats-band {
  background: var(--orange);
  transform: skewY(-2deg);
  transform-origin: left;
  margin: 0 -4px;
  position: relative;
  z-index: 1;
}

.stats-band-inner {
  transform: skewY(2deg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
}

.stat-item {
  flex: 1;
  padding: 0 0 0 40px;
  border-right: 1px solid rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-item:first-child {
  padding-left: 0;
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-family: var(--font);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.stat-context {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--mono);
  margin-top: 2px;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-wrap {
  background: var(--white);
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

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

.marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--white), transparent);
}

.marquee-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--white), transparent);
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

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

.marquee-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.marquee-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }

/* ============================================
   HEADING LINE REVEAL
   ============================================ */

.line-wrap {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line {
  display: block;
  transform: translateY(108%);
  opacity: 0;
  transition: transform 0.78s cubic-bezier(0.16, 1, 0.3, 1),
              opacity   0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

.eyebrow-anim {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.body-anim {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease 0.28s, transform 0.55s ease 0.28s;
}

.heading-reveal.in-view .eyebrow-anim {
  opacity: 1;
  transform: translateY(0);
}

.heading-reveal.in-view .line {
  transform: translateY(0);
  opacity: 1;
}

.heading-reveal.in-view .line:nth-child(1) { transition-delay: 0.06s; }
.heading-reveal.in-view .line:nth-child(2) { transition-delay: 0.18s; }
.heading-reveal.in-view .line:nth-child(3) { transition-delay: 0.30s; }

.heading-reveal.in-view .body-anim {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   STAGGER CARDS
   ============================================ */

.stagger-card {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.58s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.58s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SECTION SHARED
   ============================================ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 64px;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--orange);
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.section-header h2 em {
  font-style: normal;
  color: var(--orange);
}

.section-header a {
  font-size: 0.82rem;
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  margin-top: 8px;
  flex-shrink: 0;
}

.section-header a:hover {
  color: var(--orange);
  text-decoration: none;
}

/* ============================================
   TECH STRIP
   ============================================ */

.tech-section {
  background: var(--black);
  padding: 80px 0 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tech-section .section-eyebrow {
  color: var(--orange);
  margin-bottom: 14px;
}

.tech-section h2 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
  color: #fff;
  margin-bottom: 56px;
}

.tech-section h2 em {
  font-style: normal;
  color: var(--orange);
}

.tech-strip {
  border-top: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  position: relative;
}

/* Fade edges */
.tech-strip::before,
.tech-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.tech-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--black), transparent);
}
.tech-strip::after {
  right: 0;
  background: linear-gradient(-90deg, var(--black), transparent);
}

.tech-track {
  display: flex;
  width: max-content;
  animation: techMarquee 36s linear infinite;
}

.tech-track:hover {
  animation-play-state: paused;
}

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

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 30px;
  border-right: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  min-width: 96px;
  cursor: default;
  transition: background 0.18s;
}

.tech-item:hover {
  background: rgba(255,255,255,0.04);
}

.tech-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.6);
  transition: filter 0.22s;
}

.tech-item:hover img {
  filter: grayscale(0) brightness(1);
}

.tech-item-name {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.22s;
}

.tech-item:hover .tech-item-name {
  color: rgba(255,255,255,0.65);
}

.tech-text-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  border-radius: 4px;
  text-align: center;
  line-height: 1.2;
  filter: grayscale(1) brightness(0.6);
  transition: filter 0.22s;
}

.tech-item:hover .tech-text-icon {
  filter: grayscale(0) brightness(1);
}

/* Watermark behind headings */
.wm-wrap {
  position: relative;
}

.wm-wrap .wm {
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  font-size: 6rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--gray-100);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
  z-index: 0;
}

.wm-wrap > *:not(.wm) {
  position: relative;
  z-index: 1;
}

/* ============================================
   HOME — QUICK NAV CARDS
   ============================================ */

.home-nav-section {
  padding: 110px 0;
  border-bottom: 1px solid var(--border);
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}

.home-nav-card {
  background: var(--white);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
  transition: background 0.18s;
  position: relative;
  overflow: hidden;
}

.home-nav-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.home-nav-card:hover {
  background: var(--gray-50);
  text-decoration: none;
}

.home-nav-card:hover::after {
  transform: scaleX(1);
}

.home-nav-card .number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
  font-family: var(--mono);
}

.home-nav-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-nav-card p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}

.home-nav-card .arrow {
  font-size: 1.1rem;
  color: var(--gray-400);
  margin-top: 4px;
  transition: color 0.2s, transform 0.2s;
}

.home-nav-card:hover .arrow {
  color: var(--orange);
  transform: translateX(6px);
}

/* ============================================
   HOME — PROJECTS SECTION
   ============================================ */

.projects-section {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0;
}

.project-card {
  background: var(--white);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.18s;
}

.project-card:not(.featured-large):hover {
  background: var(--gray-50);
}

.project-card.featured-large {
  grid-column: span 2;
  background: var(--black);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.featured-large .project-category {
  color: var(--orange);
}

.project-year {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: var(--mono);
}

.featured-large .project-year {
  color: rgba(255,255,255,0.3);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  line-height: 1.3;
}

.project-card.featured-large h3 {
  color: #fff;
  font-size: 1.75rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.featured-large p {
  color: rgba(255,255,255,0.5);
}

.code-decoration {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.15);
  border-left: 2px solid var(--orange);
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 0 4px 4px 0;
}

.code-decoration .c-key { color: rgba(255,140,80,0.65); }
.code-decoration .c-str { color: rgba(120,220,120,0.55); }
.code-decoration .c-val { color: rgba(150,185,255,0.55); }
.code-decoration .c-dim { color: rgba(255,255,255,0.18); }

.project-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.project-highlights li {
  font-size: 0.83rem;
  color: var(--gray-600);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.featured-large .project-highlights li {
  color: rgba(255,255,255,0.45);
}

.project-highlights li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

.featured-large .project-highlights li::before {
  color: var(--orange);
}

.featured-large code {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid transparent;
}

.featured-large .tag {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.10);
}

.project-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.featured-large .btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.featured-large .btn-primary:hover {
  background: #e04200;
  opacity: 1;
}

.featured-large .btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.18);
}

.featured-large .btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* ============================================
   HOME — LIVE SITES
   ============================================ */

.live-sites {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}

.live-sites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 44px;
}

.site-card {
  background: var(--white);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
  transition: background 0.18s;
}

.site-card:hover {
  background: var(--gray-50);
  text-decoration: none;
}

.site-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--black);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: background 0.2s;
}

.site-card:hover .site-icon {
  background: var(--orange);
}

.site-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.site-url {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--gray-400);
  word-break: break-all;
}

.site-card p {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}

.site-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.site-tags .tag {
  font-size: 0.62rem;
  padding: 3px 8px;
}

/* ============================================
   HOME — EXPERIENCE SECTION
   ============================================ */

.exp-section {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}

.exp-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}

.exp-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.exp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-org {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.01em;
}

.exp-period {
  font-size: 0.72rem;
  color: var(--gray-400);
  font-family: var(--mono);
}

.exp-loc,
.exp-location {
  font-size: 0.72rem;
  color: var(--gray-400);
}

.exp-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--orange);
  color: #fff;
  width: fit-content;
  margin-top: 4px;
}

.exp-main h3 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.exp-main > p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.stat-row {
  display: flex;
  gap: 40px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-stat-num {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--black);
  font-variant-numeric: tabular-nums;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--orange);
  margin-bottom: 6px;
}

.exp-stat-num span {
  border-bottom: none;
}

.exp-stat-label {
  font-size: 0.68rem;
  color: var(--gray-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================
   PROJECTS PAGE
   ============================================ */

.projects-featured {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.projects-archive {
  padding: 80px 0;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.archive-item {
  background: var(--white);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--transition);
}

.archive-item:hover {
  background: var(--gray-100);
}

.archive-item .category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
  margin-bottom: 2px;
}

.archive-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1.3;
}

.archive-item .archive-meta {
  font-size: 0.75rem;
  color: var(--gray-400);
  display: flex;
  gap: 8px;
  align-items: center;
}

.archive-item p {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.archive-item .archive-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.archive-link {
  font-size: 0.75rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.archive-link:hover {
  color: var(--black);
  text-decoration: none;
}

/* ---- Tabbed Code Viewer ---- */
.code-viewer {
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0;
  background: #0f0f0f;
}

.code-viewer-tabs {
  display: flex;
  align-items: center;
  background: #161616;
  border-bottom: 1px solid #2a2a2a;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.code-viewer-tabs::-webkit-scrollbar { display: none; }

.cv-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #666;
  background: none;
  border: none;
  border-right: 1px solid #2a2a2a;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.cv-tab:hover { color: #aaa; background: #1c1c1c; }

.cv-tab.active {
  color: #e0e0e0;
  background: #0f0f0f;
  border-bottom: 2px solid #fff;
  margin-bottom: -1px;
}

.cv-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
}

.cv-tab.active .cv-tab-dot { background: #fff; }

.cv-tab-label {
  font-family: var(--font);
  font-size: 0.62rem;
  color: #444;
  letter-spacing: 0.04em;
}

.cv-tab.active .cv-tab-label { color: #666; }

.cv-tab-spacer { flex: 1; }

.cv-tab-arch {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #333;
  padding: 0 16px;
  white-space: nowrap;
}

.cv-panel { display: none; }
.cv-panel.active { display: block; }

.cv-panel-meta {
  padding: 6px 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #444;
  background: #0a0a0a;
  border-bottom: 1px solid #1e1e1e;
  letter-spacing: 0.04em;
}

.cv-code {
  margin: 0;
  padding: 16px 20px;
  background: #0f0f0f;
  overflow-x: auto;
  overflow-y: auto;
  height: 360px;
  scrollbar-width: thin;
  scrollbar-color: #444 #0f0f0f;
}

.cv-code::-webkit-scrollbar { width: 7px; height: 7px; }
.cv-code::-webkit-scrollbar-track { background: #0f0f0f; }
.cv-code::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.cv-code::-webkit-scrollbar-corner { background: #0f0f0f; }

.code-viewer.expanded .cv-code {
  height: 680px;
}

.cv-code code {
  font-family: var(--mono);
  font-size: 0.73rem;
  line-height: 1.75;
  color: #c9c9c9;
  display: block;
  white-space: pre;
  tab-size: 2;
  min-width: max-content;
}

.cv-code .cm  { color: #555; font-style: italic; }
.cv-code .ck  { color: #aaa; }
.cv-code .cfn { color: #e0e0e0; font-weight: 600; }
.cv-code .cs  { color: #8a8a8a; }
.cv-code .cn  { color: #bbb; }
.cv-code .cv  { color: #c0c0c0; }

.cv-expand-btn {
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #555;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 6px 10px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.cv-expand-btn:hover { color: #ccc; border-color: #555; }

.cv-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  color: #444;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.cv-placeholder span { color: #333; font-size: 0.65rem; }

/* ============================================
   EXPERIENCE PAGE
   ============================================ */

.experience-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.experience-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.experience-entry:last-child {
  border-bottom: none;
}

.exp-main > p:not(:last-child) {
  margin-bottom: 20px;
}

.exp-tasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.exp-tasks li {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.exp-tasks li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gray-400);
  font-size: 0.75rem;
  top: 1px;
}

.exp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Skills */
.skills-section {
  padding: 80px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.skill-group h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-list li {
  font-size: 0.85rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
}

/* ============================================
   CV PAGE
   ============================================ */

.cv-section {
  padding: 80px 0;
}

.cv-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

.cv-sidebar {
  position: sticky;
  top: 80px;
}

.cv-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 20px;
  letter-spacing: -0.05em;
}

.cv-sidebar h2 {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.cv-sidebar .cv-title {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.5;
}

.cv-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.cv-contact-list li {
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cv-contact-list li .contact-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.cv-contact-list li a {
  color: var(--black);
  font-weight: 500;
}

.cv-languages {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}

.cv-languages h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--gray-600);
}

.lang-item:last-child {
  border-bottom: none;
}

.lang-item .lang-level {
  font-weight: 500;
  color: var(--black);
}

.cv-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-block {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.cv-block:last-child {
  border-bottom: none;
}

.cv-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.cv-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: var(--mono);
  padding-top: 2px;
}

.cv-entry-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 3px;
}

.cv-entry-content .cv-entry-org {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.cv-entry-content p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.cv-entry-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.cv-entry-content ul li {
  font-size: 0.82rem;
  color: var(--gray-600);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.cv-entry-content ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

.cv-download-bar {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

.cv-download-bar p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ============================================
   CERTIFICATIONS PAGE
   ============================================ */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.cert-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), transform var(--transition);
}

.cert-card:hover {
  border-color: var(--black);
  transform: translateY(-2px);
}

.cert-issuer {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.cert-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1.3;
}

.cert-card p {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}

.cert-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.cert-date {
  font-size: 0.72rem;
  color: var(--gray-400);
  font-family: var(--mono);
}

.cert-actions {
  display: flex;
  gap: 8px;
}

.cert-placeholder {
  background: var(--gray-100);
  border: 1px dashed var(--border);
  opacity: 0.6;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-section {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 40px;
}

.contact-info h2 {
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.contact-info p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.contact-item:hover {
  border-color: var(--black);
}

.contact-item .label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.contact-item a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item .note {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.contact-availability {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 32px;
}

.contact-availability h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.contact-availability p {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-bottom: 0;
}

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

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

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--black);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   PDF MODAL
   ============================================ */

.pdf-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
}

.pdf-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-modal-inner {
  background: var(--white);
  border-radius: 8px;
  width: 90vw;
  max-width: 900px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pdf-modal-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
}

.pdf-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--gray-600);
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pdf-modal-close:hover {
  color: var(--black);
}

.pdf-modal iframe {
  flex: 1;
  border: none;
  width: 100%;
}

/* ============================================
   FOOTER — DARK
   ============================================ */

.footer {
  background: var(--black);
  padding: 72px 0 40px;
  position: relative;
  overflow: hidden;
}

.footer-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* CTA / email section */
.footer-cta {
  text-align: center;
  margin-bottom: 52px;
}

.footer-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.42);
  margin-bottom: 24px;
}

.footer-form {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  transition: border-color 0.2s;
}

.footer-form:focus-within {
  border-color: var(--orange);
}

.footer-form input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #fff;
  font-family: var(--font);
}

.footer-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.28);
}

.footer-form button {
  background: var(--orange);
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  white-space: nowrap;
}

.footer-form button:hover {
  background: #e64400;
}

/* Divider */
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin-bottom: 28px;
}

/* Bottom bar */
.footer-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.75;
}

.footer-left p strong {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

.footer-dot {
  color: var(--orange);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.32);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s;
}

.footer-links a:hover {
  color: var(--orange);
  text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .home-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    overflow: visible; /* don't clip taller cards on mobile */
  }

  .project-card.featured-large {
    grid-column: span 1;
    min-width: 0; /* prevent card from overflowing grid column */
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-entry {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .exp-entry {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cv-layout {
    grid-template-columns: 1fr;
  }

  .cv-sidebar {
    position: static;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .live-sites-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-band-inner {
    flex-wrap: wrap;
    gap: 32px;
  }

  .stat-item {
    flex: 0 0 calc(50% - 20px);
    border-right: none;
    padding-left: 0;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-direction: column;
    padding: 16px 20px;
    gap: 16px;
  }

  .nav.scrolled .nav-links {
    background: rgba(255,255,255,0.97);
    border-bottom-color: var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 100px 0 80px;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .home-nav-grid {
    grid-template-columns: 1fr;
  }

  .home-nav-section {
    padding: 60px 0;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 60px 0;
  }

  .projects-section,
  .live-sites,
  .exp-section {
    padding: 60px 0;
  }

  .page-header {
    padding: 80px 0 48px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-form {
    max-width: 100%;
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cv-download-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .pdf-modal-inner {
    width: 100vw;
    height: 100dvh;
    max-width: 100%;
    border-radius: 0;
  }

  .cv-tab {
    padding: 8px 10px;
    font-size: 0.65rem;
  }

  /* Hide the architecture label on mobile — too wide */
  .cv-tab-arch {
    display: none;
  }

  /* Prevent featured cards from overflowing grid column */
  .project-card.featured-large {
    min-width: 0;
    overflow: hidden;
  }

  /* Code viewer full-width on mobile */
  .code-viewer {
    max-width: 100%;
  }

  .cv-code {
    height: 260px;
    padding: 12px 14px;
    /* Allow long lines to break rather than force horizontal scroll on mobile */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Wrap code on mobile instead of horizontal scroll */
  .cv-code code {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.62rem;
    line-height: 1.6;
  }

  .code-viewer.expanded .cv-code {
    height: 480px;
  }

  .project-card {
    padding: 24px 20px;
  }

  .archive-item {
    padding: 18px 16px;
  }

  .stats-band-inner {
    flex-direction: column;
    gap: 28px;
  }

  .stat-item {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 24px;
    padding-left: 0;
  }

  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .live-sites-grid {
    grid-template-columns: 1fr;
  }

  .stat-row {
    flex-direction: column;
    gap: 24px;
  }

  /* Section headings — keep readable on mobile */
  .section-header h2,
  .page-header h1 {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .section-header {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
  }

  /* Splash — slightly smaller on mobile, overflow je ok */
  .spiro-logo-img {
    width: 170px;
    height: 170px;
    object-fit: contain;
  }

  .scroll-hint {
    bottom: 32px;
  }
}

/* ============================================
   PRINT / SAVE AS PDF
   ============================================ */
@media print {
  .nav,
  .page-header,
  .cv-download-bar,
  .footer,
  .pdf-modal,
  .btn,
  .cert-actions {
    display: none !important;
  }

  @page {
    size: A4;
    margin: 16mm 18mm;
  }

  html, body {
    font-size: 11pt;
    background: #fff;
    color: #000;
  }

  .cv-section {
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .cv-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: start;
  }

  .cv-sidebar {
    position: static !important;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 18px 14px;
    font-size: 9pt;
  }

  .cv-avatar {
    width: 48px;
    height: 48px;
    font-size: 14pt;
    background: #0a0a0a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .cv-sidebar h2 { font-size: 13pt; margin-bottom: 2px; }
  .cv-title { font-size: 8.5pt; color: #555; margin-bottom: 12px; }
  .cv-contact-list { list-style: none; margin-bottom: 12px; }
  .cv-contact-list li { margin-bottom: 5px; font-size: 8.5pt; line-height: 1.4; }
  .contact-label { display: block; font-weight: 700; font-size: 7pt; letter-spacing: 0.06em; text-transform: uppercase; color: #999; }
  .cv-languages { margin-top: 12px; }
  .cv-languages h4 { font-size: 7pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #999; margin-bottom: 6px; }
  .lang-item { display: flex; justify-content: space-between; font-size: 8.5pt; margin-bottom: 4px; }
  .lang-level { color: #555; }
  .cv-main { font-size: 9.5pt; }
  .cv-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #e0e0e0; page-break-inside: avoid; }
  .cv-block:last-child { border-bottom: none; }
  .cv-block-title { font-size: 7pt !important; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #999; margin-bottom: 10px; border-bottom: 1px solid #e0e0e0; padding-bottom: 5px; }
  .cv-entry { display: grid; grid-template-columns: 70px 1fr; gap: 8px; margin-bottom: 10px; page-break-inside: avoid; }
  .cv-entry-date { font-size: 7.5pt; color: #999; padding-top: 2px; line-height: 1.4; }
  .cv-entry-content h4 { font-size: 9.5pt; font-weight: 600; margin-bottom: 2px; }
  .cv-entry-org { font-size: 8pt; color: #555; margin-bottom: 4px; }
  .cv-entry-content ul { padding-left: 14px; font-size: 8.5pt; color: #444; line-height: 1.5; }
  .cv-entry-content p { font-size: 8.5pt; color: #444; line-height: 1.5; }
  .cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cert-card { border: 1px solid #e0e0e0; border-radius: 4px; padding: 10px; page-break-inside: avoid; }
  .cert-issuer { font-size: 7pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #999; display: block; margin-bottom: 3px; }
  .cert-card h4 { font-size: 8.5pt; font-weight: 600; margin-bottom: 3px; }
  .cert-card p { font-size: 7.5pt; color: #555; line-height: 1.4; }
  .cert-date { font-size: 7pt; color: #999; }
  .tag { display: inline-block; border: 1px solid #ddd; border-radius: 3px; padding: 1px 5px; font-size: 7.5pt; margin: 2px 2px 2px 0; color: #444; }
  .cv-block, .cv-entry, .cert-card { page-break-inside: avoid; }
  a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 7.5pt; color: #777; }
}

/* ============================================
   ACCESSIBILITY & TOUCH TARGET FIXES
   ============================================ */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}
